trio.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. /* Machine-generated file; do not edit. */
  15. #ifndef __ARCH_TRIO_H__
  16. #define __ARCH_TRIO_H__
  17. #include <arch/abi.h>
  18. #include <arch/trio_def.h>
  19. #ifndef __ASSEMBLER__
  20. /*
  21. * Map SQ Doorbell Format.
  22. * This describes the format of the write-only doorbell register that exists
  23. * in the last 8-bytes of the MAP_SQ_BASE/LIM range. This register is only
  24. * writable from PCIe space. Writes to this register will not be written to
  25. * Tile memory space and thus no IO VA translation is required if the last
  26. * page of the BASE/LIM range is not otherwise written.
  27. */
  28. __extension__
  29. typedef union
  30. {
  31. struct
  32. {
  33. #ifndef __BIG_ENDIAN__
  34. /*
  35. * When written with a 1, the associated MAP_SQ region's doorbell
  36. * interrupt will be triggered once all previous writes are visible to
  37. * Tile software.
  38. */
  39. uint_reg_t doorbell : 1;
  40. /*
  41. * When written with a 1, the descriptor at the head of the associated
  42. * MAP_SQ's FIFO will be dequeued.
  43. */
  44. uint_reg_t pop : 1;
  45. /* Reserved. */
  46. uint_reg_t __reserved : 62;
  47. #else /* __BIG_ENDIAN__ */
  48. uint_reg_t __reserved : 62;
  49. uint_reg_t pop : 1;
  50. uint_reg_t doorbell : 1;
  51. #endif
  52. };
  53. uint_reg_t word;
  54. } TRIO_MAP_SQ_DOORBELL_FMT_t;
  55. /*
  56. * Tile PIO Region Configuration - CFG Address Format.
  57. * This register describes the address format for PIO accesses when the
  58. * associated region is setup with TYPE=CFG.
  59. */
  60. __extension__
  61. typedef union
  62. {
  63. struct
  64. {
  65. #ifndef __BIG_ENDIAN__
  66. /* Register Address (full byte address). */
  67. uint_reg_t reg_addr : 12;
  68. /* Function Number */
  69. uint_reg_t fn : 3;
  70. /* Device Number */
  71. uint_reg_t dev : 5;
  72. /* BUS Number */
  73. uint_reg_t bus : 8;
  74. /* Config Type: 0 for access to directly-attached device. 1 otherwise. */
  75. uint_reg_t type : 1;
  76. /* Reserved. */
  77. uint_reg_t __reserved_0 : 1;
  78. /*
  79. * MAC select. This must match the configuration in
  80. * TILE_PIO_REGION_SETUP.MAC.
  81. */
  82. uint_reg_t mac : 2;
  83. /* Reserved. */
  84. uint_reg_t __reserved_1 : 32;
  85. #else /* __BIG_ENDIAN__ */
  86. uint_reg_t __reserved_1 : 32;
  87. uint_reg_t mac : 2;
  88. uint_reg_t __reserved_0 : 1;
  89. uint_reg_t type : 1;
  90. uint_reg_t bus : 8;
  91. uint_reg_t dev : 5;
  92. uint_reg_t fn : 3;
  93. uint_reg_t reg_addr : 12;
  94. #endif
  95. };
  96. uint_reg_t word;
  97. } TRIO_TILE_PIO_REGION_SETUP_CFG_ADDR_t;
  98. #endif /* !defined(__ASSEMBLER__) */
  99. #endif /* !defined(__ARCH_TRIO_H__) */