i80321reg.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. /* $OpenBSD: i80321reg.h,v 1.3 2006/06/27 05:18:25 drahn Exp $ */
  2. /* $NetBSD: i80321reg.h,v 1.15 2005/12/11 12:16:51 christos Exp $ */
  3. /*
  4. * Copyright (c) 2002 Wasabi Systems, Inc.
  5. * All rights reserved.
  6. *
  7. * Written by Jason R. Thorpe for Wasabi Systems, Inc.
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. All advertising materials mentioning features or use of this software
  18. * must display the following acknowledgement:
  19. * This product includes software developed for the NetBSD Project by
  20. * Wasabi Systems, Inc.
  21. * 4. The name of Wasabi Systems, Inc. may not be used to endorse
  22. * or promote products derived from this software without specific prior
  23. * written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
  26. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  27. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  28. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
  29. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  30. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  31. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  32. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  33. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  35. * POSSIBILITY OF SUCH DAMAGE.
  36. */
  37. #ifndef _ARM_XSCALE_I80321REG_H_
  38. #define _ARM_XSCALE_I80321REG_H_
  39. /*
  40. * Register definitions for the Intel 80321 (``Verde'') I/O processor,
  41. * based on the XScale core.
  42. */
  43. /*
  44. * Base i80321 memory map:
  45. *
  46. * 0x0000.0000 - 0x7fff.ffff ATU Outbound Direct Addressing Window
  47. * 0x8000.0000 - 0x9001.ffff ATU Outbound Translation Windows
  48. * 0x9002.0000 - 0xffff.dfff External Memory
  49. * 0xffff.e000 - 0xffff.e8ff Peripheral Memory Mapped Registers
  50. * 0xffff.e900 - 0xffff.ffff Reserved
  51. */
  52. #define VERDE_OUT_DIRECT_WIN_BASE 0x00000000UL
  53. #define VERDE_OUT_DIRECT_WIN_SIZE 0x80000000UL
  54. #define VERDE_OUT_XLATE_MEM_WIN_SIZE 0x04000000UL
  55. #define VERDE_OUT_XLATE_IO_WIN_SIZE 0x00010000UL
  56. #define VERDE_OUT_XLATE_MEM_WIN0_BASE 0x80000000UL
  57. #define VERDE_OUT_XLATE_MEM_WIN1_BASE 0x84000000UL
  58. #define VERDE_OUT_XLATE_IO_WIN0_BASE 0x90000000UL
  59. #define VERDE_EXTMEM_BASE 0x90020000UL
  60. #define VERDE_PMMR_BASE 0xffffe000UL
  61. #define VERDE_PMMR_SIZE 0x00001700UL
  62. /*
  63. * Peripheral Memory Mapped Registers. Defined as offsets
  64. * from the VERDE_PMMR_BASE.
  65. */
  66. #define VERDE_ATU_BASE 0x0100
  67. #define VERDE_ATU_SIZE 0x0100
  68. #define VERDE_MU_BASE 0x0300
  69. #define VERDE_MU_SIZE 0x0100
  70. #define VERDE_DMA_BASE 0x0400
  71. #define VERDE_DMA_BASE0 (VERDE_DMA_BASE + 0x00)
  72. #define VERDE_DMA_BASE1 (VERDE_DMA_BASE + 0x40)
  73. #define VERDE_DMA_SIZE 0x0100
  74. #define VERDE_DMA_CHSIZE 0x0040
  75. #define VERDE_MCU_BASE 0x0500
  76. #define VERDE_MCU_SIZE 0x0100
  77. #define VERDE_SSP_BASE 0x0600
  78. #define VERDE_SSP_SIZE 0x0080
  79. #define VERDE_PBIU_BASE 0x0680
  80. #define VERDE_PBIU_SIZE 0x0080
  81. #define VERDE_AAU_BASE 0x0800
  82. #define VERDE_AAU_SIZE 0x0100
  83. #define VERDE_I2C_BASE 0x1680
  84. #define VERDE_I2C_BASE0 (VERDE_I2C_BASE + 0x00)
  85. #define VERDE_I2C_BASE1 (VERDE_I2C_BASE + 0x20)
  86. #define VERDE_I2C_SIZE 0x0080
  87. #define VERDE_I2C_CHSIZE 0x0020
  88. /*
  89. * Address Translation Unit
  90. */
  91. /* 0x00 - 0x38 -- PCI configuration space header */
  92. #define ATU_IALR0 0x40 /* Inbound ATU Limit 0 */
  93. #define ATU_IATVR0 0x44 /* Inbound ATU Xlate Value 0 */
  94. #define ATU_ERLR 0x48 /* Expansion ROM Limit */
  95. #define ATU_ERTVR 0x4c /* Expansion ROM Xlate Value */
  96. #define ATU_IALR1 0x50 /* Inbound ATU Limit 1 */
  97. #define ATU_IALR2 0x54 /* Inbound ATU Limit 2 */
  98. #define ATU_IATVR2 0x58 /* Inbound ATU Xlate Value 2 */
  99. #define ATU_OIOWTVR 0x5c /* Outbound I/O Window Xlate Value */
  100. #define ATU_OMWTVR0 0x60 /* Outbound Mem Window Xlate Value 0 */
  101. #define ATU_OUMWTVR0 0x64 /* Outbound Mem Window Xlate Value 0 Upper */
  102. #define ATU_OMWTVR1 0x68 /* Outbound Mem Window Xlate Value 1 */
  103. #define ATU_OUMWTVR1 0x6c /* Outbound Mem Window Xlate Value 1 Upper */
  104. #define ATU_OUDWTVR 0x78 /* Outbound Mem Direct Xlate Value Upper */
  105. #define ATU_ATUCR 0x80 /* ATU Configuration */
  106. #define ATU_PCSR 0x84 /* PCI Configuration and Status */
  107. #define ATU_ATUISR 0x88 /* ATU Interrupt Status */
  108. #define ATU_ATUIMR 0x8c /* ATU Interrupt Mask */
  109. #define ATU_IABAR3 0x90 /* Inbound ATU Base Address 3 */
  110. #define ATU_IAUBAR3 0x94 /* Inbound ATU Base Address 3 Upper */
  111. #define ATU_IALR3 0x98 /* Inbound ATU Limit 3 */
  112. #define ATU_IATVR3 0x9c /* Inbound ATU Xlate Value 3 */
  113. #define ATU_OCCAR 0xa4 /* Outbound Configuration Cycle Address */
  114. #define ATU_OCCDR 0xac /* Outbound Configuration Cycle Data */
  115. #define ATU_MSI_PORT 0xb4 /* MSI port */
  116. #define ATU_PDSCR 0xbc /* PCI Bus Drive Strength Control */
  117. #define ATU_PCI_X_CAP_ID 0xe0 /* (1) */
  118. #define ATU_PCI_X_NEXT 0xe1 /* (1) */
  119. #define ATU_PCIXCMD 0xe2 /* PCI-X Command Register (2) */
  120. #define ATU_PCIXSR 0xe4 /* PCI-X Status Register */
  121. #define ATUCR_DRC_ALIAS (1U << 19)
  122. #define ATUCR_DAU2GXEN (1U << 18)
  123. #define ATUCR_P_SERR_MA (1U << 16)
  124. #define ATUCR_DTS (1U << 15)
  125. #define ATUCR_P_SERR_DIE (1U << 9)
  126. #define ATUCR_DAE (1U << 8)
  127. #define ATUCR_BIST_IE (1U << 3)
  128. #define ATUCR_OUT_EN (1U << 1)
  129. #define PCSR_DAAAPE (1U << 18)
  130. #define PCSR_PCI_X_CAP (3U << 16)
  131. #define PCSR_PCI_X_CAP_BORING (0 << 16)
  132. #define PCSR_PCI_X_CAP_66 (1U << 16)
  133. #define PCSR_PCI_X_CAP_100 (2U << 16)
  134. #define PCSR_PCI_X_CAP_133 (3U << 16)
  135. #define PCSR_OTQB (1U << 15)
  136. #define PCSR_IRTQB (1U << 14)
  137. #define PCSR_DTV (1U << 12)
  138. #define PCSR_BUS66 (1U << 10)
  139. #define PCSR_BUS64 (1U << 8)
  140. #define PCSR_RIB (1U << 5)
  141. #define PCSR_RPB (1U << 4)
  142. #define PCSR_CCR (1U << 2)
  143. #define PCSR_CPR (1U << 1)
  144. #define ATUISR_IMW1BU (1U << 14)
  145. #define ATUISR_ISCEM (1U << 13)
  146. #define ATUISR_RSCEM (1U << 12)
  147. #define ATUISR_PST (1U << 11)
  148. #define ATUISR_P_SERR_ASRT (1U << 10)
  149. #define ATUISR_DPE (1U << 9)
  150. #define ATUISR_BIST (1U << 8)
  151. #define ATUISR_IBMA (1U << 7)
  152. #define ATUISR_P_SERR_DET (1U << 4)
  153. #define ATUISR_PMA (1U << 3)
  154. #define ATUISR_PTAM (1U << 2)
  155. #define ATUISR_PTAT (1U << 1)
  156. #define ATUISR_PMPE (1U << 0)
  157. #define ATUIMR_IMW1BU (1U << 11)
  158. #define ATUIMR_ISCEM (1U << 10)
  159. #define ATUIMR_RSCEM (1U << 9)
  160. #define ATUIMR_PST (1U << 8)
  161. #define ATUIMR_DPE (1U << 7)
  162. #define ATUIMR_P_SERR_ASRT (1U << 6)
  163. #define ATUIMR_PMA (1U << 5)
  164. #define ATUIMR_PTAM (1U << 4)
  165. #define ATUIMR_PTAT (1U << 3)
  166. #define ATUIMR_PMPE (1U << 2)
  167. #define ATUIMR_IE_SERR_EN (1U << 1)
  168. #define ATUIMR_ECC_TAE (1U << 0)
  169. #define PCIXCMD_MOST_1 (0 << 4)
  170. #define PCIXCMD_MOST_2 (1 << 4)
  171. #define PCIXCMD_MOST_3 (2 << 4)
  172. #define PCIXCMD_MOST_4 (3 << 4)
  173. #define PCIXCMD_MOST_8 (4 << 4)
  174. #define PCIXCMD_MOST_12 (5 << 4)
  175. #define PCIXCMD_MOST_16 (6 << 4)
  176. #define PCIXCMD_MOST_32 (7 << 4)
  177. #define PCIXCMD_MOST_MASK (7 << 4)
  178. #define PCIXCMD_MMRBC_512 (0 << 2)
  179. #define PCIXCMD_MMRBC_1024 (1 << 2)
  180. #define PCIXCMD_MMRBC_2048 (2 << 2)
  181. #define PCIXCMD_MMRBC_4096 (3 << 2)
  182. #define PCIXCMD_MMRBC_MASK (3 << 2)
  183. #define PCIXCMD_ERO (1U << 1)
  184. #define PCIXCMD_DPERE (1U << 0)
  185. #define PCIXSR_RSCEM (1U << 29)
  186. #define PCIXSR_DMCRS_MASK (7 << 26)
  187. #define PCIXSR_DMOST_MASK (7 << 23)
  188. #define PCIXSR_COMPLEX (1U << 20)
  189. #define PCIXSR_USC (1U << 19)
  190. #define PCIXSR_SCD (1U << 18)
  191. #define PCIXSR_133_CAP (1U << 17)
  192. #define PCIXSR_32PCI (1U << 16) /* 0 = 32, 1 = 64 */
  193. #define PCIXSR_BUSNO(x) (((x) & 0xff00) >> 8)
  194. #define PCIXSR_DEVNO(x) (((x) & 0xf8) >> 3)
  195. #define PCIXSR_FUNCNO(x) ((x) & 0x7)
  196. /*
  197. * Memory Controller Unit
  198. */
  199. #define MCU_SDIR 0x00 /* DDR SDRAM Init. Register */
  200. #define MCU_SDCR 0x04 /* DDR SDRAM Control Register */
  201. #define MCU_SDBR 0x08 /* SDRAM Base Register */
  202. #define MCU_SBR0 0x0c /* SDRAM Boundary 0 */
  203. #define MCU_SBR1 0x10 /* SDRAM Boundary 1 */
  204. #define MCU_ECCR 0x34 /* ECC Control Register */
  205. #define MCU_ELOG0 0x38 /* ECC Log 0 */
  206. #define MCU_ELOG1 0x3c /* ECC Log 1 */
  207. #define MCU_ECAR0 0x40 /* ECC address 0 */
  208. #define MCU_ECAR1 0x44 /* ECC address 1 */
  209. #define MCU_ECTST 0x48 /* ECC test register */
  210. #define MCU_MCISR 0x4c /* MCU Interrupt Status Register */
  211. #define MCU_RFR 0x50 /* Refresh Frequency Register */
  212. #define MCU_DBUDSR 0x54 /* Data Bus Pull-up Drive Strength */
  213. #define MCU_DBDDSR 0x58 /* Data Bus Pull-down Drive Strength */
  214. #define MCU_CUDSR 0x5c /* Clock Pull-up Drive Strength */
  215. #define MCU_CDDSR 0x60 /* Clock Pull-down Drive Strength */
  216. #define MCU_CEUDSR 0x64 /* Clock En Pull-up Drive Strength */
  217. #define MCU_CEDDSR 0x68 /* Clock En Pull-down Drive Strength */
  218. #define MCU_CSUDSR 0x6c /* Chip Sel Pull-up Drive Strength */
  219. #define MCU_CSDDSR 0x70 /* Chip Sel Pull-down Drive Strength */
  220. #define MCU_REUDSR 0x74 /* Rx En Pull-up Drive Strength */
  221. #define MCU_REDDSR 0x78 /* Rx En Pull-down Drive Strength */
  222. #define MCU_ABUDSR 0x7c /* Addr Bus Pull-up Drive Strength */
  223. #define MCU_ABDDSR 0x80 /* Addr Bus Pull-down Drive Strength */
  224. #define MCU_DSDR 0x84 /* Data Strobe Delay Register */
  225. #define MCU_REDR 0x88 /* Rx Enable Delay Register */
  226. #define SDCR_DIMMTYPE (1U << 1) /* 0 = unbuf, 1 = reg */
  227. #define SDCR_BUSWIDTH (1U << 2) /* 0 = 64, 1 = 32 */
  228. #define SBRx_TECH (1U << 31)
  229. #define SBRx_BOUND 0x0000003f
  230. #define ECCR_SBERE (1U << 0)
  231. #define ECCR_MBERE (1U << 1)
  232. #define ECCR_SBECE (1U << 2)
  233. #define ECCR_ECCEN (1U << 3)
  234. #define ELOGx_SYNDROME 0x000000ff
  235. #define ELOGx_ERRTYPE (1U << 8) /* 1 = multi-bit */
  236. #define ELOGx_RW (1U << 12) /* 1 = write error */
  237. /*
  238. * Dev ID Func Requester
  239. * 2 0 XScale core
  240. * 2 1 ATU
  241. * 13 0 DMA channel 0
  242. * 13 1 DMA channel 1
  243. * 26 0 ATU
  244. */
  245. #define ELOGx_REQ_DEV(x) (((x) >> 19) & 0x1f)
  246. #define ELOGx_REQ_FUNC(x) (((x) >> 16) & 0x3)
  247. #define MCISR_ECC_ERR0 (1U << 0)
  248. #define MCISR_ECC_ERR1 (1U << 1)
  249. #define MCISR_ECC_ERRN (1U << 2)
  250. /*
  251. * Timers
  252. *
  253. * The i80321 timer registers are available in both memory-mapped
  254. * and coprocessor spaces. Most of the registers are read-only
  255. * if memory-mapped, so we access them via coprocessor space.
  256. *
  257. * TMR0 cp6 c0,1 0xffffe7e0
  258. * TMR1 cp6 c1,1 0xffffe7e4
  259. * TCR0 cp6 c2,1 0xffffe7e8
  260. * TCR1 cp6 c3,1 0xffffe7ec
  261. * TRR0 cp6 c4,1 0xffffe7f0
  262. * TRR1 cp6 c5,1 0xffffe7f4
  263. * TISR cp6 c6,1 0xffffe7f8
  264. * WDTCR cp6 c7,1 0xffffe7fc
  265. */
  266. #define TMRx_TC (1U << 0)
  267. #define TMRx_ENABLE (1U << 1)
  268. #define TMRx_RELOAD (1U << 2)
  269. #define TMRx_PRIV (1U << 3)
  270. #define TMRx_CSEL_CORE (0 << 4)
  271. #define TMRx_CSEL_CORE_div4 (1 << 4)
  272. #define TMRx_CSEL_CORE_div8 (2 << 4)
  273. #define TMRx_CSEL_CORE_div16 (3 << 4)
  274. #define TISR_TMR0 (1U << 0)
  275. #define TISR_TMR1 (1U << 1)
  276. #define WDTCR_ENABLE1 0x1e1e1e1e
  277. #define WDTCR_ENABLE2 0xe1e1e1e1
  278. /*
  279. * Interrupt Controller Unit.
  280. *
  281. * INTCTL cp6 c0,0 0xffffe7d0
  282. * INTSTR cp6 c4,0 0xffffe7d4
  283. * IINTSRC cp6 c8,0 0xffffe7d8
  284. * FINTSRC cp6 c9,0 0xffffe7dc
  285. * PIRSR 0xffffe1ec
  286. */
  287. #define ICU_PIRSR 0x01ec
  288. #define ICU_GPOE 0x07c4
  289. #define ICU_GPID 0x07c8
  290. #define ICU_GPOD 0x07cc
  291. /*
  292. * NOTE: WE USE THE `bitXX' BITS TO INDICATE PENDING SOFTWARE
  293. * INTERRUPTS. See i80321_icu.c
  294. */
  295. #define ICU_INT_HPI 31 /* high priority interrupt */
  296. #define ICU_INT_XINT0 27 /* external interrupts */
  297. #define ICU_INT_XINT(x) ((x) + ICU_INT_XINT0)
  298. #define ICU_INT_bit26 26
  299. #define ICU_INT_SSP 25 /* SSP serial port */
  300. #define ICU_INT_MUE 24 /* msg unit error */
  301. #define ICU_INT_AAUE 23 /* AAU error */
  302. #define ICU_INT_bit23 23
  303. #define ICU_INT_bit22 22
  304. #define ICU_INT_DMA1E 21 /* DMA Ch 1 error */
  305. #define ICU_INT_DMA0E 20 /* DMA Ch 0 error */
  306. #define ICU_INT_MCUE 19 /* memory controller error */
  307. #define ICU_INT_ATUE 18 /* ATU error */
  308. #define ICU_INT_BIUE 17 /* bus interface unit error */
  309. #define ICU_INT_PMU 16 /* XScale PMU */
  310. #define ICU_INT_PPM 15 /* peripheral PMU */
  311. #define ICU_INT_BIST 14 /* ATU Start BIST */
  312. #define ICU_INT_MU 13 /* messaging unit */
  313. #define ICU_INT_I2C1 12 /* i2c unit 1 */
  314. #define ICU_INT_I2C0 11 /* i2c unit 0 */
  315. #define ICU_INT_TMR1 10 /* timer 1 */
  316. #define ICU_INT_TMR0 9 /* timer 0 */
  317. #define ICU_INT_CPPM 8 /* core processor PMU */
  318. #define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */
  319. #define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */
  320. #define ICU_INT_bit5 5
  321. #define ICU_INT_bit4 4
  322. #define ICU_INT_DMA1_EOC 3 /* DMA1 end-of-chain */
  323. #define ICU_INT_DMA1_EOT 2 /* DMA1 end-of-transfer */
  324. #define ICU_INT_DMA0_EOC 1 /* DMA0 end-of-chain */
  325. #define ICU_INT_DMA0_EOT 0 /* DMA0 end-of-transfer */
  326. #define ICU_INT_HWMASK (0xffffffff & \
  327. ~((1 << ICU_INT_bit26) | \
  328. (1 << ICU_INT_bit22) | \
  329. (1 << ICU_INT_bit5) | \
  330. (1 << ICU_INT_bit4)))
  331. /*
  332. * SSP Serial Port
  333. */
  334. #define SSP_SSCR0 0x00 /* SSC control 0 */
  335. #define SSP_SSCR1 0x04 /* SSC control 1 */
  336. #define SSP_SSSR 0x08 /* SSP status */
  337. #define SSP_SSITR 0x0c /* SSP interrupt test */
  338. #define SSP_SSDR 0x10 /* SSP data */
  339. #define SSP_SSCR0_DSIZE(x) ((x) - 1)/* data size: 4..16 */
  340. #define SSP_SSCR0_FRF_SPI (0 << 4) /* Motorola Serial Periph Iface */
  341. #define SSP_SSCR0_FRF_SSP (1U << 4)/* TI Sync. Serial Protocol */
  342. #define SSP_SSCR0_FRF_UWIRE (2U << 4)/* NatSemi Microwire */
  343. #define SSP_SSCR0_FRF_rsvd (3U << 4)/* reserved */
  344. #define SSP_SSCR0_ECS (1U << 6)/* external clock select */
  345. #define SSP_SSCR0_SSE (1U << 7)/* sync. serial port enable */
  346. #define SSP_SSCR0_SCR(x) ((x) << 8)/* serial clock rate */
  347. /* bit rate = 3.6864 * 10e6 /
  348. (2 * (SCR + 1)) */
  349. #define SSP_SSCR1_RIE (1U << 0)/* Rx FIFO interrupt enable */
  350. #define SSP_SSCR1_TIE (1U << 1)/* Tx FIFO interrupt enable */
  351. #define SSP_SSCR1_LBM (1U << 2)/* loopback mode enable */
  352. #define SSP_SSCR1_SPO (1U << 3)/* Moto SPI SSCLK pol. (1 = high) */
  353. #define SSP_SSCR1_SPH (1U << 4)/* Moto SPI SSCLK phase:
  354. 0 = inactive full at start,
  355. 1/2 at end of frame
  356. 1 = inactive 1/2 at start,
  357. full at end of frame */
  358. #define SSP_SSCR1_MWDS (1U << 5)/* Microwire data size:
  359. 0 = 8 bit
  360. 1 = 16 bit */
  361. #define SSP_SSCR1_TFT (((x) - 1) << 6) /* Tx FIFO threshold */
  362. #define SSP_SSCR1_RFT (((x) - 1) << 10)/* Rx FIFO threshold */
  363. #define SSP_SSCR1_EFWR (1U << 14)/* enab. FIFO write/read */
  364. #define SSP_SSCR1_STRF (1U << 15)/* FIFO write/read FIFO select:
  365. 0 = Tx FIFO
  366. 1 = Rx FIFO */
  367. #define SSP_SSSR_TNF (1U << 2)/* Tx FIFO not full */
  368. #define SSP_SSSR_RNE (1U << 3)/* Rx FIFO not empty */
  369. #define SSP_SSSR_BSY (1U << 4)/* SSP is busy */
  370. #define SSP_SSSR_TFS (1U << 5)/* Tx FIFO service request */
  371. #define SSP_SSSR_RFS (1U << 6)/* Rx FIFO service request */
  372. #define SSP_SSSR_ROR (1U << 7)/* Rx FIFO overrun */
  373. #define SSP_SSSR_TFL(x) (((x) >> 8) & 0xf) /* Tx FIFO level */
  374. #define SSP_SSSR_RFL(x) (((x) >> 12) & 0xf)/* Rx FIFO level */
  375. #define SSP_SSITR_TTFS (1U << 5)/* Test Tx FIFO service */
  376. #define SSP_SSITR_TRFS (1U << 6)/* Test Rx FIFO service */
  377. #define SSP_SSITR_TROR (1U << 7)/* Test Rx overrun */
  378. /*
  379. * Peripheral Bus Interface Unit
  380. */
  381. #define PBIU_PBCR 0x00 /* PBIU Control Register */
  382. #define PBIU_PBBAR0 0x08 /* PBIU Base Address Register 0 */
  383. #define PBIU_PBLR0 0x0c /* PBIU Limit Register 0 */
  384. #define PBIU_PBBAR1 0x10 /* PBIU Base Address Register 1 */
  385. #define PBIU_PBLR1 0x14 /* PBIU Limit Register 1 */
  386. #define PBIU_PBBAR2 0x18 /* PBIU Base Address Register 2 */
  387. #define PBIU_PBLR2 0x1c /* PBIU Limit Register 2 */
  388. #define PBIU_PBBAR3 0x20 /* PBIU Base Address Register 3 */
  389. #define PBIU_PBLR3 0x24 /* PBIU Limit Register 3 */
  390. #define PBIU_PBBAR4 0x28 /* PBIU Base Address Register 4 */
  391. #define PBIU_PBLR4 0x2c /* PBIU Limit Register 4 */
  392. #define PBIU_PBBAR5 0x30 /* PBIU Base Address Register 5 */
  393. #define PBIU_PBLR5 0x34 /* PBIU Limit Register 5 */
  394. #define PBIU_DSCR 0x38 /* PBIU Drive Strength Control Reg. */
  395. #define PBIU_MBR0 0x40 /* PBIU Memory-less Boot Reg. 0 */
  396. #define PBIU_MBR1 0x60 /* PBIU Memory-less Boot Reg. 1 */
  397. #define PBIU_MBR2 0x64 /* PBIU Memory-less Boot Reg. 2 */
  398. #define PBIU_PBCR_PBIEN (1 << 0)
  399. #define PBIU_PBCR_PBI100 (1 << 1)
  400. #define PBIU_PBCR_PBI66 (2 << 1)
  401. #define PBIU_PBCR_PBI33 (3 << 1)
  402. #define PBIU_PBCR_PBBEN (1 << 3)
  403. #define PBIU_PBARx_WIDTH8 (0 << 0)
  404. #define PBIU_PBARx_WIDTH16 (1 << 0)
  405. #define PBIU_PBARx_WIDTH32 (2 << 0)
  406. #define PBIU_PBARx_ADWAIT4 (0 << 2)
  407. #define PBIU_PBARx_ADWAIT8 (1 << 2)
  408. #define PBIU_PBARx_ADWAIT12 (2 << 2)
  409. #define PBIU_PBARx_ADWAIT16 (3 << 2)
  410. #define PBIU_PBARx_ADWAIT20 (4 << 2)
  411. #define PBIU_PBARx_RCWAIT1 (0 << 6)
  412. #define PBIU_PBARx_RCWAIT4 (1 << 6)
  413. #define PBIU_PBARx_RCWAIT8 (2 << 6)
  414. #define PBIU_PBARx_RCWAIT12 (3 << 6)
  415. #define PBIU_PBARx_RCWAIT16 (4 << 6)
  416. #define PBIU_PBARx_RCWAIT20 (5 << 6)
  417. #define PBIU_PBARx_FWE (1 << 9)
  418. #define PBIU_BASE_MASK 0xfffff000U
  419. #define PBIU_PBLRx_SIZE(x) (~((x) - 1))
  420. /*
  421. * Messaging Unit
  422. */
  423. #define MU_IMR0 0x0010 /* MU Inbound Message Register 0 */
  424. #define MU_IMR1 0x0014 /* MU Inbound Message Register 1 */
  425. #define MU_OMR0 0x0018 /* MU Outbound Message Register 0 */
  426. #define MU_OMR1 0x001c /* MU Outbound Message Register 1 */
  427. #define MU_IDR 0x0020 /* MU Inbound Doorbell Register */
  428. #define MU_IISR 0x0024 /* MU Inbound Interrupt Status Reg */
  429. #define MU_IIMR 0x0028 /* MU Inbound Interrupt Mask Reg */
  430. #define MU_ODR 0x002c /* MU Outbound Doorbell Register */
  431. #define MU_OISR 0x0030 /* MU Outbound Interrupt Status Reg */
  432. #define MU_OIMR 0x0034 /* MU Outbound Interrupt Mask Reg */
  433. #define MU_MUCR 0x0050 /* MU Configuration Register */
  434. #define MU_QBAR 0x0054 /* MU Queue Base Address Register */
  435. #define MU_IFHPR 0x0060 /* MU Inbound Free Head Pointer Reg */
  436. #define MU_IFTPR 0x0064 /* MU Inbound Free Tail Pointer Reg */
  437. #define MU_IPHPR 0x0068 /* MU Inbound Post Head Pointer Reg */
  438. #define MU_IPTPR 0x006c /* MU Inbound Post Tail Pointer Reg */
  439. #define MU_OFHPR 0x0070 /* MU Outbound Free Head Pointer Reg */
  440. #define MU_OFTPR 0x0074 /* MU Outbound Free Tail Pointer Reg */
  441. #define MU_OPHPR 0x0078 /* MU Outbound Post Head Pointer Reg */
  442. #define MU_OPTPR 0x007c /* MU Outbound Post Tail Pointer Reg */
  443. #define MU_IAR 0x0080 /* MU Index Address Register */
  444. #define MU_IIMR_IRI (1 << 6) /* Index Register Interrupt */
  445. #define MU_IIMR_OFQFI (1 << 5) /* Outbound Free Queue Full Int. */
  446. #define MU_IIMR_IPQI (1 << 4) /* Inbound Post Queue Interrupt */
  447. #define MU_IIMR_EDI (1 << 3) /* Error Doorbell Interrupt */
  448. #define MU_IIMR_IDI (1 << 2) /* Inbound Doorbell Interrupt */
  449. #define MU_IIMR_IM1I (1 << 1) /* Inbound Message 1 Interrupt */
  450. #define MU_IIMR_IM0I (1 << 0) /* Inbound Message 0 Interrupt */
  451. #endif /* _ARM_XSCALE_I80321REG_H_ */