iorpc_mpipe.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * Copyright 2012 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. /* This file is machine-generated; DO NOT EDIT! */
  15. #ifndef __GXIO_MPIPE_LINUX_RPC_H__
  16. #define __GXIO_MPIPE_LINUX_RPC_H__
  17. #include <hv/iorpc.h>
  18. #include <hv/drv_mpipe_intf.h>
  19. #include <asm/page.h>
  20. #include <gxio/kiorpc.h>
  21. #include <gxio/mpipe.h>
  22. #include <linux/string.h>
  23. #include <linux/module.h>
  24. #include <asm/pgtable.h>
  25. #define GXIO_MPIPE_OP_ALLOC_BUFFER_STACKS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1200)
  26. #define GXIO_MPIPE_OP_INIT_BUFFER_STACK_AUX IORPC_OPCODE(IORPC_FORMAT_KERNEL_MEM, 0x1201)
  27. #define GXIO_MPIPE_OP_ALLOC_NOTIF_RINGS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1203)
  28. #define GXIO_MPIPE_OP_INIT_NOTIF_RING_AUX IORPC_OPCODE(IORPC_FORMAT_KERNEL_MEM, 0x1204)
  29. #define GXIO_MPIPE_OP_REQUEST_NOTIF_RING_INTERRUPT IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1205)
  30. #define GXIO_MPIPE_OP_ENABLE_NOTIF_RING_INTERRUPT IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1206)
  31. #define GXIO_MPIPE_OP_ALLOC_NOTIF_GROUPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1207)
  32. #define GXIO_MPIPE_OP_INIT_NOTIF_GROUP IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1208)
  33. #define GXIO_MPIPE_OP_ALLOC_BUCKETS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1209)
  34. #define GXIO_MPIPE_OP_INIT_BUCKET IORPC_OPCODE(IORPC_FORMAT_NONE, 0x120a)
  35. #define GXIO_MPIPE_OP_ALLOC_EDMA_RINGS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x120b)
  36. #define GXIO_MPIPE_OP_INIT_EDMA_RING_AUX IORPC_OPCODE(IORPC_FORMAT_KERNEL_MEM, 0x120c)
  37. #define GXIO_MPIPE_OP_COMMIT_RULES IORPC_OPCODE(IORPC_FORMAT_NONE, 0x120f)
  38. #define GXIO_MPIPE_OP_REGISTER_CLIENT_MEMORY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1210)
  39. #define GXIO_MPIPE_OP_LINK_OPEN_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1211)
  40. #define GXIO_MPIPE_OP_LINK_CLOSE_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1212)
  41. #define GXIO_MPIPE_OP_LINK_SET_ATTR_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1213)
  42. #define GXIO_MPIPE_OP_GET_TIMESTAMP_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x121e)
  43. #define GXIO_MPIPE_OP_SET_TIMESTAMP_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x121f)
  44. #define GXIO_MPIPE_OP_ADJUST_TIMESTAMP_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1220)
  45. #define GXIO_MPIPE_OP_CONFIG_EDMA_RING_BLKS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1221)
  46. #define GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1222)
  47. #define GXIO_MPIPE_OP_ARM_POLLFD IORPC_OPCODE(IORPC_FORMAT_KERNEL_POLLFD, 0x9000)
  48. #define GXIO_MPIPE_OP_CLOSE_POLLFD IORPC_OPCODE(IORPC_FORMAT_KERNEL_POLLFD, 0x9001)
  49. #define GXIO_MPIPE_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
  50. #define GXIO_MPIPE_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
  51. int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t *context,
  52. unsigned int count, unsigned int first,
  53. unsigned int flags);
  54. int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t *context,
  55. void *mem_va, size_t mem_size,
  56. unsigned int mem_flags, unsigned int stack,
  57. unsigned int buffer_size_enum);
  58. int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t *context,
  59. unsigned int count, unsigned int first,
  60. unsigned int flags);
  61. int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
  62. size_t mem_size, unsigned int mem_flags,
  63. unsigned int ring);
  64. int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t *context,
  65. int inter_x, int inter_y,
  66. int inter_ipi, int inter_event,
  67. unsigned int ring);
  68. int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t *context,
  69. unsigned int ring);
  70. int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t *context,
  71. unsigned int count, unsigned int first,
  72. unsigned int flags);
  73. int gxio_mpipe_init_notif_group(gxio_mpipe_context_t *context,
  74. unsigned int group,
  75. gxio_mpipe_notif_group_bits_t bits);
  76. int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t *context, unsigned int count,
  77. unsigned int first, unsigned int flags);
  78. int gxio_mpipe_init_bucket(gxio_mpipe_context_t *context, unsigned int bucket,
  79. MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info);
  80. int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t *context,
  81. unsigned int count, unsigned int first,
  82. unsigned int flags);
  83. int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
  84. size_t mem_size, unsigned int mem_flags,
  85. unsigned int ring, unsigned int channel);
  86. int gxio_mpipe_commit_rules(gxio_mpipe_context_t *context, const void *blob,
  87. size_t blob_size);
  88. int gxio_mpipe_register_client_memory(gxio_mpipe_context_t *context,
  89. unsigned int iotlb, HV_PTE pte,
  90. unsigned int flags);
  91. int gxio_mpipe_link_open_aux(gxio_mpipe_context_t *context,
  92. _gxio_mpipe_link_name_t name, unsigned int flags);
  93. int gxio_mpipe_link_close_aux(gxio_mpipe_context_t *context, int mac);
  94. int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t *context, int mac,
  95. uint32_t attr, int64_t val);
  96. int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t *context, uint64_t *sec,
  97. uint64_t *nsec, uint64_t *cycles);
  98. int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t *context, uint64_t sec,
  99. uint64_t nsec, uint64_t cycles);
  100. int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t *context,
  101. int64_t nsec);
  102. int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t *context,
  103. int32_t ppb);
  104. int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie);
  105. int gxio_mpipe_close_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie);
  106. int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t *context, HV_PTE *base);
  107. int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t *context,
  108. unsigned long offset, unsigned long size);
  109. #endif /* !__GXIO_MPIPE_LINUX_RPC_H__ */