regs-usb-hsotg.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. /* arch/arm/plat-s3c/include/plat/regs-usb-hsotg.h
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * http://armlinux.simtec.co.uk/
  6. * Ben Dooks <ben@simtec.co.uk>
  7. *
  8. * S3C - USB2.0 Highspeed/OtG device block registers
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef __PLAT_S3C64XX_REGS_USB_HSOTG_H
  15. #define __PLAT_S3C64XX_REGS_USB_HSOTG_H __FILE__
  16. #define S3C_HSOTG_REG(x) (x)
  17. #define S3C_GOTGCTL S3C_HSOTG_REG(0x000)
  18. #define S3C_GOTGCTL_BSESVLD (1 << 19)
  19. #define S3C_GOTGCTL_ASESVLD (1 << 18)
  20. #define S3C_GOTGCTL_DBNC_SHORT (1 << 17)
  21. #define S3C_GOTGCTL_CONID_B (1 << 16)
  22. #define S3C_GOTGCTL_DEVHNPEN (1 << 11)
  23. #define S3C_GOTGCTL_HSSETHNPEN (1 << 10)
  24. #define S3C_GOTGCTL_HNPREQ (1 << 9)
  25. #define S3C_GOTGCTL_HSTNEGSCS (1 << 8)
  26. #define S3C_GOTGCTL_SESREQ (1 << 1)
  27. #define S3C_GOTGCTL_SESREQSCS (1 << 0)
  28. #define S3C_GOTGINT S3C_HSOTG_REG(0x004)
  29. #define S3C_GOTGINT_DbnceDone (1 << 19)
  30. #define S3C_GOTGINT_ADevTOUTChg (1 << 18)
  31. #define S3C_GOTGINT_HstNegDet (1 << 17)
  32. #define S3C_GOTGINT_HstnegSucStsChng (1 << 9)
  33. #define S3C_GOTGINT_SesReqSucStsChng (1 << 8)
  34. #define S3C_GOTGINT_SesEndDet (1 << 2)
  35. #define S3C_GAHBCFG S3C_HSOTG_REG(0x008)
  36. #define S3C_GAHBCFG_PTxFEmpLvl (1 << 8)
  37. #define S3C_GAHBCFG_NPTxFEmpLvl (1 << 7)
  38. #define S3C_GAHBCFG_DMAEn (1 << 5)
  39. #define S3C_GAHBCFG_HBstLen_MASK (0xf << 1)
  40. #define S3C_GAHBCFG_HBstLen_SHIFT (1)
  41. #define S3C_GAHBCFG_HBstLen_Single (0x0 << 1)
  42. #define S3C_GAHBCFG_HBstLen_Incr (0x1 << 1)
  43. #define S3C_GAHBCFG_HBstLen_Incr4 (0x3 << 1)
  44. #define S3C_GAHBCFG_HBstLen_Incr8 (0x5 << 1)
  45. #define S3C_GAHBCFG_HBstLen_Incr16 (0x7 << 1)
  46. #define S3C_GAHBCFG_GlblIntrEn (1 << 0)
  47. #define S3C_GUSBCFG S3C_HSOTG_REG(0x00C)
  48. #define S3C_GUSBCFG_PHYLPClkSel (1 << 15)
  49. #define S3C_GUSBCFG_HNPCap (1 << 9)
  50. #define S3C_GUSBCFG_SRPCap (1 << 8)
  51. #define S3C_GUSBCFG_PHYIf16 (1 << 3)
  52. #define S3C_GUSBCFG_TOutCal_MASK (0x7 << 0)
  53. #define S3C_GUSBCFG_TOutCal_SHIFT (0)
  54. #define S3C_GUSBCFG_TOutCal_LIMIT (0x7)
  55. #define S3C_GUSBCFG_TOutCal(_x) ((_x) << 0)
  56. #define S3C_GRSTCTL S3C_HSOTG_REG(0x010)
  57. #define S3C_GRSTCTL_AHBIdle (1 << 31)
  58. #define S3C_GRSTCTL_DMAReq (1 << 30)
  59. #define S3C_GRSTCTL_TxFNum_MASK (0x1f << 6)
  60. #define S3C_GRSTCTL_TxFNum_SHIFT (6)
  61. #define S3C_GRSTCTL_TxFNum_LIMIT (0x1f)
  62. #define S3C_GRSTCTL_TxFNum(_x) ((_x) << 6)
  63. #define S3C_GRSTCTL_TxFFlsh (1 << 5)
  64. #define S3C_GRSTCTL_RxFFlsh (1 << 4)
  65. #define S3C_GRSTCTL_INTknQFlsh (1 << 3)
  66. #define S3C_GRSTCTL_FrmCntrRst (1 << 2)
  67. #define S3C_GRSTCTL_HSftRst (1 << 1)
  68. #define S3C_GRSTCTL_CSftRst (1 << 0)
  69. #define S3C_GINTSTS S3C_HSOTG_REG(0x014)
  70. #define S3C_GINTMSK S3C_HSOTG_REG(0x018)
  71. #define S3C_GINTSTS_WkUpInt (1 << 31)
  72. #define S3C_GINTSTS_SessReqInt (1 << 30)
  73. #define S3C_GINTSTS_DisconnInt (1 << 29)
  74. #define S3C_GINTSTS_ConIDStsChng (1 << 28)
  75. #define S3C_GINTSTS_PTxFEmp (1 << 26)
  76. #define S3C_GINTSTS_HChInt (1 << 25)
  77. #define S3C_GINTSTS_PrtInt (1 << 24)
  78. #define S3C_GINTSTS_FetSusp (1 << 22)
  79. #define S3C_GINTSTS_incompIP (1 << 21)
  80. #define S3C_GINTSTS_IncomplSOIN (1 << 20)
  81. #define S3C_GINTSTS_OEPInt (1 << 19)
  82. #define S3C_GINTSTS_IEPInt (1 << 18)
  83. #define S3C_GINTSTS_EPMis (1 << 17)
  84. #define S3C_GINTSTS_EOPF (1 << 15)
  85. #define S3C_GINTSTS_ISOutDrop (1 << 14)
  86. #define S3C_GINTSTS_EnumDone (1 << 13)
  87. #define S3C_GINTSTS_USBRst (1 << 12)
  88. #define S3C_GINTSTS_USBSusp (1 << 11)
  89. #define S3C_GINTSTS_ErlySusp (1 << 10)
  90. #define S3C_GINTSTS_GOUTNakEff (1 << 7)
  91. #define S3C_GINTSTS_GINNakEff (1 << 6)
  92. #define S3C_GINTSTS_NPTxFEmp (1 << 5)
  93. #define S3C_GINTSTS_RxFLvl (1 << 4)
  94. #define S3C_GINTSTS_SOF (1 << 3)
  95. #define S3C_GINTSTS_OTGInt (1 << 2)
  96. #define S3C_GINTSTS_ModeMis (1 << 1)
  97. #define S3C_GINTSTS_CurMod_Host (1 << 0)
  98. #define S3C_GRXSTSR S3C_HSOTG_REG(0x01C)
  99. #define S3C_GRXSTSP S3C_HSOTG_REG(0x020)
  100. #define S3C_GRXSTS_FN_MASK (0x7f << 25)
  101. #define S3C_GRXSTS_FN_SHIFT (25)
  102. #define S3C_GRXSTS_PktSts_MASK (0xf << 17)
  103. #define S3C_GRXSTS_PktSts_SHIFT (17)
  104. #define S3C_GRXSTS_PktSts_GlobalOutNAK (0x1 << 17)
  105. #define S3C_GRXSTS_PktSts_OutRX (0x2 << 17)
  106. #define S3C_GRXSTS_PktSts_OutDone (0x3 << 17)
  107. #define S3C_GRXSTS_PktSts_SetupDone (0x4 << 17)
  108. #define S3C_GRXSTS_PktSts_SetupRX (0x6 << 17)
  109. #define S3C_GRXSTS_DPID_MASK (0x3 << 15)
  110. #define S3C_GRXSTS_DPID_SHIFT (15)
  111. #define S3C_GRXSTS_ByteCnt_MASK (0x7ff << 4)
  112. #define S3C_GRXSTS_ByteCnt_SHIFT (4)
  113. #define S3C_GRXSTS_EPNum_MASK (0xf << 0)
  114. #define S3C_GRXSTS_EPNum_SHIFT (0)
  115. #define S3C_GRXFSIZ S3C_HSOTG_REG(0x024)
  116. #define S3C_GNPTXFSIZ S3C_HSOTG_REG(0x028)
  117. #define S3C_GNPTXFSIZ_NPTxFDep_MASK (0xffff << 16)
  118. #define S3C_GNPTXFSIZ_NPTxFDep_SHIFT (16)
  119. #define S3C_GNPTXFSIZ_NPTxFDep_LIMIT (0xffff)
  120. #define S3C_GNPTXFSIZ_NPTxFDep(_x) ((_x) << 16)
  121. #define S3C_GNPTXFSIZ_NPTxFStAddr_MASK (0xffff << 0)
  122. #define S3C_GNPTXFSIZ_NPTxFStAddr_SHIFT (0)
  123. #define S3C_GNPTXFSIZ_NPTxFStAddr_LIMIT (0xffff)
  124. #define S3C_GNPTXFSIZ_NPTxFStAddr(_x) ((_x) << 0)
  125. #define S3C_GNPTXSTS S3C_HSOTG_REG(0x02C)
  126. #define S3C_GNPTXSTS_NPtxQTop_MASK (0x7f << 24)
  127. #define S3C_GNPTXSTS_NPtxQTop_SHIFT (24)
  128. #define S3C_GNPTXSTS_NPTxQSpcAvail_MASK (0xff << 16)
  129. #define S3C_GNPTXSTS_NPTxQSpcAvail_SHIFT (16)
  130. #define S3C_GNPTXSTS_NPTxQSpcAvail_GET(_v) (((_v) >> 16) & 0xff)
  131. #define S3C_GNPTXSTS_NPTxFSpcAvail_MASK (0xffff << 0)
  132. #define S3C_GNPTXSTS_NPTxFSpcAvail_SHIFT (0)
  133. #define S3C_GNPTXSTS_NPTxFSpcAvail_GET(_v) (((_v) >> 0) & 0xffff)
  134. #define S3C_HPTXFSIZ S3C_HSOTG_REG(0x100)
  135. #define S3C_DPTXFSIZn(_a) S3C_HSOTG_REG(0x104 + (((_a) - 1) * 4))
  136. #define S3C_DPTXFSIZn_DPTxFSize_MASK (0xffff << 16)
  137. #define S3C_DPTXFSIZn_DPTxFSize_SHIFT (16)
  138. #define S3C_DPTXFSIZn_DPTxFSize_GET(_v) (((_v) >> 16) & 0xffff)
  139. #define S3C_DPTXFSIZn_DPTxFSize_LIMIT (0xffff)
  140. #define S3C_DPTXFSIZn_DPTxFSize(_x) ((_x) << 16)
  141. #define S3C_DPTXFSIZn_DPTxFStAddr_MASK (0xffff << 0)
  142. #define S3C_DPTXFSIZn_DPTxFStAddr_SHIFT (0)
  143. /* Device mode registers */
  144. #define S3C_DCFG S3C_HSOTG_REG(0x800)
  145. #define S3C_DCFG_EPMisCnt_MASK (0x1f << 18)
  146. #define S3C_DCFG_EPMisCnt_SHIFT (18)
  147. #define S3C_DCFG_EPMisCnt_LIMIT (0x1f)
  148. #define S3C_DCFG_EPMisCnt(_x) ((_x) << 18)
  149. #define S3C_DCFG_PerFrInt_MASK (0x3 << 11)
  150. #define S3C_DCFG_PerFrInt_SHIFT (11)
  151. #define S3C_DCFG_PerFrInt_LIMIT (0x3)
  152. #define S3C_DCFG_PerFrInt(_x) ((_x) << 11)
  153. #define S3C_DCFG_DevAddr_MASK (0x7f << 4)
  154. #define S3C_DCFG_DevAddr_SHIFT (4)
  155. #define S3C_DCFG_DevAddr_LIMIT (0x7f)
  156. #define S3C_DCFG_DevAddr(_x) ((_x) << 4)
  157. #define S3C_DCFG_NZStsOUTHShk (1 << 2)
  158. #define S3C_DCFG_DevSpd_MASK (0x3 << 0)
  159. #define S3C_DCFG_DevSpd_SHIFT (0)
  160. #define S3C_DCFG_DevSpd_HS (0x0 << 0)
  161. #define S3C_DCFG_DevSpd_FS (0x1 << 0)
  162. #define S3C_DCFG_DevSpd_LS (0x2 << 0)
  163. #define S3C_DCFG_DevSpd_FS48 (0x3 << 0)
  164. #define S3C_DCTL S3C_HSOTG_REG(0x804)
  165. #define S3C_DCTL_PWROnPrgDone (1 << 11)
  166. #define S3C_DCTL_CGOUTNak (1 << 10)
  167. #define S3C_DCTL_SGOUTNak (1 << 9)
  168. #define S3C_DCTL_CGNPInNAK (1 << 8)
  169. #define S3C_DCTL_SGNPInNAK (1 << 7)
  170. #define S3C_DCTL_TstCtl_MASK (0x7 << 4)
  171. #define S3C_DCTL_TstCtl_SHIFT (4)
  172. #define S3C_DCTL_GOUTNakSts (1 << 3)
  173. #define S3C_DCTL_GNPINNakSts (1 << 2)
  174. #define S3C_DCTL_SftDiscon (1 << 1)
  175. #define S3C_DCTL_RmtWkUpSig (1 << 0)
  176. #define S3C_DSTS S3C_HSOTG_REG(0x808)
  177. #define S3C_DSTS_SOFFN_MASK (0x3fff << 8)
  178. #define S3C_DSTS_SOFFN_SHIFT (8)
  179. #define S3C_DSTS_SOFFN_LIMIT (0x3fff)
  180. #define S3C_DSTS_SOFFN(_x) ((_x) << 8)
  181. #define S3C_DSTS_ErraticErr (1 << 3)
  182. #define S3C_DSTS_EnumSpd_MASK (0x3 << 1)
  183. #define S3C_DSTS_EnumSpd_SHIFT (1)
  184. #define S3C_DSTS_EnumSpd_HS (0x0 << 1)
  185. #define S3C_DSTS_EnumSpd_FS (0x1 << 1)
  186. #define S3C_DSTS_EnumSpd_LS (0x2 << 1)
  187. #define S3C_DSTS_EnumSpd_FS48 (0x3 << 1)
  188. #define S3C_DSTS_SuspSts (1 << 0)
  189. #define S3C_DIEPMSK S3C_HSOTG_REG(0x810)
  190. #define S3C_DIEPMSK_TxFIFOEmpty (1 << 7)
  191. #define S3C_DIEPMSK_INEPNakEffMsk (1 << 6)
  192. #define S3C_DIEPMSK_INTknEPMisMsk (1 << 5)
  193. #define S3C_DIEPMSK_INTknTXFEmpMsk (1 << 4)
  194. #define S3C_DIEPMSK_TimeOUTMsk (1 << 3)
  195. #define S3C_DIEPMSK_AHBErrMsk (1 << 2)
  196. #define S3C_DIEPMSK_EPDisbldMsk (1 << 1)
  197. #define S3C_DIEPMSK_XferComplMsk (1 << 0)
  198. #define S3C_DOEPMSK S3C_HSOTG_REG(0x814)
  199. #define S3C_DOEPMSK_Back2BackSetup (1 << 6)
  200. #define S3C_DOEPMSK_OUTTknEPdisMsk (1 << 4)
  201. #define S3C_DOEPMSK_SetupMsk (1 << 3)
  202. #define S3C_DOEPMSK_AHBErrMsk (1 << 2)
  203. #define S3C_DOEPMSK_EPDisbldMsk (1 << 1)
  204. #define S3C_DOEPMSK_XferComplMsk (1 << 0)
  205. #define S3C_DAINT S3C_HSOTG_REG(0x818)
  206. #define S3C_DAINTMSK S3C_HSOTG_REG(0x81C)
  207. #define S3C_DAINT_OutEP_SHIFT (16)
  208. #define S3C_DAINT_OutEP(x) (1 << ((x) + 16))
  209. #define S3C_DAINT_InEP(x) (1 << (x))
  210. #define S3C_DTKNQR1 S3C_HSOTG_REG(0x820)
  211. #define S3C_DTKNQR2 S3C_HSOTG_REG(0x824)
  212. #define S3C_DTKNQR3 S3C_HSOTG_REG(0x830)
  213. #define S3C_DTKNQR4 S3C_HSOTG_REG(0x834)
  214. #define S3C_DVBUSDIS S3C_HSOTG_REG(0x828)
  215. #define S3C_DVBUSPULSE S3C_HSOTG_REG(0x82C)
  216. #define S3C_DIEPCTL0 S3C_HSOTG_REG(0x900)
  217. #define S3C_DOEPCTL0 S3C_HSOTG_REG(0xB00)
  218. #define S3C_DIEPCTL(_a) S3C_HSOTG_REG(0x900 + ((_a) * 0x20))
  219. #define S3C_DOEPCTL(_a) S3C_HSOTG_REG(0xB00 + ((_a) * 0x20))
  220. /* EP0 specialness:
  221. * bits[29..28] - reserved (no SetD0PID, SetD1PID)
  222. * bits[25..22] - should always be zero, this isn't a periodic endpoint
  223. * bits[10..0] - MPS setting differenct for EP0
  224. */
  225. #define S3C_D0EPCTL_MPS_MASK (0x3 << 0)
  226. #define S3C_D0EPCTL_MPS_SHIFT (0)
  227. #define S3C_D0EPCTL_MPS_64 (0x0 << 0)
  228. #define S3C_D0EPCTL_MPS_32 (0x1 << 0)
  229. #define S3C_D0EPCTL_MPS_16 (0x2 << 0)
  230. #define S3C_D0EPCTL_MPS_8 (0x3 << 0)
  231. #define S3C_DxEPCTL_EPEna (1 << 31)
  232. #define S3C_DxEPCTL_EPDis (1 << 30)
  233. #define S3C_DxEPCTL_SetD1PID (1 << 29)
  234. #define S3C_DxEPCTL_SetOddFr (1 << 29)
  235. #define S3C_DxEPCTL_SetD0PID (1 << 28)
  236. #define S3C_DxEPCTL_SetEvenFr (1 << 28)
  237. #define S3C_DxEPCTL_SNAK (1 << 27)
  238. #define S3C_DxEPCTL_CNAK (1 << 26)
  239. #define S3C_DxEPCTL_TxFNum_MASK (0xf << 22)
  240. #define S3C_DxEPCTL_TxFNum_SHIFT (22)
  241. #define S3C_DxEPCTL_TxFNum_LIMIT (0xf)
  242. #define S3C_DxEPCTL_TxFNum(_x) ((_x) << 22)
  243. #define S3C_DxEPCTL_Stall (1 << 21)
  244. #define S3C_DxEPCTL_Snp (1 << 20)
  245. #define S3C_DxEPCTL_EPType_MASK (0x3 << 18)
  246. #define S3C_DxEPCTL_EPType_SHIFT (18)
  247. #define S3C_DxEPCTL_EPType_Control (0x0 << 18)
  248. #define S3C_DxEPCTL_EPType_Iso (0x1 << 18)
  249. #define S3C_DxEPCTL_EPType_Bulk (0x2 << 18)
  250. #define S3C_DxEPCTL_EPType_Intterupt (0x3 << 18)
  251. #define S3C_DxEPCTL_NAKsts (1 << 17)
  252. #define S3C_DxEPCTL_DPID (1 << 16)
  253. #define S3C_DxEPCTL_EOFrNum (1 << 16)
  254. #define S3C_DxEPCTL_USBActEp (1 << 15)
  255. #define S3C_DxEPCTL_NextEp_MASK (0xf << 11)
  256. #define S3C_DxEPCTL_NextEp_SHIFT (11)
  257. #define S3C_DxEPCTL_NextEp_LIMIT (0xf)
  258. #define S3C_DxEPCTL_NextEp(_x) ((_x) << 11)
  259. #define S3C_DxEPCTL_MPS_MASK (0x7ff << 0)
  260. #define S3C_DxEPCTL_MPS_SHIFT (0)
  261. #define S3C_DxEPCTL_MPS_LIMIT (0x7ff)
  262. #define S3C_DxEPCTL_MPS(_x) ((_x) << 0)
  263. #define S3C_DIEPINT(_a) S3C_HSOTG_REG(0x908 + ((_a) * 0x20))
  264. #define S3C_DOEPINT(_a) S3C_HSOTG_REG(0xB08 + ((_a) * 0x20))
  265. #define S3C_DxEPINT_INEPNakEff (1 << 6)
  266. #define S3C_DxEPINT_Back2BackSetup (1 << 6)
  267. #define S3C_DxEPINT_INTknEPMis (1 << 5)
  268. #define S3C_DxEPINT_INTknTXFEmp (1 << 4)
  269. #define S3C_DxEPINT_OUTTknEPdis (1 << 4)
  270. #define S3C_DxEPINT_Timeout (1 << 3)
  271. #define S3C_DxEPINT_Setup (1 << 3)
  272. #define S3C_DxEPINT_AHBErr (1 << 2)
  273. #define S3C_DxEPINT_EPDisbld (1 << 1)
  274. #define S3C_DxEPINT_XferCompl (1 << 0)
  275. #define S3C_DIEPTSIZ0 S3C_HSOTG_REG(0x910)
  276. #define S3C_DIEPTSIZ0_PktCnt_MASK (0x3 << 19)
  277. #define S3C_DIEPTSIZ0_PktCnt_SHIFT (19)
  278. #define S3C_DIEPTSIZ0_PktCnt_LIMIT (0x3)
  279. #define S3C_DIEPTSIZ0_PktCnt(_x) ((_x) << 19)
  280. #define S3C_DIEPTSIZ0_XferSize_MASK (0x7f << 0)
  281. #define S3C_DIEPTSIZ0_XferSize_SHIFT (0)
  282. #define S3C_DIEPTSIZ0_XferSize_LIMIT (0x7f)
  283. #define S3C_DIEPTSIZ0_XferSize(_x) ((_x) << 0)
  284. #define DOEPTSIZ0 S3C_HSOTG_REG(0xB10)
  285. #define S3C_DOEPTSIZ0_SUPCnt_MASK (0x3 << 29)
  286. #define S3C_DOEPTSIZ0_SUPCnt_SHIFT (29)
  287. #define S3C_DOEPTSIZ0_SUPCnt_LIMIT (0x3)
  288. #define S3C_DOEPTSIZ0_SUPCnt(_x) ((_x) << 29)
  289. #define S3C_DOEPTSIZ0_PktCnt (1 << 19)
  290. #define S3C_DOEPTSIZ0_XferSize_MASK (0x7f << 0)
  291. #define S3C_DOEPTSIZ0_XferSize_SHIFT (0)
  292. #define S3C_DIEPTSIZ(_a) S3C_HSOTG_REG(0x910 + ((_a) * 0x20))
  293. #define S3C_DOEPTSIZ(_a) S3C_HSOTG_REG(0xB10 + ((_a) * 0x20))
  294. #define S3C_DxEPTSIZ_MC_MASK (0x3 << 29)
  295. #define S3C_DxEPTSIZ_MC_SHIFT (29)
  296. #define S3C_DxEPTSIZ_MC_LIMIT (0x3)
  297. #define S3C_DxEPTSIZ_MC(_x) ((_x) << 29)
  298. #define S3C_DxEPTSIZ_PktCnt_MASK (0x3ff << 19)
  299. #define S3C_DxEPTSIZ_PktCnt_SHIFT (19)
  300. #define S3C_DxEPTSIZ_PktCnt_GET(_v) (((_v) >> 19) & 0x3ff)
  301. #define S3C_DxEPTSIZ_PktCnt_LIMIT (0x3ff)
  302. #define S3C_DxEPTSIZ_PktCnt(_x) ((_x) << 19)
  303. #define S3C_DxEPTSIZ_XferSize_MASK (0x7ffff << 0)
  304. #define S3C_DxEPTSIZ_XferSize_SHIFT (0)
  305. #define S3C_DxEPTSIZ_XferSize_GET(_v) (((_v) >> 0) & 0x7ffff)
  306. #define S3C_DxEPTSIZ_XferSize_LIMIT (0x7ffff)
  307. #define S3C_DxEPTSIZ_XferSize(_x) ((_x) << 0)
  308. #define S3C_DIEPDMA(_a) S3C_HSOTG_REG(0x914 + ((_a) * 0x20))
  309. #define S3C_DOEPDMA(_a) S3C_HSOTG_REG(0xB14 + ((_a) * 0x20))
  310. #define S3C_DTXFSTS(_a) S3C_HSOTG_REG(0x918 + ((_a) * 0x20))
  311. #define S3C_EPFIFO(_a) S3C_HSOTG_REG(0x1000 + ((_a) * 0x1000))
  312. #endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_H */