alarmDataOperation.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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