iorpc_trio.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_TRIO_LINUX_RPC_H__
  16. #define __GXIO_TRIO_LINUX_RPC_H__
  17. #include <hv/iorpc.h>
  18. #include <hv/drv_trio_intf.h>
  19. #include <gxio/trio.h>
  20. #include <gxio/kiorpc.h>
  21. #include <linux/string.h>
  22. #include <linux/module.h>
  23. #include <asm/pgtable.h>
  24. #define GXIO_TRIO_OP_DEALLOC_ASID IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400)
  25. #define GXIO_TRIO_OP_ALLOC_ASIDS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1401)
  26. #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1404)
  27. #define GXIO_TRIO_OP_ALLOC_SCATTER_QUEUES IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140e)
  28. #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1412)
  29. #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1414)
  30. #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e)
  31. #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141f)
  32. #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1420)
  33. #define GXIO_TRIO_OP_CONFIG_MSI_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1421)
  34. #define GXIO_TRIO_OP_SET_MPS_MRS IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1423)
  35. #define GXIO_TRIO_OP_FORCE_RC_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1424)
  36. #define GXIO_TRIO_OP_FORCE_EP_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1425)
  37. #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
  38. #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
  39. int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count,
  40. unsigned int first, unsigned int flags);
  41. int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context,
  42. unsigned int count, unsigned int first,
  43. unsigned int flags);
  44. int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context,
  45. unsigned int count, unsigned int first,
  46. unsigned int flags);
  47. int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context,
  48. unsigned int count, unsigned int first,
  49. unsigned int flags);
  50. int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context,
  51. unsigned int pio_region, unsigned int mac,
  52. uint32_t bus_address_hi, unsigned int flags);
  53. int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context,
  54. unsigned int map, unsigned long va,
  55. uint64_t size, unsigned int asid,
  56. unsigned int mac, uint64_t bus_address,
  57. unsigned int node,
  58. unsigned int order_mode);
  59. int gxio_trio_get_port_property(gxio_trio_context_t *context,
  60. struct pcie_trio_ports_property *trio_ports);
  61. int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x,
  62. int inter_y, int inter_ipi, int inter_event,
  63. unsigned int mac, unsigned int intx);
  64. int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x,
  65. int inter_y, int inter_ipi, int inter_event,
  66. unsigned int mac, unsigned int mem_map,
  67. uint64_t mem_map_base, uint64_t mem_map_limit,
  68. unsigned int asid);
  69. int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps,
  70. uint16_t mrs, unsigned int mac);
  71. int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac);
  72. int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac);
  73. int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base);
  74. int gxio_trio_check_mmio_offset(gxio_trio_context_t *context,
  75. unsigned long offset, unsigned long size);
  76. #endif /* !__GXIO_TRIO_LINUX_RPC_H__ */