gpio.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. * Copyright 2007-2009 Analog Devices Inc.
  3. * Licensed under the GPL-2 or later.
  4. */
  5. #define GPIO_PA0 0
  6. #define GPIO_PA1 1
  7. #define GPIO_PA2 2
  8. #define GPIO_PA3 3
  9. #define GPIO_PA4 4
  10. #define GPIO_PA5 5
  11. #define GPIO_PA6 6
  12. #define GPIO_PA7 7
  13. #define GPIO_PA8 8
  14. #define GPIO_PA9 9
  15. #define GPIO_PA10 10
  16. #define GPIO_PA11 11
  17. #define GPIO_PA12 12
  18. #define GPIO_PA13 13
  19. #define GPIO_PA14 14
  20. #define GPIO_PA15 15
  21. #define GPIO_PB0 16
  22. #define GPIO_PB1 17
  23. #define GPIO_PB2 18
  24. #define GPIO_PB3 19
  25. #define GPIO_PB4 20
  26. #define GPIO_PB5 21
  27. #define GPIO_PB6 22
  28. #define GPIO_PB7 23
  29. #define GPIO_PB8 24
  30. #define GPIO_PB9 25
  31. #define GPIO_PB10 26
  32. #define GPIO_PB11 27
  33. #define GPIO_PB12 28
  34. #define GPIO_PB13 29
  35. #define GPIO_PB14 30
  36. #define GPIO_PB15 31 /* N/A */
  37. #define GPIO_PC0 32
  38. #define GPIO_PC1 33
  39. #define GPIO_PC2 34
  40. #define GPIO_PC3 35
  41. #define GPIO_PC4 36
  42. #define GPIO_PC5 37
  43. #define GPIO_PC6 38
  44. #define GPIO_PC7 39
  45. #define GPIO_PC8 40
  46. #define GPIO_PC9 41
  47. #define GPIO_PC10 42
  48. #define GPIO_PC11 43
  49. #define GPIO_PC12 44
  50. #define GPIO_PC13 45
  51. #define GPIO_PC14 46 /* N/A */
  52. #define GPIO_PC15 47 /* N/A */
  53. #define GPIO_PD0 48
  54. #define GPIO_PD1 49
  55. #define GPIO_PD2 50
  56. #define GPIO_PD3 51
  57. #define GPIO_PD4 52
  58. #define GPIO_PD5 53
  59. #define GPIO_PD6 54
  60. #define GPIO_PD7 55
  61. #define GPIO_PD8 56
  62. #define GPIO_PD9 57
  63. #define GPIO_PD10 58
  64. #define GPIO_PD11 59
  65. #define GPIO_PD12 60
  66. #define GPIO_PD13 61
  67. #define GPIO_PD14 62
  68. #define GPIO_PD15 63
  69. #define GPIO_PE0 64
  70. #define GPIO_PE1 65
  71. #define GPIO_PE2 66
  72. #define GPIO_PE3 67
  73. #define GPIO_PE4 68
  74. #define GPIO_PE5 69
  75. #define GPIO_PE6 70
  76. #define GPIO_PE7 71
  77. #define GPIO_PE8 72
  78. #define GPIO_PE9 73
  79. #define GPIO_PE10 74
  80. #define GPIO_PE11 75
  81. #define GPIO_PE12 76
  82. #define GPIO_PE13 77
  83. #define GPIO_PE14 78
  84. #define GPIO_PE15 79
  85. #define GPIO_PF0 80
  86. #define GPIO_PF1 81
  87. #define GPIO_PF2 82
  88. #define GPIO_PF3 83
  89. #define GPIO_PF4 84
  90. #define GPIO_PF5 85
  91. #define GPIO_PF6 86
  92. #define GPIO_PF7 87
  93. #define GPIO_PF8 88
  94. #define GPIO_PF9 89
  95. #define GPIO_PF10 90
  96. #define GPIO_PF11 91
  97. #define GPIO_PF12 92
  98. #define GPIO_PF13 93
  99. #define GPIO_PF14 94
  100. #define GPIO_PF15 95
  101. #define GPIO_PG0 96
  102. #define GPIO_PG1 97
  103. #define GPIO_PG2 98
  104. #define GPIO_PG3 99
  105. #define GPIO_PG4 100
  106. #define GPIO_PG5 101
  107. #define GPIO_PG6 102
  108. #define GPIO_PG7 103
  109. #define GPIO_PG8 104
  110. #define GPIO_PG9 105
  111. #define GPIO_PG10 106
  112. #define GPIO_PG11 107
  113. #define GPIO_PG12 108
  114. #define GPIO_PG13 109
  115. #define GPIO_PG14 110
  116. #define GPIO_PG15 111
  117. #define GPIO_PH0 112
  118. #define GPIO_PH1 113
  119. #define GPIO_PH2 114
  120. #define GPIO_PH3 115
  121. #define GPIO_PH4 116
  122. #define GPIO_PH5 117
  123. #define GPIO_PH6 118
  124. #define GPIO_PH7 119
  125. #define GPIO_PH8 120
  126. #define GPIO_PH9 121
  127. #define GPIO_PH10 122
  128. #define GPIO_PH11 123
  129. #define GPIO_PH12 124
  130. #define GPIO_PH13 125
  131. #define GPIO_PH14 126 /* N/A */
  132. #define GPIO_PH15 127 /* N/A */
  133. #define GPIO_PI0 128
  134. #define GPIO_PI1 129
  135. #define GPIO_PI2 130
  136. #define GPIO_PI3 131
  137. #define GPIO_PI4 132
  138. #define GPIO_PI5 133
  139. #define GPIO_PI6 134
  140. #define GPIO_PI7 135
  141. #define GPIO_PI8 136
  142. #define GPIO_PI9 137
  143. #define GPIO_PI10 138
  144. #define GPIO_PI11 139
  145. #define GPIO_PI12 140
  146. #define GPIO_PI13 141
  147. #define GPIO_PI14 142
  148. #define GPIO_PI15 143
  149. #define GPIO_PJ0 144
  150. #define GPIO_PJ1 145
  151. #define GPIO_PJ2 146
  152. #define GPIO_PJ3 147
  153. #define GPIO_PJ4 148
  154. #define GPIO_PJ5 149
  155. #define GPIO_PJ6 150
  156. #define GPIO_PJ7 151
  157. #define GPIO_PJ8 152
  158. #define GPIO_PJ9 153
  159. #define GPIO_PJ10 154
  160. #define GPIO_PJ11 155
  161. #define GPIO_PJ12 156
  162. #define GPIO_PJ13 157
  163. #define GPIO_PJ14 158 /* N/A */
  164. #define GPIO_PJ15 159 /* N/A */
  165. #define MAX_BLACKFIN_GPIOS 160
  166. struct gpio_port_t {
  167. unsigned short port_fer;
  168. unsigned short dummy1;
  169. unsigned short data;
  170. unsigned short dummy2;
  171. unsigned short data_set;
  172. unsigned short dummy3;
  173. unsigned short data_clear;
  174. unsigned short dummy4;
  175. unsigned short dir_set;
  176. unsigned short dummy5;
  177. unsigned short dir_clear;
  178. unsigned short dummy6;
  179. unsigned short inen;
  180. unsigned short dummy7;
  181. unsigned int port_mux;
  182. };
  183. struct gpio_port_s {
  184. unsigned short fer;
  185. unsigned short data;
  186. unsigned short dir;
  187. unsigned short inen;
  188. unsigned int mux;
  189. };