r8a66597.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /*
  2. * R8A66597 driver platform data
  3. *
  4. * Copyright (C) 2009 Renesas Solutions Corp.
  5. *
  6. * Author : Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; version 2 of the License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. */
  22. #ifndef __LINUX_USB_R8A66597_H
  23. #define __LINUX_USB_R8A66597_H
  24. #define R8A66597_PLATDATA_XTAL_12MHZ 0x01
  25. #define R8A66597_PLATDATA_XTAL_24MHZ 0x02
  26. #define R8A66597_PLATDATA_XTAL_48MHZ 0x03
  27. struct r8a66597_platdata {
  28. /* This callback can control port power instead of DVSTCTR register. */
  29. void (*port_power)(int port, int power);
  30. /* This parameter is for BUSWAIT */
  31. u16 buswait;
  32. /* set one = on chip controller, set zero = external controller */
  33. unsigned on_chip:1;
  34. /* (external controller only) set R8A66597_PLATDATA_XTAL_nnMHZ */
  35. unsigned xtal:2;
  36. /* set one = 3.3V, set zero = 1.5V */
  37. unsigned vif:1;
  38. /* set one = big endian, set zero = little endian */
  39. unsigned endian:1;
  40. /* (external controller only) set one = WR0_N shorted to WR1_N */
  41. unsigned wr0_shorted_to_wr1:1;
  42. /* set one = using SUDMAC */
  43. unsigned sudmac:1;
  44. };
  45. /* Register definitions */
  46. #define SYSCFG0 0x00
  47. #define SYSCFG1 0x02
  48. #define SYSSTS0 0x04
  49. #define SYSSTS1 0x06
  50. #define DVSTCTR0 0x08
  51. #define DVSTCTR1 0x0A
  52. #define TESTMODE 0x0C
  53. #define PINCFG 0x0E
  54. #define DMA0CFG 0x10
  55. #define DMA1CFG 0x12
  56. #define CFIFO 0x14
  57. #define D0FIFO 0x18
  58. #define D1FIFO 0x1C
  59. #define CFIFOSEL 0x20
  60. #define CFIFOCTR 0x22
  61. #define CFIFOSIE 0x24
  62. #define D0FIFOSEL 0x28
  63. #define D0FIFOCTR 0x2A
  64. #define D1FIFOSEL 0x2C
  65. #define D1FIFOCTR 0x2E
  66. #define INTENB0 0x30
  67. #define INTENB1 0x32
  68. #define INTENB2 0x34
  69. #define BRDYENB 0x36
  70. #define NRDYENB 0x38
  71. #define BEMPENB 0x3A
  72. #define SOFCFG 0x3C
  73. #define INTSTS0 0x40
  74. #define INTSTS1 0x42
  75. #define INTSTS2 0x44
  76. #define BRDYSTS 0x46
  77. #define NRDYSTS 0x48
  78. #define BEMPSTS 0x4A
  79. #define FRMNUM 0x4C
  80. #define UFRMNUM 0x4E
  81. #define USBADDR 0x50
  82. #define USBREQ 0x54
  83. #define USBVAL 0x56
  84. #define USBINDX 0x58
  85. #define USBLENG 0x5A
  86. #define DCPCFG 0x5C
  87. #define DCPMAXP 0x5E
  88. #define DCPCTR 0x60
  89. #define PIPESEL 0x64
  90. #define PIPECFG 0x68
  91. #define PIPEBUF 0x6A
  92. #define PIPEMAXP 0x6C
  93. #define PIPEPERI 0x6E
  94. #define PIPE1CTR 0x70
  95. #define PIPE2CTR 0x72
  96. #define PIPE3CTR 0x74
  97. #define PIPE4CTR 0x76
  98. #define PIPE5CTR 0x78
  99. #define PIPE6CTR 0x7A
  100. #define PIPE7CTR 0x7C
  101. #define PIPE8CTR 0x7E
  102. #define PIPE9CTR 0x80
  103. #define PIPE1TRE 0x90
  104. #define PIPE1TRN 0x92
  105. #define PIPE2TRE 0x94
  106. #define PIPE2TRN 0x96
  107. #define PIPE3TRE 0x98
  108. #define PIPE3TRN 0x9A
  109. #define PIPE4TRE 0x9C
  110. #define PIPE4TRN 0x9E
  111. #define PIPE5TRE 0xA0
  112. #define PIPE5TRN 0xA2
  113. #define DEVADD0 0xD0
  114. #define DEVADD1 0xD2
  115. #define DEVADD2 0xD4
  116. #define DEVADD3 0xD6
  117. #define DEVADD4 0xD8
  118. #define DEVADD5 0xDA
  119. #define DEVADD6 0xDC
  120. #define DEVADD7 0xDE
  121. #define DEVADD8 0xE0
  122. #define DEVADD9 0xE2
  123. #define DEVADDA 0xE4
  124. /* System Configuration Control Register */
  125. #define XTAL 0xC000 /* b15-14: Crystal selection */
  126. #define XTAL48 0x8000 /* 48MHz */
  127. #define XTAL24 0x4000 /* 24MHz */
  128. #define XTAL12 0x0000 /* 12MHz */
  129. #define XCKE 0x2000 /* b13: External clock enable */
  130. #define PLLC 0x0800 /* b11: PLL control */
  131. #define SCKE 0x0400 /* b10: USB clock enable */
  132. #define PCSDIS 0x0200 /* b9: not CS wakeup */
  133. #define LPSME 0x0100 /* b8: Low power sleep mode */
  134. #define HSE 0x0080 /* b7: Hi-speed enable */
  135. #define DCFM 0x0040 /* b6: Controller function select */
  136. #define DRPD 0x0020 /* b5: D+/- pull down control */
  137. #define DPRPU 0x0010 /* b4: D+ pull up control */
  138. #define USBE 0x0001 /* b0: USB module operation enable */
  139. /* System Configuration Status Register */
  140. #define OVCBIT 0x8000 /* b15-14: Over-current bit */
  141. #define OVCMON 0xC000 /* b15-14: Over-current monitor */
  142. #define SOFEA 0x0020 /* b5: SOF monitor */
  143. #define IDMON 0x0004 /* b3: ID-pin monitor */
  144. #define LNST 0x0003 /* b1-0: D+, D- line status */
  145. #define SE1 0x0003 /* SE1 */
  146. #define FS_KSTS 0x0002 /* Full-Speed K State */
  147. #define FS_JSTS 0x0001 /* Full-Speed J State */
  148. #define LS_JSTS 0x0002 /* Low-Speed J State */
  149. #define LS_KSTS 0x0001 /* Low-Speed K State */
  150. #define SE0 0x0000 /* SE0 */
  151. /* Device State Control Register */
  152. #define EXTLP0 0x0400 /* b10: External port */
  153. #define VBOUT 0x0200 /* b9: VBUS output */
  154. #define WKUP 0x0100 /* b8: Remote wakeup */
  155. #define RWUPE 0x0080 /* b7: Remote wakeup sense */
  156. #define USBRST 0x0040 /* b6: USB reset enable */
  157. #define RESUME 0x0020 /* b5: Resume enable */
  158. #define UACT 0x0010 /* b4: USB bus enable */
  159. #define RHST 0x0007 /* b1-0: Reset handshake status */
  160. #define HSPROC 0x0004 /* HS handshake is processing */
  161. #define HSMODE 0x0003 /* Hi-Speed mode */
  162. #define FSMODE 0x0002 /* Full-Speed mode */
  163. #define LSMODE 0x0001 /* Low-Speed mode */
  164. #define UNDECID 0x0000 /* Undecided */
  165. /* Test Mode Register */
  166. #define UTST 0x000F /* b3-0: Test select */
  167. #define H_TST_PACKET 0x000C /* HOST TEST Packet */
  168. #define H_TST_SE0_NAK 0x000B /* HOST TEST SE0 NAK */
  169. #define H_TST_K 0x000A /* HOST TEST K */
  170. #define H_TST_J 0x0009 /* HOST TEST J */
  171. #define H_TST_NORMAL 0x0000 /* HOST Normal Mode */
  172. #define P_TST_PACKET 0x0004 /* PERI TEST Packet */
  173. #define P_TST_SE0_NAK 0x0003 /* PERI TEST SE0 NAK */
  174. #define P_TST_K 0x0002 /* PERI TEST K */
  175. #define P_TST_J 0x0001 /* PERI TEST J */
  176. #define P_TST_NORMAL 0x0000 /* PERI Normal Mode */
  177. /* Data Pin Configuration Register */
  178. #define LDRV 0x8000 /* b15: Drive Current Adjust */
  179. #define VIF1 0x0000 /* VIF = 1.8V */
  180. #define VIF3 0x8000 /* VIF = 3.3V */
  181. #define INTA 0x0001 /* b1: USB INT-pin active */
  182. /* DMAx Pin Configuration Register */
  183. #define DREQA 0x4000 /* b14: Dreq active select */
  184. #define BURST 0x2000 /* b13: Burst mode */
  185. #define DACKA 0x0400 /* b10: Dack active select */
  186. #define DFORM 0x0380 /* b9-7: DMA mode select */
  187. #define CPU_ADR_RD_WR 0x0000 /* Address + RD/WR mode (CPU bus) */
  188. #define CPU_DACK_RD_WR 0x0100 /* DACK + RD/WR mode (CPU bus) */
  189. #define CPU_DACK_ONLY 0x0180 /* DACK only mode (CPU bus) */
  190. #define SPLIT_DACK_ONLY 0x0200 /* DACK only mode (SPLIT bus) */
  191. #define DENDA 0x0040 /* b6: Dend active select */
  192. #define PKTM 0x0020 /* b5: Packet mode */
  193. #define DENDE 0x0010 /* b4: Dend enable */
  194. #define OBUS 0x0004 /* b2: OUTbus mode */
  195. /* CFIFO/DxFIFO Port Select Register */
  196. #define RCNT 0x8000 /* b15: Read count mode */
  197. #define REW 0x4000 /* b14: Buffer rewind */
  198. #define DCLRM 0x2000 /* b13: DMA buffer clear mode */
  199. #define DREQE 0x1000 /* b12: DREQ output enable */
  200. #define MBW_8 0x0000 /* 8bit */
  201. #define MBW_16 0x0400 /* 16bit */
  202. #define MBW_32 0x0800 /* 32bit */
  203. #define BIGEND 0x0100 /* b8: Big endian mode */
  204. #define BYTE_LITTLE 0x0000 /* little dendian */
  205. #define BYTE_BIG 0x0100 /* big endifan */
  206. #define ISEL 0x0020 /* b5: DCP FIFO port direction select */
  207. #define CURPIPE 0x000F /* b2-0: PIPE select */
  208. /* CFIFO/DxFIFO Port Control Register */
  209. #define BVAL 0x8000 /* b15: Buffer valid flag */
  210. #define BCLR 0x4000 /* b14: Buffer clear */
  211. #define FRDY 0x2000 /* b13: FIFO ready */
  212. #define DTLN 0x0FFF /* b11-0: FIFO received data length */
  213. /* Interrupt Enable Register 0 */
  214. #define VBSE 0x8000 /* b15: VBUS interrupt */
  215. #define RSME 0x4000 /* b14: Resume interrupt */
  216. #define SOFE 0x2000 /* b13: Frame update interrupt */
  217. #define DVSE 0x1000 /* b12: Device state transition interrupt */
  218. #define CTRE 0x0800 /* b11: Control transfer stage transition interrupt */
  219. #define BEMPE 0x0400 /* b10: Buffer empty interrupt */
  220. #define NRDYE 0x0200 /* b9: Buffer not ready interrupt */
  221. #define BRDYE 0x0100 /* b8: Buffer ready interrupt */
  222. /* Interrupt Enable Register 1 */
  223. #define OVRCRE 0x8000 /* b15: Over-current interrupt */
  224. #define BCHGE 0x4000 /* b14: USB us chenge interrupt */
  225. #define DTCHE 0x1000 /* b12: Detach sense interrupt */
  226. #define ATTCHE 0x0800 /* b11: Attach sense interrupt */
  227. #define EOFERRE 0x0040 /* b6: EOF error interrupt */
  228. #define SIGNE 0x0020 /* b5: SETUP IGNORE interrupt */
  229. #define SACKE 0x0010 /* b4: SETUP ACK interrupt */
  230. /* BRDY Interrupt Enable/Status Register */
  231. #define BRDY9 0x0200 /* b9: PIPE9 */
  232. #define BRDY8 0x0100 /* b8: PIPE8 */
  233. #define BRDY7 0x0080 /* b7: PIPE7 */
  234. #define BRDY6 0x0040 /* b6: PIPE6 */
  235. #define BRDY5 0x0020 /* b5: PIPE5 */
  236. #define BRDY4 0x0010 /* b4: PIPE4 */
  237. #define BRDY3 0x0008 /* b3: PIPE3 */
  238. #define BRDY2 0x0004 /* b2: PIPE2 */
  239. #define BRDY1 0x0002 /* b1: PIPE1 */
  240. #define BRDY0 0x0001 /* b1: PIPE0 */
  241. /* NRDY Interrupt Enable/Status Register */
  242. #define NRDY9 0x0200 /* b9: PIPE9 */
  243. #define NRDY8 0x0100 /* b8: PIPE8 */
  244. #define NRDY7 0x0080 /* b7: PIPE7 */
  245. #define NRDY6 0x0040 /* b6: PIPE6 */
  246. #define NRDY5 0x0020 /* b5: PIPE5 */
  247. #define NRDY4 0x0010 /* b4: PIPE4 */
  248. #define NRDY3 0x0008 /* b3: PIPE3 */
  249. #define NRDY2 0x0004 /* b2: PIPE2 */
  250. #define NRDY1 0x0002 /* b1: PIPE1 */
  251. #define NRDY0 0x0001 /* b1: PIPE0 */
  252. /* BEMP Interrupt Enable/Status Register */
  253. #define BEMP9 0x0200 /* b9: PIPE9 */
  254. #define BEMP8 0x0100 /* b8: PIPE8 */
  255. #define BEMP7 0x0080 /* b7: PIPE7 */
  256. #define BEMP6 0x0040 /* b6: PIPE6 */
  257. #define BEMP5 0x0020 /* b5: PIPE5 */
  258. #define BEMP4 0x0010 /* b4: PIPE4 */
  259. #define BEMP3 0x0008 /* b3: PIPE3 */
  260. #define BEMP2 0x0004 /* b2: PIPE2 */
  261. #define BEMP1 0x0002 /* b1: PIPE1 */
  262. #define BEMP0 0x0001 /* b0: PIPE0 */
  263. /* SOF Pin Configuration Register */
  264. #define TRNENSEL 0x0100 /* b8: Select transaction enable period */
  265. #define BRDYM 0x0040 /* b6: BRDY clear timing */
  266. #define INTL 0x0020 /* b5: Interrupt sense select */
  267. #define EDGESTS 0x0010 /* b4: */
  268. #define SOFMODE 0x000C /* b3-2: SOF pin select */
  269. #define SOF_125US 0x0008 /* SOF OUT 125us Frame Signal */
  270. #define SOF_1MS 0x0004 /* SOF OUT 1ms Frame Signal */
  271. #define SOF_DISABLE 0x0000 /* SOF OUT Disable */
  272. /* Interrupt Status Register 0 */
  273. #define VBINT 0x8000 /* b15: VBUS interrupt */
  274. #define RESM 0x4000 /* b14: Resume interrupt */
  275. #define SOFR 0x2000 /* b13: SOF frame update interrupt */
  276. #define DVST 0x1000 /* b12: Device state transition interrupt */
  277. #define CTRT 0x0800 /* b11: Control transfer stage transition interrupt */
  278. #define BEMP 0x0400 /* b10: Buffer empty interrupt */
  279. #define NRDY 0x0200 /* b9: Buffer not ready interrupt */
  280. #define BRDY 0x0100 /* b8: Buffer ready interrupt */
  281. #define VBSTS 0x0080 /* b7: VBUS input port */
  282. #define DVSQ 0x0070 /* b6-4: Device state */
  283. #define DS_SPD_CNFG 0x0070 /* Suspend Configured */
  284. #define DS_SPD_ADDR 0x0060 /* Suspend Address */
  285. #define DS_SPD_DFLT 0x0050 /* Suspend Default */
  286. #define DS_SPD_POWR 0x0040 /* Suspend Powered */
  287. #define DS_SUSP 0x0040 /* Suspend */
  288. #define DS_CNFG 0x0030 /* Configured */
  289. #define DS_ADDS 0x0020 /* Address */
  290. #define DS_DFLT 0x0010 /* Default */
  291. #define DS_POWR 0x0000 /* Powered */
  292. #define DVSQS 0x0030 /* b5-4: Device state */
  293. #define VALID 0x0008 /* b3: Setup packet detected flag */
  294. #define CTSQ 0x0007 /* b2-0: Control transfer stage */
  295. #define CS_SQER 0x0006 /* Sequence error */
  296. #define CS_WRND 0x0005 /* Control write nodata status stage */
  297. #define CS_WRSS 0x0004 /* Control write status stage */
  298. #define CS_WRDS 0x0003 /* Control write data stage */
  299. #define CS_RDSS 0x0002 /* Control read status stage */
  300. #define CS_RDDS 0x0001 /* Control read data stage */
  301. #define CS_IDST 0x0000 /* Idle or setup stage */
  302. /* Interrupt Status Register 1 */
  303. #define OVRCR 0x8000 /* b15: Over-current interrupt */
  304. #define BCHG 0x4000 /* b14: USB bus chenge interrupt */
  305. #define DTCH 0x1000 /* b12: Detach sense interrupt */
  306. #define ATTCH 0x0800 /* b11: Attach sense interrupt */
  307. #define EOFERR 0x0040 /* b6: EOF-error interrupt */
  308. #define SIGN 0x0020 /* b5: Setup ignore interrupt */
  309. #define SACK 0x0010 /* b4: Setup acknowledge interrupt */
  310. /* Frame Number Register */
  311. #define OVRN 0x8000 /* b15: Overrun error */
  312. #define CRCE 0x4000 /* b14: Received data error */
  313. #define FRNM 0x07FF /* b10-0: Frame number */
  314. /* Micro Frame Number Register */
  315. #define UFRNM 0x0007 /* b2-0: Micro frame number */
  316. /* Default Control Pipe Maxpacket Size Register */
  317. /* Pipe Maxpacket Size Register */
  318. #define DEVSEL 0xF000 /* b15-14: Device address select */
  319. #define MAXP 0x007F /* b6-0: Maxpacket size of default control pipe */
  320. /* Default Control Pipe Control Register */
  321. #define BSTS 0x8000 /* b15: Buffer status */
  322. #define SUREQ 0x4000 /* b14: Send USB request */
  323. #define CSCLR 0x2000 /* b13: complete-split status clear */
  324. #define CSSTS 0x1000 /* b12: complete-split status */
  325. #define SUREQCLR 0x0800 /* b11: stop setup request */
  326. #define SQCLR 0x0100 /* b8: Sequence toggle bit clear */
  327. #define SQSET 0x0080 /* b7: Sequence toggle bit set */
  328. #define SQMON 0x0040 /* b6: Sequence toggle bit monitor */
  329. #define PBUSY 0x0020 /* b5: pipe busy */
  330. #define PINGE 0x0010 /* b4: ping enable */
  331. #define CCPL 0x0004 /* b2: Enable control transfer complete */
  332. #define PID 0x0003 /* b1-0: Response PID */
  333. #define PID_STALL11 0x0003 /* STALL */
  334. #define PID_STALL 0x0002 /* STALL */
  335. #define PID_BUF 0x0001 /* BUF */
  336. #define PID_NAK 0x0000 /* NAK */
  337. /* Pipe Window Select Register */
  338. #define PIPENM 0x0007 /* b2-0: Pipe select */
  339. /* Pipe Configuration Register */
  340. #define R8A66597_TYP 0xC000 /* b15-14: Transfer type */
  341. #define R8A66597_ISO 0xC000 /* Isochronous */
  342. #define R8A66597_INT 0x8000 /* Interrupt */
  343. #define R8A66597_BULK 0x4000 /* Bulk */
  344. #define R8A66597_BFRE 0x0400 /* b10: Buffer ready interrupt mode select */
  345. #define R8A66597_DBLB 0x0200 /* b9: Double buffer mode select */
  346. #define R8A66597_CNTMD 0x0100 /* b8: Continuous transfer mode select */
  347. #define R8A66597_SHTNAK 0x0080 /* b7: Transfer end NAK */
  348. #define R8A66597_DIR 0x0010 /* b4: Transfer direction select */
  349. #define R8A66597_EPNUM 0x000F /* b3-0: Eendpoint number select */
  350. /* Pipe Buffer Configuration Register */
  351. #define BUFSIZE 0x7C00 /* b14-10: Pipe buffer size */
  352. #define BUFNMB 0x007F /* b6-0: Pipe buffer number */
  353. #define PIPE0BUF 256
  354. #define PIPExBUF 64
  355. /* Pipe Maxpacket Size Register */
  356. #define MXPS 0x07FF /* b10-0: Maxpacket size */
  357. /* Pipe Cycle Configuration Register */
  358. #define IFIS 0x1000 /* b12: Isochronous in-buffer flush mode select */
  359. #define IITV 0x0007 /* b2-0: Isochronous interval */
  360. /* Pipex Control Register */
  361. #define BSTS 0x8000 /* b15: Buffer status */
  362. #define INBUFM 0x4000 /* b14: IN buffer monitor (Only for PIPE1 to 5) */
  363. #define CSCLR 0x2000 /* b13: complete-split status clear */
  364. #define CSSTS 0x1000 /* b12: complete-split status */
  365. #define ATREPM 0x0400 /* b10: Auto repeat mode */
  366. #define ACLRM 0x0200 /* b9: Out buffer auto clear mode */
  367. #define SQCLR 0x0100 /* b8: Sequence toggle bit clear */
  368. #define SQSET 0x0080 /* b7: Sequence toggle bit set */
  369. #define SQMON 0x0040 /* b6: Sequence toggle bit monitor */
  370. #define PBUSY 0x0020 /* b5: pipe busy */
  371. #define PID 0x0003 /* b1-0: Response PID */
  372. /* PIPExTRE */
  373. #define TRENB 0x0200 /* b9: Transaction counter enable */
  374. #define TRCLR 0x0100 /* b8: Transaction counter clear */
  375. /* PIPExTRN */
  376. #define TRNCNT 0xFFFF /* b15-0: Transaction counter */
  377. /* DEVADDx */
  378. #define UPPHUB 0x7800
  379. #define HUBPORT 0x0700
  380. #define USBSPD 0x00C0
  381. #define RTPORT 0x0001
  382. /* SUDMAC registers */
  383. #define CH0CFG 0x00
  384. #define CH1CFG 0x04
  385. #define CH0BA 0x10
  386. #define CH1BA 0x14
  387. #define CH0BBC 0x18
  388. #define CH1BBC 0x1C
  389. #define CH0CA 0x20
  390. #define CH1CA 0x24
  391. #define CH0CBC 0x28
  392. #define CH1CBC 0x2C
  393. #define CH0DEN 0x30
  394. #define CH1DEN 0x34
  395. #define DSTSCLR 0x38
  396. #define DBUFCTRL 0x3C
  397. #define DINTCTRL 0x40
  398. #define DINTSTS 0x44
  399. #define DINTSTSCLR 0x48
  400. #define CH0SHCTRL 0x50
  401. #define CH1SHCTRL 0x54
  402. /* SUDMAC Configuration Registers */
  403. #define SENDBUFM 0x1000 /* b12: Transmit Buffer Mode */
  404. #define RCVENDM 0x0100 /* b8: Receive Data Transfer End Mode */
  405. #define LBA_WAIT 0x0030 /* b5-4: Local Bus Access Wait */
  406. /* DMA Enable Registers */
  407. #define DEN 0x0001 /* b1: DMA Transfer Enable */
  408. /* DMA Status Clear Register */
  409. #define CH1STCLR 0x0002 /* b2: Ch1 DMA Status Clear */
  410. #define CH0STCLR 0x0001 /* b1: Ch0 DMA Status Clear */
  411. /* DMA Buffer Control Register */
  412. #define CH1BUFW 0x0200 /* b9: Ch1 DMA Buffer Data Transfer Enable */
  413. #define CH0BUFW 0x0100 /* b8: Ch0 DMA Buffer Data Transfer Enable */
  414. #define CH1BUFS 0x0002 /* b2: Ch1 DMA Buffer Data Status */
  415. #define CH0BUFS 0x0001 /* b1: Ch0 DMA Buffer Data Status */
  416. /* DMA Interrupt Control Register */
  417. #define CH1ERRE 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Enable */
  418. #define CH0ERRE 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Enable */
  419. #define CH1ENDE 0x0002 /* b2: Ch1 DMA Transfer End Int Enable */
  420. #define CH0ENDE 0x0001 /* b1: Ch0 DMA Transfer End Int Enable */
  421. /* DMA Interrupt Status Register */
  422. #define CH1ERRS 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Status */
  423. #define CH0ERRS 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Status */
  424. #define CH1ENDS 0x0002 /* b2: Ch1 DMA Transfer End Int Status */
  425. #define CH0ENDS 0x0001 /* b1: Ch0 DMA Transfer End Int Status */
  426. /* DMA Interrupt Status Clear Register */
  427. #define CH1ERRC 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Stat Clear */
  428. #define CH0ERRC 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Stat Clear */
  429. #define CH1ENDC 0x0002 /* b2: Ch1 DMA Transfer End Int Stat Clear */
  430. #define CH0ENDC 0x0001 /* b1: Ch0 DMA Transfer End Int Stat Clear */
  431. #endif /* __LINUX_USB_R8A66597_H */