alarmDataOperation.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. /*
  2. * Common header file for Blackfin family of processors
  3. *
  4. * Copyright 2007-2008 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef _PORTMUX_H_
  9. #define _PORTMUX_H_
  10. #define P_IDENT(x) ((x) & 0x1FF)
  11. #define P_FUNCT(x) (((x) & 0x3) << 9)
  12. #define P_FUNCT2MUX(x) (((x) >> 9) & 0x3)
  13. #define P_DEFINED 0x8000
  14. #define P_UNDEF 0x4000
  15. #define P_MAYSHARE 0x2000
  16. #define P_DONTCARE 0x1000
  17. int peripheral_request(unsigned short per, const char *label);
  18. void peripheral_free(unsigned short per);
  19. int peripheral_request_list(const unsigned short per[], const char *label);
  20. void peripheral_free_list(const unsigned short per[]);
  21. #include <asm/gpio.h>
  22. #include <mach/portmux.h>
  23. #ifndef P_SPORT2_TFS
  24. #define P_SPORT2_TFS P_UNDEF
  25. #endif
  26. #ifndef P_SPORT2_DTSEC
  27. #define P_SPORT2_DTSEC P_UNDEF
  28. #endif
  29. #ifndef P_SPORT2_DTPRI
  30. #define P_SPORT2_DTPRI P_UNDEF
  31. #endif
  32. #ifndef P_SPORT2_TSCLK
  33. #define P_SPORT2_TSCLK P_UNDEF
  34. #endif
  35. #ifndef P_SPORT2_RFS
  36. #define P_SPORT2_RFS P_UNDEF
  37. #endif
  38. #ifndef P_SPORT2_DRSEC
  39. #define P_SPORT2_DRSEC P_UNDEF
  40. #endif
  41. #ifndef P_SPORT2_DRPRI
  42. #define P_SPORT2_DRPRI P_UNDEF
  43. #endif
  44. #ifndef P_SPORT2_RSCLK
  45. #define P_SPORT2_RSCLK P_UNDEF
  46. #endif
  47. #ifndef P_SPORT3_TFS
  48. #define P_SPORT3_TFS P_UNDEF
  49. #endif
  50. #ifndef P_SPORT3_DTSEC
  51. #define P_SPORT3_DTSEC P_UNDEF
  52. #endif
  53. #ifndef P_SPORT3_DTPRI
  54. #define P_SPORT3_DTPRI P_UNDEF
  55. #endif
  56. #ifndef P_SPORT3_TSCLK
  57. #define P_SPORT3_TSCLK P_UNDEF
  58. #endif
  59. #ifndef P_SPORT3_RFS
  60. #define P_SPORT3_RFS P_UNDEF
  61. #endif
  62. #ifndef P_SPORT3_DRSEC
  63. #define P_SPORT3_DRSEC P_UNDEF
  64. #endif
  65. #ifndef P_SPORT3_DRPRI
  66. #define P_SPORT3_DRPRI P_UNDEF
  67. #endif
  68. #ifndef P_SPORT3_RSCLK
  69. #define P_SPORT3_RSCLK P_UNDEF
  70. #endif
  71. #ifndef P_TMR4
  72. #define P_TMR4 P_UNDEF
  73. #endif
  74. #ifndef P_TMR5
  75. #define P_TMR5 P_UNDEF
  76. #endif
  77. #ifndef P_TMR6
  78. #define P_TMR6 P_UNDEF
  79. #endif
  80. #ifndef P_TMR7
  81. #define P_TMR7 P_UNDEF
  82. #endif
  83. #ifndef P_TWI1_SCL
  84. #define P_TWI1_SCL P_UNDEF
  85. #endif
  86. #ifndef P_TWI1_SDA
  87. #define P_TWI1_SDA P_UNDEF
  88. #endif
  89. #ifndef P_UART3_RTS
  90. #define P_UART3_RTS P_UNDEF
  91. #endif
  92. #ifndef P_UART3_CTS
  93. #define P_UART3_CTS P_UNDEF
  94. #endif
  95. #ifndef P_UART2_TX
  96. #define P_UART2_TX P_UNDEF
  97. #endif
  98. #ifndef P_UART2_RX
  99. #define P_UART2_RX P_UNDEF
  100. #endif
  101. #ifndef P_UART3_TX
  102. #define P_UART3_TX P_UNDEF
  103. #endif
  104. #ifndef P_UART3_RX
  105. #define P_UART3_RX P_UNDEF
  106. #endif
  107. #ifndef P_SPI2_SS
  108. #define P_SPI2_SS P_UNDEF
  109. #endif
  110. #ifndef P_SPI2_SSEL1
  111. #define P_SPI2_SSEL1 P_UNDEF
  112. #endif
  113. #ifndef P_SPI2_SSEL2
  114. #define P_SPI2_SSEL2 P_UNDEF
  115. #endif
  116. #ifndef P_SPI2_SSEL3
  117. #define P_SPI2_SSEL3 P_UNDEF
  118. #endif
  119. #ifndef P_SPI2_SSEL4
  120. #define P_SPI2_SSEL4 P_UNDEF
  121. #endif
  122. #ifndef P_SPI2_SSEL5
  123. #define P_SPI2_SSEL5 P_UNDEF
  124. #endif
  125. #ifndef P_SPI2_SSEL6
  126. #define P_SPI2_SSEL6 P_UNDEF
  127. #endif
  128. #ifndef P_SPI2_SSEL7
  129. #define P_SPI2_SSEL7 P_UNDEF
  130. #endif
  131. #ifndef P_SPI2_SCK
  132. #define P_SPI2_SCK P_UNDEF
  133. #endif
  134. #ifndef P_SPI2_MOSI
  135. #define P_SPI2_MOSI P_UNDEF
  136. #endif
  137. #ifndef P_SPI2_MISO
  138. #define P_SPI2_MISO P_UNDEF
  139. #endif
  140. #ifndef P_TMR0
  141. #define P_TMR0 P_UNDEF
  142. #endif
  143. #ifndef P_TMR1
  144. #define P_TMR1 P_UNDEF
  145. #endif
  146. #ifndef P_TMR2
  147. #define P_TMR2 P_UNDEF
  148. #endif
  149. #ifndef P_TMR3
  150. #define P_TMR3 P_UNDEF
  151. #endif
  152. #ifndef P_SPORT0_TFS
  153. #define P_SPORT0_TFS P_UNDEF
  154. #endif
  155. #ifndef P_SPORT0_DTSEC
  156. #define P_SPORT0_DTSEC P_UNDEF
  157. #endif
  158. #ifndef P_SPORT0_DTPRI
  159. #define P_SPORT0_DTPRI P_UNDEF
  160. #endif
  161. #ifndef P_SPORT0_TSCLK
  162. #define P_SPORT0_TSCLK P_UNDEF
  163. #endif
  164. #ifndef P_SPORT0_RFS
  165. #define P_SPORT0_RFS P_UNDEF
  166. #endif
  167. #ifndef P_SPORT0_DRSEC
  168. #define P_SPORT0_DRSEC P_UNDEF
  169. #endif
  170. #ifndef P_SPORT0_DRPRI
  171. #define P_SPORT0_DRPRI P_UNDEF
  172. #endif
  173. #ifndef P_SPORT0_RSCLK
  174. #define P_SPORT0_RSCLK P_UNDEF
  175. #endif
  176. #ifndef P_SD_D0
  177. #define P_SD_D0 P_UNDEF
  178. #endif
  179. #ifndef P_SD_D1
  180. #define P_SD_D1 P_UNDEF
  181. #endif
  182. #ifndef P_SD_D2
  183. #define P_SD_D2 P_UNDEF
  184. #endif
  185. #ifndef P_SD_D3
  186. #define P_SD_D3 P_UNDEF
  187. #endif
  188. #ifndef P_SD_CLK
  189. #define P_SD_CLK P_UNDEF
  190. #endif
  191. #ifndef P_SD_CMD
  192. #define P_SD_CMD P_UNDEF
  193. #endif
  194. #ifndef P_MMCLK
  195. #define P_MMCLK P_UNDEF
  196. #endif
  197. #ifndef P_MBCLK
  198. #define P_MBCLK P_UNDEF
  199. #endif
  200. #ifndef P_PPI1_D0
  201. #define P_PPI1_D0 P_UNDEF
  202. #endif
  203. #ifndef P_PPI1_D1
  204. #define P_PPI1_D1 P_UNDEF
  205. #endif
  206. #ifndef P_PPI1_D2
  207. #define P_PPI1_D2 P_UNDEF
  208. #endif
  209. #ifndef P_PPI1_D3
  210. #define P_PPI1_D3 P_UNDEF
  211. #endif
  212. #ifndef P_PPI1_D4
  213. #define P_PPI1_D4 P_UNDEF
  214. #endif
  215. #ifndef P_PPI1_D5
  216. #define P_PPI1_D5 P_UNDEF
  217. #endif
  218. #ifndef P_PPI1_D6
  219. #define P_PPI1_D6 P_UNDEF
  220. #endif
  221. #ifndef P_PPI1_D7
  222. #define P_PPI1_D7 P_UNDEF
  223. #endif
  224. #ifndef P_PPI1_D8
  225. #define P_PPI1_D8 P_UNDEF
  226. #endif
  227. #ifndef P_PPI1_D9
  228. #define P_PPI1_D9 P_UNDEF
  229. #endif
  230. #ifndef P_PPI1_D10
  231. #define P_PPI1_D10 P_UNDEF
  232. #endif
  233. #ifndef P_PPI1_D11
  234. #define P_PPI1_D11 P_UNDEF
  235. #endif
  236. #ifndef P_PPI1_D12
  237. #define P_PPI1_D12 P_UNDEF
  238. #endif
  239. #ifndef P_PPI1_D13
  240. #define P_PPI1_D13 P_UNDEF
  241. #endif
  242. #ifndef P_PPI1_D14
  243. #define P_PPI1_D14 P_UNDEF
  244. #endif
  245. #ifndef P_PPI1_D15
  246. #define P_PPI1_D15 P_UNDEF
  247. #endif
  248. #ifndef P_HOST_D8
  249. #define P_HOST_D8 P_UNDEF
  250. #endif
  251. #ifndef P_HOST_D9
  252. #define P_HOST_D9 P_UNDEF
  253. #endif
  254. #ifndef P_HOST_D10
  255. #define P_HOST_D10 P_UNDEF
  256. #endif
  257. #ifndef P_HOST_D11
  258. #define P_HOST_D11 P_UNDEF
  259. #endif
  260. #ifndef P_HOST_D12
  261. #define P_HOST_D12 P_UNDEF
  262. #endif
  263. #ifndef P_HOST_D13
  264. #define P_HOST_D13 P_UNDEF
  265. #endif
  266. #ifndef P_HOST_D14
  267. #define P_HOST_D14 P_UNDEF
  268. #endif
  269. #ifndef P_HOST_D15
  270. #define P_HOST_D15 P_UNDEF
  271. #endif
  272. #ifndef P_HOST_D0
  273. #define P_HOST_D0 P_UNDEF
  274. #endif
  275. #ifndef P_HOST_D1
  276. #define P_HOST_D1 P_UNDEF
  277. #endif
  278. #ifndef P_HOST_D2
  279. #define P_HOST_D2 P_UNDEF
  280. #endif
  281. #ifndef P_HOST_D3
  282. #define P_HOST_D3 P_UNDEF
  283. #endif
  284. #ifndef P_HOST_D4
  285. #define P_HOST_D4 P_UNDEF
  286. #endif
  287. #ifndef P_HOST_D5
  288. #define P_HOST_D5 P_UNDEF
  289. #endif
  290. #ifndef P_HOST_D6
  291. #define P_HOST_D6 P_UNDEF
  292. #endif
  293. #ifndef P_HOST_D7
  294. #define P_HOST_D7 P_UNDEF
  295. #endif
  296. #ifndef P_SPORT1_TFS
  297. #define P_SPORT1_TFS P_UNDEF