rtuHydrantCorrelationCalculation.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. /*
  2. * Copyright 2007-2010 Analog Devices Inc.
  3. *
  4. * Licensed under the Clear BSD license or the GPL-2 (or later)
  5. */
  6. #ifndef _DEF_BF525_H
  7. #define _DEF_BF525_H
  8. /* BF525 is BF522 + USB */
  9. #include "defBF522.h"
  10. /* USB Control Registers */
  11. #define USB_FADDR 0xffc03800 /* Function address register */
  12. #define USB_POWER 0xffc03804 /* Power management register */
  13. #define USB_INTRTX 0xffc03808 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
  14. #define USB_INTRRX 0xffc0380c /* Interrupt register for Rx endpoints 1 to 7 */
  15. #define USB_INTRTXE 0xffc03810 /* Interrupt enable register for IntrTx */
  16. #define USB_INTRRXE 0xffc03814 /* Interrupt enable register for IntrRx */
  17. #define USB_INTRUSB 0xffc03818 /* Interrupt register for common USB interrupts */
  18. #define USB_INTRUSBE 0xffc0381c /* Interrupt enable register for IntrUSB */
  19. #define USB_FRAME 0xffc03820 /* USB frame number */
  20. #define USB_INDEX 0xffc03824 /* Index register for selecting the indexed endpoint registers */
  21. #define USB_TESTMODE 0xffc03828 /* Enabled USB 20 test modes */
  22. #define USB_GLOBINTR 0xffc0382c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
  23. #define USB_GLOBAL_CTL 0xffc03830 /* Global Clock Control for the core */
  24. /* USB Packet Control Registers */
  25. #define USB_TX_MAX_PACKET 0xffc03840 /* Maximum packet size for Host Tx endpoint */
  26. #define USB_CSR0 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
  27. #define USB_TXCSR 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
  28. #define USB_RX_MAX_PACKET 0xffc03848 /* Maximum packet size for Host Rx endpoint */
  29. #define USB_RXCSR 0xffc0384c /* Control Status register for Host Rx endpoint */
  30. #define USB_COUNT0 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
  31. #define USB_RXCOUNT 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
  32. #define USB_TXTYPE 0xffc03854 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
  33. #define USB_NAKLIMIT0 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
  34. #define USB_TXINTERVAL 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
  35. #define USB_RXTYPE 0xffc0385c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
  36. #define USB_RXINTERVAL 0xffc03860 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
  37. #define USB_TXCOUNT 0xffc03868 /* Number of bytes to be written to the selected endpoint Tx FIFO */
  38. /* USB Endpoint FIFO Registers */
  39. #define USB_EP0_FIFO 0xffc03880 /* Endpoint 0 FIFO */
  40. #define USB_EP1_FIFO 0xffc03888 /* Endpoint 1 FIFO */
  41. #define USB_EP2_FIFO 0xffc03890 /* Endpoint 2 FIFO */
  42. #define USB_EP3_FIFO 0xffc03898 /* Endpoint 3 FIFO */
  43. #define USB_EP4_FIFO 0xffc038a0 /* Endpoint 4 FIFO */
  44. #define USB_EP5_FIFO 0xffc038a8 /* Endpoint 5 FIFO */
  45. #define USB_EP6_FIFO 0xffc038b0 /* Endpoint 6 FIFO */
  46. #define USB_EP7_FIFO 0xffc038b8 /* Endpoint 7 FIFO */
  47. /* USB OTG Control Registers */
  48. #define USB_OTG_DEV_CTL 0xffc03900 /* OTG Device Control Register */
  49. #define USB_OTG_VBUS_IRQ 0xffc03904 /* OTG VBUS Control Interrupts */
  50. #define USB_OTG_VBUS_MASK 0xffc03908 /* VBUS Control Interrupt Enable */
  51. /* USB Phy Control Registers */
  52. #define USB_LINKINFO 0xffc03948 /* Enables programming of some PHY-side delays */
  53. #define USB_VPLEN 0xffc0394c /* Determines duration of VBUS pulse for VBUS charging */
  54. #define USB_HS_EOF1 0xffc03950 /* Time buffer for High-Speed transactions */
  55. #define USB_FS_EOF1 0xffc03954 /* Time buffer for Full-Speed transactions */
  56. #define USB_LS_EOF1 0xffc03958 /* Time buffer for Low-Speed transactions */
  57. /* (APHY_CNTRL is for ADI usage only) */
  58. #define USB_APHY_CNTRL 0xffc039e0 /* Register that increases visibility of Analog PHY */
  59. /* (APHY_CALIB is for ADI usage only) */
  60. #define USB_APHY_CALIB 0xffc039e4 /* Register used to set some calibration values */
  61. #define USB_APHY_CNTRL2 0xffc039e8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
  62. /* (PHY_TEST is for ADI usage only) */
  63. #define USB_PHY_TEST 0xffc039ec /* Used for reducing simulation time and simplifies FIFO testability */
  64. #define USB_PLLOSC_CTRL 0xffc039f0 /* Used to program different parameters for USB PLL and Oscillator */
  65. #define USB_SRP_CLKDIV 0xffc039f4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
  66. /* USB Endpoint 0 Control Registers */
  67. #define USB_EP_NI0_TXMAXP 0xffc03a00 /* Maximum packet size for Host Tx endpoint0 */
  68. #define USB_EP_NI0_TXCSR 0xffc03a04 /* Control Status register for endpoint 0 */
  69. #define USB_EP_NI0_RXMAXP 0xffc03a08 /* Maximum packet size for Host Rx endpoint0 */
  70. #define USB_EP_NI0_RXCSR 0xffc03a0c /* Control Status register for Host Rx endpoint0 */
  71. #define USB_EP_NI0_RXCOUNT 0xffc03a10 /* Number of bytes received in endpoint 0 FIFO */
  72. #define USB_EP_NI0_TXTYPE 0xffc03a14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
  73. #define USB_EP_NI0_TXINTERVAL 0xffc03a18 /* Sets the NAK response timeout on Endpoint 0 */
  74. #define USB_EP_NI0_RXTYPE 0xffc03a1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
  75. #define USB_EP_NI0_RXINTERVAL 0xffc03a20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
  76. #define USB_EP_NI0_TXCOUNT 0xffc03a28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
  77. /* USB Endpoint 1 Control Registers */
  78. #define USB_EP_NI1_TXMAXP 0xffc03a40 /* Maximum packet size for Host Tx endpoint1 */
  79. #define USB_EP_NI1_TXCSR 0xffc03a44 /* Control Status register for endpoint1 */
  80. #define USB_EP_NI1_RXMAXP 0xffc03a48 /* Maximum packet size for Host Rx endpoint1 */
  81. #define USB_EP_NI1_RXCSR 0xffc03a4c /* Control Status register for Host Rx endpoint1 */
  82. #define USB_EP_NI1_RXCOUNT 0xffc03a50 /* Number of bytes received in endpoint1 FIFO */
  83. #define USB_EP_NI1_TXTYPE 0xffc03a54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
  84. #define USB_EP_NI1_TXINTERVAL 0xffc03a58 /* Sets the NAK response timeout on Endpoint1 */
  85. #define USB_EP_NI1_RXTYPE 0xffc03a5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
  86. #define USB_EP_NI1_RXINTERVAL 0xffc03a60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
  87. #define USB_EP_NI1_TXCOUNT 0xffc03a68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
  88. /* USB Endpoint 2 Control Registers */
  89. #define USB_EP_NI2_TXMAXP 0xffc03a80 /* Maximum packet size for Host Tx endpoint2 */
  90. #define USB_EP_NI2_TXCSR 0xffc03a84 /* Control Status register for endpoint2 */
  91. #define USB_EP_NI2_RXMAXP 0xffc03a88 /* Maximum packet size for Host Rx endpoint2 */
  92. #define USB_EP_NI2_RXCSR 0xffc03a8c /* Control Status register for Host Rx endpoint2 */
  93. #define USB_EP_NI2_RXCOUNT 0xffc03a90 /* Number of bytes received in endpoint2 FIFO */
  94. #define USB_EP_NI2_TXTYPE 0xffc03a94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
  95. #define USB_EP_NI2_TXINTERVAL 0xffc03a98 /* Sets the NAK response timeout on Endpoint2 */
  96. #define USB_EP_NI2_RXTYPE 0xffc03a9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
  97. #define USB_EP_NI2_RXINTERVAL 0xffc03aa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
  98. #define USB_EP_NI2_TXCOUNT 0xffc03aa8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
  99. /* USB Endpoint 3 Control Registers */
  100. #define USB_EP_NI3_TXMAXP 0xffc03ac0 /* Maximum packet size for Host Tx endpoint3 */
  101. #define USB_EP_NI3_TXCSR 0xffc03ac4 /* Control Status register for endpoint3 */
  102. #define USB_EP_NI3_RXMAXP 0xffc03ac8 /* Maximum packet size for Host Rx endpoint3 */
  103. #define USB_EP_NI3_RXCSR 0xffc03acc /* Control Status register for Host Rx endpoint3 */
  104. #define USB_EP_NI3_RXCOUNT 0xffc03ad0 /* Number of bytes received in endpoint3 FIFO */
  105. #define USB_EP_NI3_TXTYPE 0xffc03ad4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
  106. #define USB_EP_NI3_TXINTERVAL 0xffc03ad8 /* Sets the NAK response timeout on Endpoint3 */
  107. #define USB_EP_NI3_RXTYPE 0xffc03adc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
  108. #define USB_EP_NI3_RXINTERVAL 0xffc03ae0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
  109. #define USB_EP_NI3_TXCOUNT 0xffc03ae8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
  110. /* USB Endpoint 4 Control Registers */
  111. #define USB_EP_NI4_TXMAXP 0xffc03b00 /* Maximum packet size for Host Tx endpoint4 */
  112. #define USB_EP_NI4_TXCSR 0xffc03b04 /* Control Status register for endpoint4 */
  113. #define USB_EP_NI4_RXMAXP 0xffc03b08 /* Maximum packet size for Host Rx endpoint4 */
  114. #define USB_EP_NI4_RXCSR 0xffc03b0c /* Control Status register for Host Rx endpoint4 */
  115. #define USB_EP_NI4_RXCOUNT 0xffc03b10 /* Number of bytes received in endpoint4 FIFO */
  116. #define USB_EP_NI4_TXTYPE 0xffc03b14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
  117. #define USB_EP_NI4_TXINTERVAL 0xffc03b18 /* Sets the NAK response timeout on Endpoint4 */
  118. #define USB_EP_NI4_RXTYPE 0xffc03b1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
  119. #define USB_EP_NI4_RXINTERVAL 0xffc03b20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
  120. #define USB_EP_NI4_TXCOUNT 0xffc03b28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
  121. /* USB Endpoint 5 Control Registers */
  122. #define USB_EP_NI5_TXMAXP 0xffc03b40 /* Maximum packet size for Host Tx endpoint5 */
  123. #define USB_EP_NI5_TXCSR 0xffc03b44 /* Control Status register for endpoint5 */
  124. #define USB_EP_NI5_RXMAXP 0xffc03b48 /* Maximum packet size for Host Rx endpoint5 */
  125. #define USB_EP_NI5_RXCSR 0xffc03b4c /* Control Status register for Host Rx endpoint5 */
  126. #define USB_EP_NI5_RXCOUNT 0xffc03b50 /* Number of bytes received in endpoint5 FIFO */
  127. #define USB_EP_NI5_TXTYPE 0xffc03b54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
  128. #define USB_EP_NI5_TXINTERVAL 0xffc03b58 /* Sets the NAK response timeout on Endpoint5 */
  129. #define USB_EP_NI5_RXTYPE 0xffc03b5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
  130. #define USB_EP_NI5_RXINTERVAL 0xffc03b60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
  131. #define USB_EP_NI5_TXCOUNT 0xffc03b68 /* Number of bytes to be written to the endpoint5 Tx FIFO */
  132. /* USB Endpoint 6 Control Registers */
  133. #define USB_EP_NI6_TXMAXP 0xffc03b80 /* Maximum packet size for Host Tx endpoint6 */
  134. #define USB_EP_NI6_TXCSR 0xffc03b84 /* Control Status register for endpoint6 */
  135. #define USB_EP_NI6_RXMAXP 0xffc03b88 /* Maximum packet size for Host Rx endpoint6 */
  136. #define USB_EP_NI6_RXCSR 0xffc03b8c /* Control Status register for Host Rx endpoint6 */
  137. #define USB_EP_NI6_RXCOUNT 0xffc03b90 /* Number of bytes received in endpoint6 FIFO */
  138. #define USB_EP_NI6_TXTYPE 0xffc03b94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
  139. #define USB_EP_NI6_TXINTERVAL 0xffc03b98 /* Sets the NAK response timeout on Endpoint6 */
  140. #define USB_EP_NI6_RXTYPE 0xffc03b9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
  141. #define USB_EP_NI6_RXINTERVAL 0xffc03ba0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
  142. #define USB_EP_NI6_TXCOUNT 0xffc03ba8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
  143. /* USB Endpoint 7 Control Registers */
  144. #define USB_EP_NI7_TXMAXP 0xffc03bc0 /* Maximum packet size for Host Tx endpoint7 */
  145. #define USB_EP_NI7_TXCSR 0xffc03bc4 /* Control Status register for endpoint7 */
  146. #define USB_EP_NI7_RXMAXP 0xffc03bc8 /* Maximum packet size for Host Rx endpoint7 */
  147. #define USB_EP_NI7_RXCSR 0xffc03bcc /* Control Status register for Host Rx endpoint7 */
  148. #define USB_EP_NI7_RXCOUNT 0xffc03bd0 /* Number of bytes received in endpoint7 FIFO */
  149. #define USB_EP_NI7_TXTYPE 0xffc03bd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
  150. #define USB_EP_NI7_TXINTERVAL 0xffc03bd8 /* Sets the NAK response timeout on Endpoint7 */
  151. #define USB_EP_NI7_RXTYPE 0xffc03bdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
  152. #define USB_EP_NI7_RXINTERVAL 0xffc03be0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
  153. #define USB_EP_NI7_TXCOUNT 0xffc03be8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
  154. #define USB_DMA_INTERRUPT 0xffc03c00 /* Indicates pending interrupts for the DMA channels */
  155. /* USB Channel 0 Config Registers */
  156. #define USB_DMA0CONTROL 0xffc03c04 /* DMA master channel 0 configuration */
  157. #define USB_DMA0ADDRLOW 0xffc03c08 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
  158. #define USB_DMA0ADDRHIGH 0xffc03c0c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
  159. #define USB_DMA0COUNTLOW 0xffc03c10 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
  160. #define USB_DMA0COUNTHIGH 0xffc03c14 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
  161. /* USB Channel 1 Config Registers */
  162. #define USB_DMA1CONTROL 0xffc03c24 /* DMA master channel 1 configuration */
  163. #define USB_DMA1ADDRLOW 0xffc03c28 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
  164. #define USB_DMA1ADDRHIGH 0xffc03c2c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
  165. #define USB_DMA1COUNTLOW 0xffc03c30 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
  166. #define USB_DMA1COUNTHIGH 0xffc03c34 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
  167. /* USB Channel 2 Config Registers */
  168. #define USB_DMA2CONTROL 0xffc03c44 /* DMA master channel 2 configuration */
  169. #define USB_DMA2ADDRLOW 0xffc03c48 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
  170. #define USB_DMA2ADDRHIGH 0xffc03c4c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
  171. #define USB_DMA2COUNTLOW 0xffc03c50 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
  172. #define USB_DMA2COUNTHIGH 0xffc03c54 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
  173. /* USB Channel 3 Config Registers */
  174. #define USB_DMA3CONTROL 0xffc03c64 /* DMA master channel 3 configuration */
  175. #define USB_DMA3ADDRLOW 0xffc03c68 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
  176. #define USB_DMA3ADDRHIGH 0xffc03c6c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
  177. #define USB_DMA3COUNTLOW 0xffc03c70 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
  178. #define USB_DMA3COUNTHIGH 0xffc03c74 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
  179. /* USB Channel 4 Config Registers */
  180. #define USB_DMA4CONTROL 0xffc03c84 /* DMA master channel 4 configuration */
  181. #define USB_DMA4ADDRLOW 0xffc03c88 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
  182. #define USB_DMA4ADDRHIGH 0xffc03c8c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
  183. #define USB_DMA4COUNTLOW 0xffc03c90 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
  184. #define USB_DMA4COUNTHIGH 0xffc03c94 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
  185. /* USB Channel 5 Config Registers */
  186. #define USB_DMA5CONTROL 0xffc03ca4 /* DMA master channel 5 configuration */
  187. #define USB_DMA5ADDRLOW 0xffc03ca8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
  188. #define USB_DMA5ADDRHIGH 0xffc03cac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
  189. #define USB_DMA5COUNTLOW 0xffc03cb0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
  190. #define USB_DMA5COUNTHIGH 0xffc03cb4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
  191. /* USB Channel 6 Config Registers */
  192. #define USB_DMA6CONTROL 0xffc03cc4 /* DMA master channel 6 configuration */
  193. #define USB_DMA6ADDRLOW 0xffc03cc8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
  194. #define USB_DMA6ADDRHIGH 0xffc03ccc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
  195. #define USB_DMA6COUNTLOW 0xffc03cd0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
  196. #define USB_DMA6COUNTHIGH 0xffc03cd4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
  197. /* USB Channel 7 Config Registers */
  198. #define USB_DMA7CONTROL 0xffc03ce4 /* DMA master channel 7 configuration */
  199. #define USB_DMA7ADDRLOW 0xffc03ce8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
  200. #define USB_DMA7ADDRHIGH 0xffc03cec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
  201. #define USB_DMA7COUNTLOW 0xffc03cf0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
  202. #define USB_DMA7COUNTHIGH 0xffc03cf4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
  203. /* Bit masks for USB_FADDR */
  204. #define FUNCTION_ADDRESS 0x7f /* Function address */
  205. /* Bit masks for USB_POWER */
  206. #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
  207. #define nENABLE_SUSPENDM 0x0
  208. #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
  209. #define nSUSPEND_MODE 0x0
  210. #define RESUME_MODE 0x4 /* DMA Mode */
  211. #define nRESUME_MODE 0x0
  212. #define RESET 0x8 /* Reset indicator */
  213. #define nRESET 0x0
  214. #define HS_MODE 0x10 /* High Speed mode indicator */
  215. #define nHS_MODE 0x0
  216. #define HS_ENABLE 0x20 /* high Speed Enable */
  217. #define nHS_ENABLE 0x0
  218. #define SOFT_CONN 0x40 /* Soft connect */
  219. #define nSOFT_CONN 0x0
  220. #define ISO_UPDATE 0x80 /* Isochronous update */
  221. #define nISO_UPDATE 0x0
  222. /* Bit masks for USB_INTRTX */
  223. #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
  224. #define nEP0_TX 0x0
  225. #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
  226. #define nEP1_TX 0x0
  227. #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
  228. #define nEP2_TX 0x0
  229. #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
  230. #define nEP3_TX 0x0
  231. #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
  232. #define nEP4_TX 0x0
  233. #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
  234. #define nEP5_TX 0x0
  235. #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
  236. #define nEP6_TX 0x0
  237. #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
  238. #define nEP7_TX 0x0
  239. /* Bit masks for USB_INTRRX */
  240. #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
  241. #define nEP1_RX 0x0
  242. #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
  243. #define nEP2_RX 0x0
  244. #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
  245. #define nEP3_RX 0x0
  246. #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
  247. #define nEP4_RX 0x0
  248. #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
  249. #define nEP5_RX 0x0
  250. #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
  251. #define nEP6_RX 0x0
  252. #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
  253. #define nEP7_RX 0x0
  254. /* Bit masks for USB_INTRTXE */
  255. #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
  256. #define nEP0_TX_E 0x0
  257. #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
  258. #define nEP1_TX_E 0x0
  259. #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
  260. #define nEP2_TX_E 0x0
  261. #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
  262. #define nEP3_TX_E 0x0
  263. #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
  264. #define nEP4_TX_E 0x0
  265. #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
  266. #define nEP5_TX_E 0x0
  267. #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
  268. #define nEP6_TX_E 0x0
  269. #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
  270. #define nEP7_TX_E 0x0
  271. /* Bit masks for USB_INTRRXE */
  272. #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
  273. #define nEP1_RX_E 0x0
  274. #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
  275. #define nEP2_RX_E 0x0
  276. #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
  277. #define nEP3_RX_E 0x0
  278. #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
  279. #define nEP4_RX_E 0x0
  280. #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
  281. #define nEP5_RX_E 0x0
  282. #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
  283. #define nEP6_RX_E 0x0
  284. #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
  285. #define nEP7_RX_E 0x0
  286. /* Bit masks for USB_INTRUSB */
  287. #define SUSPEND_B 0x1 /* Suspend indicator */
  288. #define nSUSPEND_B 0x0
  289. #define RESUME_B 0x2 /* Resume indicator */
  290. #define nRESUME_B 0x0
  291. #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
  292. #define nRESET_OR_BABLE_B 0x0
  293. #define SOF_B 0x8 /* Start of frame */
  294. #define nSOF_B 0x0
  295. #define CONN_B 0x10 /* Connection indicator */
  296. #define nCONN_B 0x0
  297. #define DISCON_B 0x20 /* Disconnect indicator */
  298. #define nDISCON_B 0x0
  299. #define SESSION_REQ_B 0x40 /* Session Request */
  300. #define nSESSION_REQ_B 0x0
  301. #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
  302. #define nVBUS_ERROR_B 0x0
  303. /* Bit masks for USB_INTRUSBE */
  304. #define SUSPEND_BE 0x1 /* Suspend indicator int enable */
  305. #define nSUSPEND_BE 0x0
  306. #define RESUME_BE 0x2 /* Resume indicator int enable */
  307. #define nRESUME_BE 0x0
  308. #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
  309. #define nRESET_OR_BABLE_BE 0x0
  310. #define SOF_BE 0x8 /* Start of frame int enable */
  311. #define nSOF_BE 0x0
  312. #define CONN_BE 0x10 /* Connection indicator int enable */
  313. #define nCONN_BE 0x0
  314. #define DISCON_BE 0x20 /* Disconnect indicator int enable */
  315. #define nDISCON_BE 0x0
  316. #define SESSION_REQ_BE 0x40 /* Session Request int enable */
  317. #define nSESSION_REQ_BE 0x0
  318. #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
  319. #define nVBUS_ERROR_BE 0x0
  320. /* Bit masks for USB_FRAME */
  321. #define FRAME_NUMBER 0x7ff /* Frame number */
  322. /* Bit masks for USB_INDEX */
  323. #define SELECTED_ENDPOINT 0xf /* selected endpoint */
  324. /* Bit masks for USB_GLOBAL_CTL */
  325. #define GLOBAL_ENA 0x1 /* enables USB module */
  326. #define nGLOBAL_ENA 0x0
  327. #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
  328. #define nEP1_TX_ENA 0x0
  329. #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
  330. #define nEP2_TX_ENA 0x0
  331. #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
  332. #define nEP3_TX_ENA 0x0
  333. #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
  334. #define nEP4_TX_ENA 0x0
  335. #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
  336. #define nEP5_TX_ENA 0x0
  337. #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
  338. #define nEP6_TX_ENA 0x0
  339. #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
  340. #define nEP7_TX_ENA 0x0
  341. #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
  342. #define nEP1_RX_ENA 0x0
  343. #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
  344. #define nEP2_RX_ENA 0x0
  345. #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
  346. #define nEP3_RX_ENA 0x0
  347. #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
  348. #define nEP4_RX_ENA 0x0
  349. #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
  350. #define nEP5_RX_ENA 0x0
  351. #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
  352. #define nEP6_RX_ENA 0x0
  353. #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
  354. #define nEP7_RX_ENA 0x0
  355. /* Bit masks for USB_OTG_DEV_CTL */
  356. #define SESSION 0x1 /* session indicator */
  357. #define nSESSION 0x0
  358. #define HOST_REQ 0x2 /* Host negotiation request */
  359. #define nHOST_REQ 0x0
  360. #define HOST_MODE 0x4 /* indicates USBDRC is a host */
  361. #define nHOST_MODE 0x0
  362. #define VBUS0 0x8 /* Vbus level indicator[0] */
  363. #define nVBUS0 0x0
  364. #define VBUS1 0x10 /* Vbus level indicator[1] */
  365. #define nVBUS1 0x0
  366. #define LSDEV 0x20 /* Low-speed indicator */
  367. #define nLSDEV 0x0
  368. #define FSDEV 0x40 /* Full or High-speed indicator */
  369. #define nFSDEV 0x0
  370. #define B_DEVICE 0x80 /* A' or 'B' device indicator */
  371. #define nB_DEVICE 0x0
  372. /* Bit masks for USB_OTG_VBUS_IRQ */
  373. #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
  374. #define nDRIVE_VBUS_ON 0x0
  375. #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
  376. #define nDRIVE_VBUS_OFF 0x0
  377. #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
  378. #define nCHRG_VBUS_START 0x0
  379. #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
  380. #define nCHRG_VBUS_END 0x0
  381. #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
  382. #define nDISCHRG_VBUS_START 0x0
  383. #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
  384. #define nDISCHRG_VBUS_END 0x0
  385. /* Bit masks for USB_OTG_VBUS_MASK */
  386. #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
  387. #define nDRIVE_VBUS_ON_ENA 0x0
  388. #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
  389. #define nDRIVE_VBUS_OFF_ENA 0x0
  390. #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
  391. #define nCHRG_VBUS_START_ENA 0x0
  392. #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
  393. #define nCHRG_VBUS_END_ENA 0x0
  394. #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
  395. #define nDISCHRG_VBUS_START_ENA 0x0