musb_regs.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. /*
  2. * MUSB OTG driver register defines
  3. *
  4. * Copyright 2005 Mentor Graphics Corporation
  5. * Copyright (C) 2005-2006 by Texas Instruments
  6. * Copyright (C) 2006-2007 Nokia Corporation
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * 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
  20. * 02110-1301 USA
  21. *
  22. * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  23. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  24. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  25. * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  27. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  28. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  29. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  31. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. */
  34. #ifndef __MUSB_REGS_H__
  35. #define __MUSB_REGS_H__
  36. #define MUSB_EP0_FIFOSIZE 64 /* This is non-configurable */
  37. /*
  38. * MUSB Register bits
  39. */
  40. /* CODA PORTING */
  41. /* DEVCTL */
  42. #define MUSB_DEVCTL_BDEVICE 0x80
  43. #define MUSB_DEVCTL_FSDEV 0x40
  44. #define MUSB_DEVCTL_LSDEV 0x20
  45. #define MUSB_DEVCTL_VBUS 0x18
  46. #define MUSB_DEVCTL_VBUS_SHIFT 3
  47. #define MUSB_DEVCTL_HM 0x04
  48. #define MUSB_DEVCTL_HR 0x02
  49. #define MUSB_DEVCTL_SESSION 0x01
  50. /* MUSB ULPI VBUSCONTROL */
  51. #define MUSB_ULPI_USE_EXTVBUS 0x01
  52. #define MUSB_ULPI_USE_EXTVBUSIND 0x02
  53. /* ULPI_REG_CONTROL */
  54. #define MUSB_ULPI_REG_REQ (1 << 0)
  55. #define MUSB_ULPI_REG_CMPLT (1 << 1)
  56. #define MUSB_ULPI_RDN_WR (1 << 2)
  57. /* Allocate for double-packet buffering (effectively doubles assigned _SIZE) */
  58. #define MUSB_FIFOSZ_DPB 0x10
  59. /* Allocation size (8, 16, 32, ... 4096) */
  60. #define MUSB_FIFOSZ_SIZE 0x0f
  61. /* CSR0 in Peripheral mode */
  62. #define MUSB_CSR0_P_DATAEND 0x0008
  63. /* TxType/RxType */
  64. #define MUSB_TYPE_SPEED 0xc0
  65. #define MUSB_TYPE_SPEED_SHIFT 6
  66. #define MUSB_TYPE_PROTO 0x30 /* Implicitly zero for ep0 */
  67. #define MUSB_TYPE_PROTO_SHIFT 4
  68. #define MUSB_TYPE_REMOTE_END 0xf /* Implicitly zero for ep0 */
  69. /* CONFIGDATA */
  70. #define MUSB_CONFIGDATA_MPRXE 0x80 /* Auto bulk pkt combining */
  71. #define MUSB_CONFIGDATA_MPTXE 0x40 /* Auto bulk pkt splitting */
  72. #define MUSB_CONFIGDATA_BIGENDIAN 0x20
  73. #define MUSB_CONFIGDATA_HBRXE 0x10 /* HB-ISO for RX */
  74. #define MUSB_CONFIGDATA_HBTXE 0x08 /* HB-ISO for TX */
  75. #define MUSB_CONFIGDATA_DYNFIFO 0x04 /* Dynamic FIFO sizing */
  76. #define MUSB_CONFIGDATA_SOFTCONE 0x02 /* SoftConnect */
  77. #define MUSB_CONFIGDATA_UTMIDW 0x01 /* Data width 0/1 => 8/16bits */
  78. #ifndef CONFIG_BLACKFIN
  79. /*
  80. * Common USB registers
  81. */
  82. #define MUSB_FADDR 0x00 /* 8-bit */
  83. #define MUSB_POWER 0x01 /* 8-bit */
  84. #define MUSB_INTRTX 0x02 /* 16-bit */
  85. #define MUSB_INTRRX 0x04
  86. #define MUSB_INTRTXE 0x06
  87. #define MUSB_INTRRXE 0x08
  88. #define MUSB_INTRUSB 0x0A /* 8 bit */
  89. #define MUSB_INTRUSBE 0x0B /* 8 bit */
  90. #define MUSB_FRAME 0x0C
  91. #define MUSB_INDEX 0x0E /* 8 bit */
  92. #define MUSB_TESTMODE 0x0F /* 8 bit */
  93. /* Get offset for a given FIFO from musb->mregs */
  94. #if defined(CONFIG_USB_MUSB_TUSB6010) || \
  95. defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
  96. #define MUSB_FIFO_OFFSET(epnum) (0x200 + ((epnum) * 0x20))
  97. #else
  98. #define MUSB_FIFO_OFFSET(epnum) (U3D_FIFO0 + ((epnum) * 0x10))
  99. #endif
  100. /*
  101. * Additional Control Registers
  102. */
  103. #define MUSB_DEVCTL 0x60 /* 8 bit */
  104. /* These are always controlled through the INDEX register */
  105. #define MUSB_TXFIFOSZ 0x62 /* 8-bit (see masks) */
  106. #define MUSB_RXFIFOSZ 0x63 /* 8-bit (see masks) */
  107. #define MUSB_TXFIFOADD 0x64 /* 16-bit offset shifted right 3 */
  108. #define MUSB_RXFIFOADD 0x66 /* 16-bit offset shifted right 3 */
  109. /* REVISIT: vctrl/vstatus: optional vendor utmi+phy register at 0x68 */
  110. #define MUSB_HWVERS 0x6C /* 8 bit */
  111. #define MUSB_ULPI_BUSCONTROL 0x70 /* 8 bit */
  112. #define MUSB_ULPI_INT_MASK 0x72 /* 8 bit */
  113. #define MUSB_ULPI_INT_SRC 0x73 /* 8 bit */
  114. #define MUSB_ULPI_REG_DATA 0x74 /* 8 bit */
  115. #define MUSB_ULPI_REG_ADDR 0x75 /* 8 bit */
  116. #define MUSB_ULPI_REG_CONTROL 0x76 /* 8 bit */
  117. #define MUSB_ULPI_RAW_DATA 0x77 /* 8 bit */
  118. #define MUSB_EPINFO 0x78 /* 8 bit */
  119. #define MUSB_RAMINFO 0x79 /* 8 bit */
  120. #define MUSB_LINKINFO 0x7a /* 8 bit */
  121. #define MUSB_VPLEN 0x7b /* 8 bit */
  122. #define MUSB_HS_EOF1 0x7c /* 8 bit */
  123. #define MUSB_FS_EOF1 0x7d /* 8 bit */
  124. #define MUSB_LS_EOF1 0x7e /* 8 bit */
  125. /* Offsets to endpoint registers */
  126. #define MUSB_TXMAXP 0x00
  127. #define MUSB_TXCSR 0x02
  128. #define MUSB_CSR0 MUSB_TXCSR /* Re-used for EP0 */
  129. #define MUSB_RXMAXP 0x04
  130. #define MUSB_RXCSR 0x06
  131. #define MUSB_RXCOUNT 0x08
  132. #define MUSB_COUNT0 MUSB_RXCOUNT /* Re-used for EP0 */
  133. #define MUSB_TXTYPE 0x0A
  134. #define MUSB_TYPE0 MUSB_TXTYPE /* Re-used for EP0 */
  135. #define MUSB_TXINTERVAL 0x0B
  136. #define MUSB_NAKLIMIT0 MUSB_TXINTERVAL /* Re-used for EP0 */
  137. #define MUSB_RXTYPE 0x0C
  138. #define MUSB_RXINTERVAL 0x0D
  139. #define MUSB_FIFOSIZE 0x0F
  140. #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */
  141. /* Offsets to endpoint registers in indexed model (using INDEX register) */
  142. #define MUSB_INDEXED_OFFSET(_epnum, _offset) \
  143. (0x10 + (_offset))
  144. /* Offsets to endpoint registers in flat models */
  145. #define MUSB_FLAT_OFFSET(_epnum, _offset) \
  146. (0x100 + (0x10*(_epnum)) + (_offset))
  147. #if defined(CONFIG_USB_MUSB_TUSB6010) || \
  148. defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
  149. /* TUSB6010 EP0 configuration register is special */
  150. #define MUSB_TUSB_OFFSET(_epnum, _offset) \
  151. (0x10 + _offset)
  152. #include "tusb6010.h" /* Needed "only" for TUSB_EP0_CONF */
  153. #endif
  154. #define MUSB_TXCSR_MODE 0x2000
  155. /* "bus control"/target registers, for host side multipoint (external hubs) */
  156. #define MUSB_TXFUNCADDR 0x00
  157. #define MUSB_TXHUBADDR 0x02
  158. #define MUSB_TXHUBPORT 0x03
  159. #define MUSB_RXFUNCADDR 0x04
  160. #define MUSB_RXHUBADDR 0x06
  161. #define MUSB_RXHUBPORT 0x07
  162. #define MUSB_BUSCTL_OFFSET(_epnum, _offset) \
  163. (0x80 + (8*(_epnum)) + (_offset))
  164. static inline void musb_write_txfifosz(void __iomem *mbase, u8 c_size)
  165. {
  166. musb_writeb(mbase, MUSB_TXFIFOSZ, c_size);
  167. }
  168. static inline void musb_write_txfifoadd(void __iomem *mbase, u16 c_off)
  169. {
  170. musb_writew(mbase, MUSB_TXFIFOADD, c_off);
  171. }
  172. static inline void musb_write_rxfifosz(void __iomem *mbase, u8 c_size)
  173. {
  174. musb_writeb(mbase, MUSB_RXFIFOSZ, c_size);
  175. }
  176. static inline void musb_write_rxfifoadd(void __iomem *mbase, u16 c_off)
  177. {
  178. musb_writew(mbase, MUSB_RXFIFOADD, c_off);
  179. }
  180. static inline void musb_write_ulpi_buscontrol(void __iomem *mbase, u8 val)
  181. {
  182. musb_writeb(mbase, MUSB_ULPI_BUSCONTROL, val);
  183. }
  184. static inline u8 musb_read_txfifosz(void __iomem *mbase)
  185. {
  186. return musb_readb(mbase, MUSB_TXFIFOSZ);
  187. }
  188. static inline u16 musb_read_txfifoadd(void __iomem *mbase)
  189. {
  190. return musb_readw(mbase, MUSB_TXFIFOADD);
  191. }
  192. static inline u8 musb_read_rxfifosz(void __iomem *mbase)
  193. {
  194. return musb_readb(mbase, MUSB_RXFIFOSZ);
  195. }
  196. static inline u16 musb_read_rxfifoadd(void __iomem *mbase)
  197. {
  198. return musb_readw(mbase, MUSB_RXFIFOADD);
  199. }
  200. static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase)
  201. {
  202. return musb_readb(mbase, MUSB_ULPI_BUSCONTROL);
  203. }
  204. static inline u8 musb_read_configdata(void __iomem *mbase)
  205. {
  206. musb_writeb(mbase, MUSB_INDEX, 0);
  207. return musb_readb(mbase, 0x10 + MUSB_CONFIGDATA);
  208. }
  209. static inline u16 musb_read_hwvers(void __iomem *mbase)
  210. {
  211. return musb_readw(mbase, MUSB_HWVERS);
  212. }
  213. static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase)
  214. {
  215. return MUSB_BUSCTL_OFFSET(i, 0) + mbase;
  216. }
  217. static inline void musb_write_rxfunaddr(void __iomem *ep_target_regs, u8 qh_addr_reg)
  218. {
  219. musb_writeb(ep_target_regs, MUSB_RXFUNCADDR, qh_addr_reg);
  220. }
  221. static inline void musb_write_rxhubaddr(void __iomem *ep_target_regs, u8 qh_h_addr_reg)
  222. {
  223. musb_writeb(ep_target_regs, MUSB_RXHUBADDR, qh_h_addr_reg);
  224. }
  225. static inline void musb_write_rxhubport(void __iomem *ep_target_regs, u8 qh_h_port_reg)
  226. {
  227. musb_writeb(ep_target_regs, MUSB_RXHUBPORT, qh_h_port_reg);
  228. }
  229. static inline void musb_write_txfunaddr(void __iomem *mbase, u8 epnum, u8 qh_addr_reg)
  230. {
  231. musb_writeb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXFUNCADDR), qh_addr_reg);
  232. }
  233. static inline void musb_write_txhubaddr(void __iomem *mbase, u8 epnum, u8 qh_addr_reg)
  234. {
  235. musb_writeb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBADDR), qh_addr_reg);
  236. }
  237. static inline void musb_write_txhubport(void __iomem *mbase, u8 epnum, u8 qh_h_port_reg)
  238. {
  239. musb_writeb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBPORT), qh_h_port_reg);
  240. }
  241. static inline u8 musb_read_rxfunaddr(void __iomem *mbase, u8 epnum)
  242. {
  243. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_RXFUNCADDR));
  244. }
  245. static inline u8 musb_read_rxhubaddr(void __iomem *mbase, u8 epnum)
  246. {
  247. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_RXHUBADDR));
  248. }
  249. static inline u8 musb_read_rxhubport(void __iomem *mbase, u8 epnum)
  250. {
  251. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_RXHUBPORT));
  252. }
  253. static inline u8 musb_read_txfunaddr(void __iomem *mbase, u8 epnum)
  254. {
  255. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXFUNCADDR));
  256. }
  257. static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum)
  258. {
  259. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBADDR));
  260. }
  261. static inline u8 musb_read_txhubport(void __iomem *mbase, u8 epnum)
  262. {
  263. return musb_readb(mbase, MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBPORT));
  264. }
  265. #else /* CONFIG_BLACKFIN */
  266. #define USB_BASE USB_FADDR
  267. #define USB_OFFSET(reg) (reg - USB_BASE)
  268. /*
  269. * Common USB registers
  270. */
  271. #define MUSB_FADDR USB_OFFSET(USB_FADDR) /* 8-bit */
  272. #define MUSB_POWER USB_OFFSET(USB_POWER) /* 8-bit */
  273. #define MUSB_INTRTX USB_OFFSET(USB_INTRTX) /* 16-bit */
  274. #define MUSB_INTRRX USB_OFFSET(USB_INTRRX)
  275. #define MUSB_INTRTXE USB_OFFSET(USB_INTRTXE)
  276. #define MUSB_INTRRXE USB_OFFSET(USB_INTRRXE)
  277. #define MUSB_INTRUSB USB_OFFSET(USB_INTRUSB) /* 8 bit */
  278. #define MUSB_INTRUSBE USB_OFFSET(USB_INTRUSBE) /* 8 bit */
  279. #define MUSB_FRAME USB_OFFSET(USB_FRAME)
  280. #define MUSB_INDEX USB_OFFSET(USB_INDEX) /* 8 bit */
  281. #define MUSB_TESTMODE USB_OFFSET(USB_TESTMODE) /* 8 bit */
  282. /* Get offset for a given FIFO from musb->mregs */
  283. #define MUSB_FIFO_OFFSET(epnum) \
  284. (USB_OFFSET(USB_EP0_FIFO) + ((epnum) * 8))
  285. /*
  286. * Additional Control Registers
  287. */
  288. #define MUSB_DEVCTL USB_OFFSET(USB_OTG_DEV_CTL) /* 8 bit */
  289. #define MUSB_LINKINFO USB_OFFSET(USB_LINKINFO) /* 8 bit */
  290. #define MUSB_VPLEN USB_OFFSET(USB_VPLEN) /* 8 bit */
  291. #define MUSB_HS_EOF1 USB_OFFSET(USB_HS_EOF1) /* 8 bit */
  292. #define MUSB_FS_EOF1 USB_OFFSET(USB_FS_EOF1) /* 8 bit */
  293. #define MUSB_LS_EOF1 USB_OFFSET(USB_LS_EOF1) /* 8 bit */
  294. /* Offsets to endpoint registers */
  295. #define MUSB_TXMAXP 0x00
  296. #define MUSB_TXCSR 0x04
  297. #define MUSB_CSR0 MUSB_TXCSR /* Re-used for EP0 */
  298. #define MUSB_RXMAXP 0x08
  299. #define MUSB_RXCSR 0x0C
  300. #define MUSB_RXCOUNT 0x10
  301. #define MUSB_COUNT0 MUSB_RXCOUNT /* Re-used for EP0 */
  302. #define MUSB_TXTYPE 0x14
  303. #define MUSB_TYPE0 MUSB_TXTYPE /* Re-used for EP0 */
  304. #define MUSB_TXINTERVAL 0x18
  305. #define MUSB_NAKLIMIT0 MUSB_TXINTERVAL /* Re-used for EP0 */
  306. #define MUSB_RXTYPE 0x1C
  307. #define MUSB_RXINTERVAL 0x20
  308. #define MUSB_TXCOUNT 0x28
  309. /* Offsets to endpoint registers in indexed model (using INDEX register) */
  310. #define MUSB_INDEXED_OFFSET(_epnum, _offset) \
  311. (0x40 + (_offset))
  312. /* Offsets to endpoint registers in flat models */
  313. #define MUSB_FLAT_OFFSET(_epnum, _offset) \
  314. (USB_OFFSET(USB_EP_NI0_TXMAXP) + (0x40 * (_epnum)) + (_offset))
  315. /* Not implemented - HW has separate Tx/Rx FIFO */
  316. #define MUSB_TXCSR_MODE 0x0000
  317. static inline void musb_write_txfifosz(void __iomem *mbase, u8 c_size)
  318. {
  319. }
  320. static inline void musb_write_txfifoadd(void __iomem *mbase, u16 c_off)
  321. {
  322. }
  323. static inline void musb_write_rxfifosz(void __iomem *mbase, u8 c_size)
  324. {
  325. }
  326. static inline void musb_write_rxfifoadd(void __iomem *mbase, u16 c_off)
  327. {
  328. }
  329. static inline void musb_write_ulpi_buscontrol(void __iomem *mbase, u8 val)
  330. {
  331. }
  332. static inline u8 musb_read_txfifosz(void __iomem *mbase)
  333. {
  334. return 0;
  335. }
  336. static inline u16 musb_read_txfifoadd(void __iomem *mbase)
  337. {
  338. return 0;
  339. }
  340. static inline u8 musb_read_rxfifosz(void __iomem *mbase)
  341. {
  342. return 0;
  343. }
  344. static inline u16 musb_read_rxfifoadd(void __iomem *mbase)
  345. {
  346. return 0;
  347. }
  348. static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase)
  349. {
  350. return 0;
  351. }
  352. static inline u8 musb_read_configdata(void __iomem *mbase)
  353. {
  354. return 0;
  355. }
  356. static inline u16 musb_read_hwvers(void __iomem *mbase)
  357. {
  358. /*
  359. * This register is invisible on Blackfin, actually the MUSB
  360. * RTL version of Blackfin is 1.9, so just harcode its value.
  361. */
  362. return MUSB_HWVERS_1900;
  363. }
  364. static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase)
  365. {
  366. return NULL;
  367. }
  368. static inline void musb_write_rxfunaddr(void __iomem *ep_target_regs, u8 qh_addr_req)
  369. {
  370. }
  371. static inline void musb_write_rxhubaddr(void __iomem *ep_target_regs, u8 qh_h_addr_reg)
  372. {
  373. }
  374. static inline void musb_write_rxhubport(void __iomem *ep_target_regs, u8 qh_h_port_reg)
  375. {
  376. }
  377. static inline void musb_write_txfunaddr(void __iomem *mbase, u8 epnum, u8 qh_addr_reg)
  378. {
  379. }
  380. static inline void musb_write_txhubaddr(void __iomem *mbase, u8 epnum, u8 qh_addr_reg)
  381. {
  382. }
  383. static inline void musb_write_txhubport(void __iomem *mbase, u8 epnum, u8 qh_h_port_reg)
  384. {
  385. }
  386. static inline u8 musb_read_rxfunaddr(void __iomem *mbase, u8 epnum)
  387. {
  388. return 0;
  389. }
  390. static inline u8 musb_read_rxhubaddr(void __iomem *mbase, u8 epnum)
  391. {
  392. return 0;
  393. }
  394. static inline u8 musb_read_rxhubport(void __iomem *mbase, u8 epnum)
  395. {
  396. return 0;
  397. }
  398. static inline u8 musb_read_txfunaddr(void __iomem *mbase, u8 epnum)
  399. {
  400. return 0;
  401. }
  402. static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum)
  403. {
  404. return 0;
  405. }
  406. static inline u8 musb_read_txhubport(void __iomem *mbase, u8 epnum)
  407. {
  408. return 0;
  409. }
  410. #endif /* CONFIG_BLACKFIN */
  411. #endif /* __MUSB_REGS_H__ */