gpio.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * File: include/asm-blackfin/mach-bf548/gpio.h
  3. * Based on:
  4. * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
  5. *
  6. * Created:
  7. * Description:
  8. *
  9. * Modified:
  10. * Copyright 2004-2007 Analog Devices Inc.
  11. *
  12. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, see the file COPYING, or write
  26. * to the Free Software Foundation, Inc.,
  27. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  28. */
  29. #define GPIO_PA0 0
  30. #define GPIO_PA1 1
  31. #define GPIO_PA2 2
  32. #define GPIO_PA3 3
  33. #define GPIO_PA4 4
  34. #define GPIO_PA5 5
  35. #define GPIO_PA6 6
  36. #define GPIO_PA7 7
  37. #define GPIO_PA8 8
  38. #define GPIO_PA9 9
  39. #define GPIO_PA10 10
  40. #define GPIO_PA11 11
  41. #define GPIO_PA12 12
  42. #define GPIO_PA13 13
  43. #define GPIO_PA14 14
  44. #define GPIO_PA15 15
  45. #define GPIO_PB0 16
  46. #define GPIO_PB1 17
  47. #define GPIO_PB2 18
  48. #define GPIO_PB3 19
  49. #define GPIO_PB4 20
  50. #define GPIO_PB5 21
  51. #define GPIO_PB6 22
  52. #define GPIO_PB7 23
  53. #define GPIO_PB8 24
  54. #define GPIO_PB9 25
  55. #define GPIO_PB10 26
  56. #define GPIO_PB11 27
  57. #define GPIO_PB12 28
  58. #define GPIO_PB13 29
  59. #define GPIO_PB14 30
  60. #define GPIO_PB15 31 /* N/A */
  61. #define GPIO_PC0 32
  62. #define GPIO_PC1 33
  63. #define GPIO_PC2 34
  64. #define GPIO_PC3 35
  65. #define GPIO_PC4 36
  66. #define GPIO_PC5 37
  67. #define GPIO_PC6 38
  68. #define GPIO_PC7 39
  69. #define GPIO_PC8 40
  70. #define GPIO_PC9 41
  71. #define GPIO_PC10 42
  72. #define GPIO_PC11 43
  73. #define GPIO_PC12 44
  74. #define GPIO_PC13 45
  75. #define GPIO_PC14 46 /* N/A */
  76. #define GPIO_PC15 47 /* N/A */
  77. #define GPIO_PD0 48
  78. #define GPIO_PD1 49
  79. #define GPIO_PD2 50
  80. #define GPIO_PD3 51
  81. #define GPIO_PD4 52
  82. #define GPIO_PD5 53
  83. #define GPIO_PD6 54
  84. #define GPIO_PD7 55
  85. #define GPIO_PD8 56
  86. #define GPIO_PD9 57
  87. #define GPIO_PD10 58
  88. #define GPIO_PD11 59
  89. #define GPIO_PD12 60
  90. #define GPIO_PD13 61
  91. #define GPIO_PD14 62
  92. #define GPIO_PD15 63
  93. #define GPIO_PE0 64
  94. #define GPIO_PE1 65
  95. #define GPIO_PE2 66
  96. #define GPIO_PE3 67
  97. #define GPIO_PE4 68
  98. #define GPIO_PE5 69
  99. #define GPIO_PE6 70
  100. #define GPIO_PE7 71
  101. #define GPIO_PE8 72
  102. #define GPIO_PE9 73
  103. #define GPIO_PE10 74
  104. #define GPIO_PE11 75
  105. #define GPIO_PE12 76
  106. #define GPIO_PE13 77
  107. #define GPIO_PE14 78
  108. #define GPIO_PE15 79
  109. #define GPIO_PF0 80
  110. #define GPIO_PF1 81
  111. #define GPIO_PF2 82
  112. #define GPIO_PF3 83
  113. #define GPIO_PF4 84
  114. #define GPIO_PF5 85
  115. #define GPIO_PF6 86
  116. #define GPIO_PF7 87
  117. #define GPIO_PF8 88
  118. #define GPIO_PF9 89
  119. #define GPIO_PF10 90
  120. #define GPIO_PF11 91
  121. #define GPIO_PF12 92
  122. #define GPIO_PF13 93
  123. #define GPIO_PF14 94
  124. #define GPIO_PF15 95
  125. #define GPIO_PG0 96
  126. #define GPIO_PG1 97
  127. #define GPIO_PG2 98
  128. #define GPIO_PG3 99
  129. #define GPIO_PG4 100
  130. #define GPIO_PG5 101
  131. #define GPIO_PG6 102
  132. #define GPIO_PG7 103
  133. #define GPIO_PG8 104
  134. #define GPIO_PG9 105
  135. #define GPIO_PG10 106
  136. #define GPIO_PG11 107
  137. #define GPIO_PG12 108
  138. #define GPIO_PG13 109
  139. #define GPIO_PG14 110
  140. #define GPIO_PG15 111
  141. #define GPIO_PH0 112
  142. #define GPIO_PH1 113
  143. #define GPIO_PH2 114
  144. #define GPIO_PH3 115
  145. #define GPIO_PH4 116
  146. #define GPIO_PH5 117
  147. #define GPIO_PH6 118
  148. #define GPIO_PH7 119
  149. #define GPIO_PH8 120
  150. #define GPIO_PH9 121
  151. #define GPIO_PH10 122
  152. #define GPIO_PH11 123
  153. #define GPIO_PH12 124
  154. #define GPIO_PH13 125
  155. #define GPIO_PH14 126 /* N/A */
  156. #define GPIO_PH15 127 /* N/A */
  157. #define GPIO_PI0 128
  158. #define GPIO_PI1 129
  159. #define GPIO_PI2 130
  160. #define GPIO_PI3 131
  161. #define GPIO_PI4 132
  162. #define GPIO_PI5 133
  163. #define GPIO_PI6 134
  164. #define GPIO_PI7 135
  165. #define GPIO_PI8 136
  166. #define GPIO_PI9 137
  167. #define GPIO_PI10 138
  168. #define GPIO_PI11 139
  169. #define GPIO_PI12 140
  170. #define GPIO_PI13 141
  171. #define GPIO_PI14 142
  172. #define GPIO_PI15 143
  173. #define GPIO_PJ0 144
  174. #define GPIO_PJ1 145
  175. #define GPIO_PJ2 146
  176. #define GPIO_PJ3 147
  177. #define GPIO_PJ4 148
  178. #define GPIO_PJ5 149
  179. #define GPIO_PJ6 150
  180. #define GPIO_PJ7 151
  181. #define GPIO_PJ8 152
  182. #define GPIO_PJ9 153
  183. #define GPIO_PJ10 154
  184. #define GPIO_PJ11 155
  185. #define GPIO_PJ12 156
  186. #define GPIO_PJ13 157
  187. #define GPIO_PJ14 158 /* N/A */
  188. #define GPIO_PJ15 159 /* N/A */
  189. #define MAX_BLACKFIN_GPIOS 160
  190. struct gpio_port_t {
  191. unsigned short port_fer;
  192. unsigned short dummy1;
  193. unsigned short port_data;
  194. unsigned short dummy2;
  195. unsigned short port_set;
  196. unsigned short dummy3;
  197. unsigned short port_clear;
  198. unsigned short dummy4;
  199. unsigned short port_dir_set;
  200. unsigned short dummy5;
  201. unsigned short port_dir_clear;
  202. unsigned short dummy6;
  203. unsigned short port_inen;
  204. unsigned short dummy7;
  205. unsigned int port_mux;
  206. };