m5206e.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:17k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* m5206e.h - Motorola MCF5206e CPU control registers */
  2. /* Copyright 1994-2001 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01a,05mar01,hjg  Created from m5206.h
  7. */
  8. /*
  9. This file contains I/O addresses and related constants for the MCF5206e
  10. */
  11. #ifndef __INCm5206eh
  12. #define __INCm5206eh
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /*
  17. Need to use a distinct cast macro in order to not conflict with other
  18. include files.
  19. */
  20. #ifdef _ASMLANGUAGE
  21. #define CAST_M5206E(x)
  22. #else /* _ASMLANGUAGE */
  23. #define CAST_M5206E(x) (x)
  24. #endif /* _ASMLANGUAGE */
  25. /* Size of internal SRAM */
  26. #define M5206E_SRAM_SIZE 8192 /* size of internal SRAM */
  27. /* System Integration Module register addresses */
  28. #define M5206E_SIM_SIMR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x003))
  29. /* External IP1-7 */
  30. #define M5206E_SIM_ICR1(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x014))
  31. #define M5206E_SIM_ICR2(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x015))
  32. #define M5206E_SIM_ICR3(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x016))
  33. #define M5206E_SIM_ICR4(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x017))
  34. #define M5206E_SIM_ICR5(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x018))
  35. #define M5206E_SIM_ICR6(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x019))
  36. #define M5206E_SIM_ICR7(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01a))
  37. /* SWT */
  38. #define M5206E_SIM_ICR8(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01b))
  39. /* Timer 1 INT */
  40. #define M5206E_SIM_ICR9(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01c))
  41. /* Timer 2 INT */
  42. #define M5206E_SIM_ICR10(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01d))
  43. /* MBUS interrupt */
  44. #define M5206E_SIM_ICR11(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01e))
  45. /* UART 1 INT */
  46. #define M5206E_SIM_ICR12(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x01f))
  47. /* UART 2 INT */
  48. #define M5206E_SIM_ICR13(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x020))
  49. /* DMA Channel 0 Interrupt */
  50. #define M5206E_SIM_ICR14(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x021))
  51. /* DMA Channel 1 Interrupt */
  52. #define M5206E_SIM_ICR15(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x022))
  53. /* Interrupt Mask Register */
  54. #define M5206E_SIM_IMR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x036))
  55. /* Interrupt Pending Register */
  56. #define M5206E_SIM_IPR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x03a))
  57. /* Reset Status Register */
  58. #define M5206E_SIM_RSR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x040))
  59. /* System Protection Control Register */
  60. #define M5206E_SIM_SYPCR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x041))
  61. /* Software Watchdog Interrupt Vector Register */
  62. #define M5206E_SIM_SWIVR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x042))
  63. /* Software Watchdog Service Register */
  64. #define M5206E_SIM_SWSR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x043))
  65. /* DRAM */
  66. /* DRAM Controller Refresh */
  67. #define M5206E_DCRR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x046))
  68. /* DRAM Controller Timing Register */
  69. #define M5206E_DCTR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x04a))
  70. /* DRAM Controller Address Register - Bank 0 */
  71. #define M5206E_DCAR0(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x04c))
  72. /* DRAM Controller Mask Register - Bank 0 */
  73. #define M5206E_DCMR0(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x050))
  74. /* DRAM Controller Control Register - Bank 0 */
  75. #define M5206E_DCCR0(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x057))
  76. /* DRAM Controller Address Register - Bank 1 */
  77. #define M5206E_DCAR1(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x058))
  78. /* DRAM Controller Mask Register - Bank 1 */
  79. #define M5206E_DCMR1(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x05c))
  80. /* DRAM Controller Control Register - Bank 1 */
  81. #define M5206E_DCCR1(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x063))
  82. /* Chip-Select Address Register - Bank 0 */
  83. #define M5206E_SIM_CSAR0(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x064))
  84. /* Chip-Select Mask Register - Bank 0 */
  85. #define M5206E_SIM_CSMR0(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x068))
  86. /* Chip-Select Control Register - Bank 0 */
  87. #define M5206E_SIM_CSCR0(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x06e))
  88. /* Chip-Select Address Register - Bank 1 */
  89. #define M5206E_SIM_CSAR1(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x070))
  90. /* Chip-Select Mask Register - Bank 1 */
  91. #define M5206E_SIM_CSMR1(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x074))
  92. /* Chip-Select Control Register - Bank 1 */
  93. #define M5206E_SIM_CSCR1(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x07a))
  94. /* Chip-Select Address Register - Bank 2 */
  95. #define M5206E_SIM_CSAR2(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x07c))
  96. /* Chip-Select Mask Register - Bank 2 */
  97. #define M5206E_SIM_CSMR2(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x080))
  98. /* Chip-Select Control Register - Bank 2 */
  99. #define M5206E_SIM_CSCR2(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x086))
  100. /* Chip-Select Address Register - Bank 3 */
  101. #define M5206E_SIM_CSAR3(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x088))
  102. /* Chip-Select Mask Register - Bank 3 */
  103. #define M5206E_SIM_CSMR3(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x08c))
  104. /* Chip-Select Control Register - Bank 3 */
  105. #define M5206E_SIM_CSCR3(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x092))
  106. /* Chip-Select Address Register - Bank 4 */
  107. #define M5206E_SIM_CSAR4(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x094))
  108. /* Chip-Select Mask Register - Bank 4 */
  109. #define M5206E_SIM_CSMR4(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x098))
  110. /* Chip-Select Control Register - Bank 4 */
  111. #define M5206E_SIM_CSCR4(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x09e))
  112. /* Chip-Select Address Register - Bank 5 */
  113. #define M5206E_SIM_CSAR5(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0a0))
  114. /* Chip-Select Mask Register - Bank 5 */
  115. #define M5206E_SIM_CSMR5(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x0a4))
  116. /* Chip-Select Control Register - Bank 5 */
  117. #define M5206E_SIM_CSCR5(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0aa))
  118. /* Chip-Select Address Register - Bank 6 */
  119. #define M5206E_SIM_CSAR6(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0ac))
  120. /* Chip-Select Mask Register - Bank 6 */
  121. #define M5206E_SIM_CSMR6(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x0b0))
  122. /* Chip-Select Control Register - Bank 6 */
  123. #define M5206E_SIM_CSCR6(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0b6))
  124. /* Chip-Select Address Register - Bank 7 */
  125. #define M5206E_SIM_CSAR7(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0b8))
  126. /* Chip-Select Mask Register - Bank 7 */
  127. #define M5206E_SIM_CSMR7(base) (CAST_M5206E(volatile UINT32 *)((base) + 0x0bc))
  128. /* Chip-Select Control Register - Bank 7 */
  129. #define M5206E_SIM_CSCR7(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0c2))
  130. /* Default Memory Control Register */
  131. #define M5206E_SIM_DMCR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0c6))
  132. /* Pin Assignment Register */
  133. #define M5206E_SIM_PAR(base) (CAST_M5206E(volatile UINT16 *)((base) + 0x0ca))
  134. /* Port A Data Direction Register */
  135. #define M5206E_SIM_PADDR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1c5))
  136. /* Port A Data Register */
  137. #define M5206E_SIM_PADAT(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1c9))
  138. /* Timers 1 and 2. */
  139. #define M5206E_TIMER_REG(base, offset, timer)
  140. ((base) + ((timer) * 0x20) + (offset))
  141. /* Timer 1/2 Mode Register */
  142. #define M5206E_TIMER_TMR(base, n)
  143. (CAST_M5206E(volatile UINT16 *) M5206E_TIMER_REG(base, 0x100, n))
  144. /* Timer 1/2 Reference Register */
  145. #define M5206E_TIMER_TRR(base, n)
  146. (CAST_M5206E(volatile UINT16 *) M5206E_TIMER_REG(base, 0x104, n))
  147. /* Timer 1/2 Capture Register */
  148. #define M5206E_TIMER_TCR(base, n)
  149. (CAST_M5206E(volatile UINT16 *) M5206E_TIMER_REG(base, 0x108, n))
  150. /* Timer 1/2 Counter */
  151. #define M5206E_TIMER_TCN(base, n)
  152. (CAST_M5206E(volatile UINT16 *) M5206E_TIMER_REG(base, 0x10c, n))
  153. /* Timer 1/2 Event Register */
  154. #define M5206E_TIMER_TER(base, n)
  155. (CAST_M5206E(volatile UINT8  *) M5206E_TIMER_REG(base, 0x111, n))
  156. /* UART 1 & 2 */
  157. #define M5206E_UART_REG(base, offset, chan)
  158. ((base) + (offset) + ((chan) * 0x40))
  159. /* UART 1/2 Mode Registers */
  160. #define M5206E_UART_MR(base, n)
  161. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x140, n))
  162. /* UART 1/2 Status Register */
  163. #define M5206E_UART_SR(base, n)
  164. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x144, n))
  165. /* UART 1/2 Clock-Select Register */
  166. #define M5206E_UART_CSR(base, n)
  167. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x144, n))
  168. /* UART 1/2 Command Register */
  169. #define M5206E_UART_CR(base, n)
  170. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x148, n))
  171. /* UART 1/2 Receive Buffer */
  172. #define M5206E_UART_RB(base, n)
  173. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x14c, n))
  174. /* UART 1/2 Transmit Buffer */
  175. #define M5206E_UART_TB(base, n)
  176. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x14c, n))
  177. /* UART 1/2 Input Port Change Register */
  178. #define M5206E_UART_IPCR(base, n)
  179. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x150, n))
  180. /* UART 1/2 Input Auxilary Control Register */
  181. #define M5206E_UART_ACR(base, n)
  182. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x150, n))
  183. /* UART 1/2 Interrupt Status Register */
  184. #define M5206E_UART_ISR(base, n)
  185. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x154, n))
  186. /* UART 1/2 Interrupt Mask Register */
  187. #define M5206E_UART_IMR(base, n)
  188. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x154, n))
  189. /* UART 1/2 Baud Rate Generator Prescale MSB */
  190. #define M5206E_UART_BG1(base, n)
  191. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x158, n))
  192. /* UART 1/2 Baud Rate Generator Prescale LSB */
  193. #define M5206E_UART_BG2(base, n)
  194. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x15c, n))
  195. /* UART 1/2 Interrupt Vector Register */
  196. #define M5206E_UART_IVR(base, n)
  197. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x170, n))
  198. /* UART 1/2 Interrupt Port Register */
  199. #define M5206E_UART_IP(base, n)
  200. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x174, n))
  201. /* UART 1/2 Output Port Bit Set CMD */
  202. #define M5206E_UART_OP1(base, n)
  203. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x178, n))
  204. /* UART 1/2 Output Port Bit Reset CMD */
  205. #define M5206E_UART_OP2(base, n)
  206. (CAST_M5206E(volatile UINT8 *) M5206E_UART_REG((base), 0x17c, n))
  207. /* MBUS regs */
  208. /* M-Bus Address Register */
  209. #define M5206E_MADR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1e0))
  210. /* M-Bus Frequency Divider Register */
  211. #define M5206E_MFDR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1e4))
  212. /* M-Bus Control Register */
  213. #define M5206E_MBCR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1e8))
  214. /* M-Bus Control Register */
  215. #define M5206E_MBSR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1ec))
  216. /* M-Bus Data I/O Register */
  217. #define M5206E_MBDR(base) (CAST_M5206E(volatile UINT8  *)((base) + 0x1f0))
  218. /* DMA 0 & 1 */
  219. #define M5206E_DMA_REG(base, offset, chan)
  220. ((base) + (offset) + ((chan) * 0x40))
  221. /* Source Address Registers */
  222. #define M5206E_DMA_DMASAR(base, n)
  223. (CAST_M5206E(volatile UINT32 *) M5206E_DMA_REG((base), 0x200, n))
  224. /* Destination Address Registers */
  225. #define M5206E_DMA_DMADAR(base, n)
  226. (CAST_M5206E(volatile UINT32 *) M5206E_DMA_REG((base), 0x204, n))
  227. /* DMA Control Registers */
  228. #define M5206E_DMA_DCR(base, n)
  229. (CAST_M5206E(volatile UINT16 *) M5206E_DMA_REG((base), 0x208, n))
  230. /* Byte Count Registers */
  231. #define M5206E_DMA_BCR(base, n)
  232. (CAST_M5206E(volatile UINT16 *) M5206E_DMA_REG((base), 0x20c, n))
  233. /* Status Registers */
  234. #define M5206E_DMA_DSR(base, n)
  235. (CAST_M5206E(volatile UINT8 *)  M5206E_DMA_REG((base), 0x210, n))
  236. /* Interrupt Vector Registers */
  237. #define M5206E_DMA_DIVR(base, n)
  238. (CAST_M5206E(volatile UINT8 *)  M5206E_DMA_REG((base), 0x214, n))
  239. /* SIM Module Configuration Register definitions */
  240. /* ICR - encode bits for ICR_xx registers */
  241. #define M5206E_SIM_ICR_BITS(auto, level, priority)
  242.   ((((auto) & 0x01) << 7)
  243.    | (((level) & 0x07) << 2)
  244.    | ((priority) & 0x03))
  245. /* IMR - Interrupt Mask Register bit definitions */
  246. #define M5206E_IMR_IRQ1 (1 << 1)
  247. #define M5206E_IMR_IRQ2 (1 << 2)
  248. #define M5206E_IMR_IRQ3 (1 << 3)
  249. #define M5206E_IMR_IRQ4 (1 << 4)
  250. #define M5206E_IMR_IRQ5 (1 << 5)
  251. #define M5206E_IMR_IRQ6 (1 << 6)
  252. #define M5206E_IMR_IRQ7 (1 << 7)
  253. #define M5206E_IMR_SWT (1 << 8)
  254. #define M5206E_IMR_TIMER1 (1 << 9)
  255. #define M5206E_IMR_TIMER2 (1 << 10)
  256. #define M5206E_IMR_MBUS (1 << 11)
  257. #define M5206E_IMR_UART1 (1 << 12)
  258. #define M5206E_IMR_UART2 (1 << 13)
  259. #define M5206E_IMR_DMA0 (1 << 14)
  260. #define M5206E_IMR_DMA1 (1 << 15)
  261. /* chip select mask registers */
  262. #define M5206E_CS_CSMR_MASK_64k 0x00000000
  263. #define M5206E_CS_CSMR_MASK_128k 0x00010000
  264. #define M5206E_CS_CSMR_MASK_256k 0x00030000
  265. #define M5206E_CS_CSMR_MASK_512k 0x00070000
  266. #define M5206E_CS_CSMR_MASK_1M 0x000f0000
  267. #define M5206E_CS_CSMR_MASK_2M 0x001f0000
  268. #define M5206E_CS_CSMR_MASK_4M 0x003f0000
  269. #define M5206E_CS_CSMR_MASK_8M 0x007f0000
  270. #define M5206E_CS_CSMR_MASK_16M 0x00ff0000
  271. #define M5206E_CS_CSMR_MASK_32M 0x01ff0000
  272. #define M5206E_CS_CSMR_MASK_64M 0x03ff0000
  273. #define M5206E_CS_CSMR_MASK_128M 0x07ff0000
  274. #define M5206E_CS_CSMR_MASK_256M 0x0fff0000
  275. #define M5206E_CS_CSMR_MASK_512M 0x1fff0000
  276. #define M5206E_CS_CSMR_MASK_1G 0x3fff0000
  277. #define M5206E_CS_CSMR_MASK_2G 0x7fff0000
  278. #define M5206E_CS_CSMR_MASK_4G 0xffff0000
  279. #define M5206E_CS_CSMR_CI (1 << 5)  /* /CS1 only */
  280. #define M5206E_CS_CSMR_SC (1 << 4)
  281. #define M5206E_CS_CSMR_SD (1 << 3)
  282. #define M5206E_CS_CSMR_UC (1 << 2)
  283. #define M5206E_CS_CSMR_UD (1 << 1)
  284. /* chip select control regs (CSCR) & default mem control reg (DMCR) */
  285. #define M5206E_CS_CSCR_WS(n) ((n) << 10) /* wait-states */
  286. #define M5206E_CS_CSCR_WS_15 M5206E_CS_CSCR_WS(15)
  287. #define M5206E_CS_CSCR_WS_14 M5206E_CS_CSCR_WS(14)
  288. #define M5206E_CS_CSCR_WS_13 M5206E_CS_CSCR_WS(13)
  289. #define M5206E_CS_CSCR_WS_12 M5206E_CS_CSCR_WS(12)
  290. #define M5206E_CS_CSCR_WS_11 M5206E_CS_CSCR_WS(11)
  291. #define M5206E_CS_CSCR_WS_10 M5206E_CS_CSCR_WS(10)
  292. #define M5206E_CS_CSCR_WS_9 M5206E_CS_CSCR_WS(9)
  293. #define M5206E_CS_CSCR_WS_8 M5206E_CS_CSCR_WS(8)
  294. #define M5206E_CS_CSCR_WS_7 M5206E_CS_CSCR_WS(7)
  295. #define M5206E_CS_CSCR_WS_6 M5206E_CS_CSCR_WS(6)
  296. #define M5206E_CS_CSCR_WS_5 M5206E_CS_CSCR_WS(5)
  297. #define M5206E_CS_CSCR_WS_4 M5206E_CS_CSCR_WS(4)
  298. #define M5206E_CS_CSCR_WS_3 M5206E_CS_CSCR_WS(3)
  299. #define M5206E_CS_CSCR_WS_2 M5206E_CS_CSCR_WS(2)
  300. #define M5206E_CS_CSCR_WS_1 M5206E_CS_CSCR_WS(1)
  301. #define M5206E_CS_CSCR_WS_0 M5206E_CS_CSCR_WS(0)
  302. #define M5206E_CS_CSCR_BRST (1 << 9) /* allow burst access */
  303. #define M5206E_CS_CSCR_AA (1 << 8) /* auto-acknowledge */
  304. #define M5206E_CS_CSCR_PS_32 (0 << 6) /* 32-bit port size */
  305. #define M5206E_CS_CSCR_PS_8 (1 << 6) /* 8-bit port size */
  306. #define M5206E_CS_CSCR_PS_16 (2 << 6) /* 16-bit port size */
  307. #define M5206E_CS_CSCR_EMAA (1 << 5) /* alternate master auto-ack */
  308. #define M5206E_CS_CSCR_ASET (1 << 4) /* address setup enable */
  309. #define M5206E_CS_CSCR_WRAH (1 << 3) /* write address hold enable */
  310. #define M5206E_CS_CSCR_RDAH (1 << 2) /* read address hold enable */
  311. #define M5206E_CS_CSCR_WR (1 << 1) /* write enable */
  312. #define M5206E_CS_CSCR_RD (1 << 0) /* read enable */
  313. /* DRAM Controller Timing Register (DCTR) */
  314. #define M5206E_DCTR_DAEM (1 << 15) /* drive multiplexed addr */
  315. #define M5206E_DCTR_EDO (1 << 14) /* EDO enable */
  316. #define M5206E_DCTR_RCD (1 << 12) /* RAS-to-CAS delay */
  317. #define M5206E_DCTR_RSH1 (1 << 10) /* RAS hold time */
  318. #define M5206E_DCTR_RSH0 (1 << 9) /* RAS hold time */
  319. #define M5206E_DCTR_RP1 (1 << 6) /* RAS precharge time */
  320. #define M5206E_DCTR_RP0 (1 << 5) /* RAS prechange time */
  321. #define M5206E_DCTR_CAS (1 << 3) /* CAS time */
  322. #define M5206E_DCTR_CP (1 << 1) /* CAS precharge time */
  323. #define M5206E_DCTR_CSR (1 << 0) /* CAS setup time */
  324. /* dram controller mask registers */
  325. #define M5206E_DCMR_MASK_128k 0x00000000
  326. #define M5206E_DCMR_MASK_256k 0x00020000
  327. #define M5206E_DCMR_MASK_512k 0x00060000
  328. #define M5206E_DCMR_MASK_1M 0x000e0000
  329. #define M5206E_DCMR_MASK_2M 0x001e0000
  330. #define M5206E_DCMR_MASK_4M 0x003e0000
  331. #define M5206E_DCMR_MASK_8M 0x007e0000
  332. #define M5206E_DCMR_MASK_16M 0x00fe0000
  333. #define M5206E_DCMR_MASK_32M 0x01fe0000
  334. #define M5206E_DCMR_MASK_64M 0x03fe0000
  335. #define M5206E_DCMR_MASK_128M 0x07fe0000
  336. #define M5206E_DCMR_MASK_256M 0x0ffe0000
  337. #define M5206E_DCMR_MASK_512M 0x1ffe0000
  338. #define M5206E_DCMR_MASK_1G 0x3ffe0000
  339. #define M5206E_DCMR_MASK_2G 0x7ffe0000
  340. #define M5206E_DCMR_MASK_4G 0xfffe0000
  341. #define M5206E_DCMR_SC (1 << 4)
  342. #define M5206E_DCMR_SD (1 << 3)
  343. #define M5206E_DCMR_UC (1 << 2)
  344. #define M5206E_DCMR_UD (1 << 1)
  345. /* DRAM Controller Control Register */
  346. #define M5206E_DCCR_PS_32 (0 << 6) /* 32-bit port size */
  347. #define M5206E_DCCR_PS_8 (1 << 6) /* 8-bit port size */
  348. #define M5206E_DCCR_PS_16 (3 << 6) /* 16-bit port size */
  349. #define M5206E_DCCR_BPS_512B (0 << 4) /* 512byte bank page size */
  350. #define M5206E_DCCR_BPS_1K (1 << 4) /* 1Kb bank page size */
  351. #define M5206E_DCCR_BPS_2K (2 << 4) /* 2Kb bank page size */
  352. #define M5206E_DCCR_MODE_NORMAL (0 << 2) /* normal page mode */
  353. #define M5206E_DCCR_MODE_BURST (1 << 2) /* burst page mode */
  354. #define M5206E_DCCR_MODE_FAST (3 << 2) /* fast page mode */
  355. #define M5206E_DCCR_WR (1 << 1) /* Signal on write xfer */
  356. #define M5206E_DCCR_RD (1 << 0) /* Signal on read xfer */
  357. #ifdef __cplusplus
  358. }
  359. #endif
  360. #endif /* __INCm5206eh */