defBF532.h 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. /*
  2. * System & MMR bit and Address definitions for ADSP-BF532
  3. *
  4. * Copyright 2005-2010 Analog Devices Inc.
  5. *
  6. * Licensed under the Clear BSD license or the GPL-2 (or later)
  7. */
  8. #ifndef _DEF_BF532_H
  9. #define _DEF_BF532_H
  10. /*********************************************************************************** */
  11. /* System MMR Register Map */
  12. /*********************************************************************************** */
  13. /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
  14. #define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */
  15. #define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */
  16. #define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */
  17. #define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */
  18. #define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */
  19. #define CHIPID 0xFFC00014 /* Chip ID Register */
  20. /* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
  21. #define SWRST 0xFFC00100 /* Software Reset Register (16-bit) */
  22. #define SYSCR 0xFFC00104 /* System Configuration registe */
  23. #define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */
  24. #define SIC_IMASK 0xFFC0010C /* Interrupt Mask Register */
  25. #define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */
  26. #define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */
  27. #define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */
  28. #define SIC_ISR 0xFFC00120 /* Interrupt Status Register */
  29. #define SIC_IWR 0xFFC00124 /* Interrupt Wakeup Register */
  30. /* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
  31. #define WDOG_CTL 0xFFC00200 /* Watchdog Control Register */
  32. #define WDOG_CNT 0xFFC00204 /* Watchdog Count Register */
  33. #define WDOG_STAT 0xFFC00208 /* Watchdog Status Register */
  34. /* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
  35. #define RTC_STAT 0xFFC00300 /* RTC Status Register */
  36. #define RTC_ICTL 0xFFC00304 /* RTC Interrupt Control Register */
  37. #define RTC_ISTAT 0xFFC00308 /* RTC Interrupt Status Register */
  38. #define RTC_SWCNT 0xFFC0030C /* RTC Stopwatch Count Register */
  39. #define RTC_ALARM 0xFFC00310 /* RTC Alarm Time Register */
  40. #define RTC_FAST 0xFFC00314 /* RTC Prescaler Enable Register */
  41. #define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Register (alternate macro) */
  42. /* UART Controller (0xFFC00400 - 0xFFC004FF) */
  43. /*
  44. * Because include/linux/serial_reg.h have defined UART_*,
  45. * So we define blackfin uart regs to BFIN_UART_*.
  46. */
  47. #define BFIN_UART_THR 0xFFC00400 /* Transmit Holding register */
  48. #define BFIN_UART_RBR 0xFFC00400 /* Receive Buffer register */
  49. #define BFIN_UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */
  50. #define BFIN_UART_IER 0xFFC00404 /* Interrupt Enable Register */
  51. #define BFIN_UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */
  52. #define BFIN_UART_IIR 0xFFC00408 /* Interrupt Identification Register */
  53. #define BFIN_UART_LCR 0xFFC0040C /* Line Control Register */
  54. #define BFIN_UART_MCR 0xFFC00410 /* Modem Control Register */
  55. #define BFIN_UART_LSR 0xFFC00414 /* Line Status Register */
  56. #if 0
  57. #define BFIN_UART_MSR 0xFFC00418 /* Modem Status Register (UNUSED in ADSP-BF532) */
  58. #endif
  59. #define BFIN_UART_SCR 0xFFC0041C /* SCR Scratch Register */
  60. #define BFIN_UART_GCTL 0xFFC00424 /* Global Control Register */
  61. /* SPI Controller (0xFFC00500 - 0xFFC005FF) */
  62. #define SPI0_REGBASE 0xFFC00500
  63. #define SPI_CTL 0xFFC00500 /* SPI Control Register */
  64. #define SPI_FLG 0xFFC00504 /* SPI Flag register */
  65. #define SPI_STAT 0xFFC00508 /* SPI Status register */
  66. #define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */
  67. #define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */
  68. #define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */
  69. #define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */
  70. /* TIMER 0, 1, 2 Registers (0xFFC00600 - 0xFFC006FF) */
  71. #define TIMER0_CONFIG 0xFFC00600 /* Timer 0 Configuration Register */
  72. #define TIMER0_COUNTER 0xFFC00604 /* Timer 0 Counter Register */
  73. #define TIMER0_PERIOD 0xFFC00608 /* Timer 0 Period Register */
  74. #define TIMER0_WIDTH 0xFFC0060C /* Timer 0 Width Register */
  75. #define TIMER1_CONFIG 0xFFC00610 /* Timer 1 Configuration Register */
  76. #define TIMER1_COUNTER 0xFFC00614 /* Timer 1 Counter Register */
  77. #define TIMER1_PERIOD 0xFFC00618 /* Timer 1 Period Register */
  78. #define TIMER1_WIDTH 0xFFC0061C /* Timer 1 Width Register */
  79. #define TIMER2_CONFIG 0xFFC00620 /* Timer 2 Configuration Register */
  80. #define TIMER2_COUNTER 0xFFC00624 /* Timer 2 Counter Register */
  81. #define TIMER2_PERIOD 0xFFC00628 /* Timer 2 Period Register */
  82. #define TIMER2_WIDTH 0xFFC0062C /* Timer 2 Width Register */
  83. #define TIMER_ENABLE 0xFFC00640 /* Timer Enable Register */
  84. #define TIMER_DISABLE 0xFFC00644 /* Timer Disable Register */
  85. #define TIMER_STATUS 0xFFC00648 /* Timer Status Register */
  86. /* General Purpose IO (0xFFC00700 - 0xFFC007FF) */
  87. #define FIO_FLAG_D 0xFFC00700 /* Flag Mask to directly specify state of pins */
  88. #define FIO_FLAG_C 0xFFC00704 /* Peripheral Interrupt Flag Register (clear) */
  89. #define FIO_FLAG_S 0xFFC00708 /* Peripheral Interrupt Flag Register (set) */
  90. #define FIO_FLAG_T 0xFFC0070C /* Flag Mask to directly toggle state of pins */
  91. #define FIO_MASKA_D 0xFFC00710 /* Flag Mask Interrupt A Register (set directly) */
  92. #define FIO_MASKA_C 0xFFC00714 /* Flag Mask Interrupt A Register (clear) */
  93. #define FIO_MASKA_S 0xFFC00718 /* Flag Mask Interrupt A Register (set) */
  94. #define FIO_MASKA_T 0xFFC0071C /* Flag Mask Interrupt A Register (toggle) */
  95. #define FIO_MASKB_D 0xFFC00720 /* Flag Mask Interrupt B Register (set directly) */
  96. #define FIO_MASKB_C 0xFFC00724 /* Flag Mask Interrupt B Register (clear) */
  97. #define FIO_MASKB_S 0xFFC00728 /* Flag Mask Interrupt B Register (set) */
  98. #define FIO_MASKB_T 0xFFC0072C /* Flag Mask Interrupt B Register (toggle) */
  99. #define FIO_DIR 0xFFC00730 /* Peripheral Flag Direction Register */
  100. #define FIO_POLAR 0xFFC00734 /* Flag Source Polarity Register */
  101. #define FIO_EDGE 0xFFC00738 /* Flag Source Sensitivity Register */
  102. #define FIO_BOTH 0xFFC0073C /* Flag Set on BOTH Edges Register */
  103. #define FIO_INEN 0xFFC00740 /* Flag Input Enable Register */
  104. /* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
  105. #define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */
  106. #define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */
  107. #define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */
  108. #define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */
  109. #define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */
  110. #define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */
  111. #define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */
  112. #define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */
  113. #define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */
  114. #define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */
  115. #define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */
  116. #define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */
  117. #define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */
  118. #define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */
  119. #define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */
  120. #define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */
  121. #define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */
  122. #define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */
  123. #define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */
  124. #define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */
  125. #define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */
  126. #define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */
  127. /* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
  128. #define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */
  129. #define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */
  130. #define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */
  131. #define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */
  132. #define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */
  133. #define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */
  134. #define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */
  135. #define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */
  136. #define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */
  137. #define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */
  138. #define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */
  139. #define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */
  140. #define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */
  141. #define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */
  142. #define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */
  143. #define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */
  144. #define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */
  145. #define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */
  146. #define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */
  147. #define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */
  148. #define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */
  149. #define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */
  150. /* Asynchronous Memory Controller - External Bus Interface Unit */
  151. #define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */
  152. #define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */
  153. #define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */
  154. /* SDRAM Controller External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
  155. #define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */
  156. #define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */
  157. #define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */
  158. #define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */
  159. /* DMA Traffic controls */
  160. #define DMAC_TC_PER 0xFFC00B0C /* Traffic Control Periods Register */
  161. #define DMAC_TC_CNT 0xFFC00B10 /* Traffic Control Current Counts Register */
  162. /* DMA Controller (0xFFC00C00 - 0xFFC00FFF) */
  163. #define DMA0_CONFIG 0xFFC00C08 /* DMA Channel 0 Configuration Register */
  164. #define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */
  165. #define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */
  166. #define DMA0_X_COUNT 0xFFC00C10 /* DMA Channel 0 X Count Register */
  167. #define DMA0_Y_COUNT 0xFFC00C18 /* DMA Channel 0 Y Count Register */
  168. #define DMA0_X_MODIFY 0xFFC00C14 /* DMA Channel 0 X Modify Register */
  169. #define DMA0_Y_MODIFY 0xFFC00C1C /* DMA Channel 0 Y Modify Register */
  170. #define DMA0_CURR_DESC_PTR 0xFFC00C20 /* DMA Channel 0 Current Descriptor Pointer Register */
  171. #define DMA0_CURR_ADDR 0xFFC00C24 /* DMA Channel 0 Current Address Register */
  172. #define DMA0_CURR_X_COUNT 0xFFC00C30 /* DMA Channel 0 Current X Count Register */
  173. #define DMA0_CURR_Y_COUNT 0xFFC00C38 /* DMA Channel 0 Current Y Count Register */
  174. #define DMA0_IRQ_STATUS 0xFFC00C28 /* DMA Channel 0 Interrupt/Status Register */
  175. #define DMA0_PERIPHERAL_MAP 0xFFC00C2C /* DMA Channel 0 Peripheral Map Register */
  176. #define DMA1_CONFIG 0xFFC00C48 /* DMA Channel 1 Configuration Register */
  177. #define DMA1_NEXT_DESC_PTR 0xFFC00C40 /* DMA Channel 1 Next Descriptor Pointer Register */
  178. #define DMA1_START_ADDR 0xFFC00C44 /* DMA Channel 1 Start Address Register */
  179. #define DMA1_X_COUNT 0xFFC00C50 /* DMA Channel 1 X Count Register */
  180. #define DMA1_Y_COUNT 0xFFC00C58 /* DMA Channel 1 Y Count Register */
  181. #define DMA1_X_MODIFY 0xFFC00C54 /* DMA Channel 1 X Modify Register */
  182. #define DMA1_Y_MODIFY 0xFFC00C5C /* DMA Channel 1 Y Modify Register */
  183. #define DMA1_CURR_DESC_PTR 0xFFC00C60 /* DMA Channel 1 Current Descriptor Pointer Register */
  184. #define DMA1_CURR_ADDR 0xFFC00C64 /* DMA Channel 1 Current Address Register */
  185. #define DMA1_CURR_X_COUNT 0xFFC00C70 /* DMA Channel 1 Current X Count Register */
  186. #define DMA1_CURR_Y_COUNT 0xFFC00C78 /* DMA Channel 1 Current Y Count Register */
  187. #define DMA1_IRQ_STATUS 0xFFC00C68 /* DMA Channel 1 Interrupt/Status Register */
  188. #define DMA1_PERIPHERAL_MAP 0xFFC00C6C /* DMA Channel 1 Peripheral Map Register */
  189. #define DMA2_CONFIG 0xFFC00C88 /* DMA Channel 2 Configuration Register */
  190. #define DMA2_NEXT_DESC_PTR 0xFFC00C80 /* DMA Channel 2 Next Descriptor Pointer Register */
  191. #define DMA2_START_ADDR 0xFFC00C84 /* DMA Channel 2 Start Address Register */
  192. #define DMA2_X_COUNT 0xFFC00C90 /* DMA Channel 2 X Count Register */
  193. #define DMA2_Y_COUNT 0xFFC00C98 /* DMA Channel 2 Y Count Register */
  194. #define DMA2_X_MODIFY 0xFFC00C94 /* DMA Channel 2 X Modify Register */
  195. #define DMA2_Y_MODIFY 0xFFC00C9C /* DMA Channel 2 Y Modify Register */
  196. #define DMA2_CURR_DESC_PTR 0xFFC00CA0 /* DMA Channel 2 Current Descriptor Pointer Register */
  197. #define DMA2_CURR_ADDR 0xFFC00CA4 /* DMA Channel 2 Current Address Register */
  198. #define DMA2_CURR_X_COUNT 0xFFC00CB0 /* DMA Channel 2 Current X Count Register */
  199. #define DMA2_CURR_Y_COUNT 0xFFC00CB8 /* DMA Channel 2 Current Y Count Register */
  200. #define DMA2_IRQ_STATUS 0xFFC00CA8 /* DMA Channel 2 Interrupt/Status Register */
  201. #define DMA2_PERIPHERAL_MAP 0xFFC00CAC /* DMA Channel 2 Peripheral Map Register */
  202. #define DMA3_CONFIG 0xFFC00CC8 /* DMA Channel 3 Configuration Register */
  203. #define DMA3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA Channel 3 Next Descriptor Pointer Register */
  204. #define DMA3_START_ADDR 0xFFC00CC4 /* DMA Channel 3 Start Address Register */
  205. #define DMA3_X_COUNT 0xFFC00CD0 /* DMA Channel 3 X Count Register */
  206. #define DMA3_Y_COUNT 0xFFC00CD8 /* DMA Channel 3 Y Count Register */
  207. #define DMA3_X_MODIFY 0xFFC00CD4 /* DMA Channel 3 X Modify Register */
  208. #define DMA3_Y_MODIFY 0xFFC00CDC /* DMA Channel 3 Y Modify Register */
  209. #define DMA3_CURR_DESC_PTR 0xFFC00CE0 /* DMA Channel 3 Current Descriptor Pointer Register */
  210. #define DMA3_CURR_ADDR 0xFFC00CE4 /* DMA Channel 3 Current Address Register */
  211. #define DMA3_CURR_X_COUNT 0xFFC00CF0 /* DMA Channel 3 Current X Count Register */
  212. #define DMA3_CURR_Y_COUNT 0xFFC00CF8 /* DMA Channel 3 Current Y Count Register */
  213. #define DMA3_IRQ_STATUS 0xFFC00CE8 /* DMA Channel 3 Interrupt/Status Register */
  214. #define DMA3_PERIPHERAL_MAP 0xFFC00CEC /* DMA Channel 3 Peripheral Map Register */
  215. #define DMA4_CONFIG 0xFFC00D08 /* DMA Channel 4 Configuration Register */
  216. #define DMA4_NEXT_DESC_PTR 0xFFC00D00 /* DMA Channel 4 Next Descriptor Pointer Register */
  217. #define DMA4_START_ADDR 0xFFC00D04 /* DMA Channel 4 Start Address Register */
  218. #define DMA4_X_COUNT 0xFFC00D10 /* DMA Channel 4 X Count Register */
  219. #define DMA4_Y_COUNT 0xFFC00D18 /* DMA Channel 4 Y Count Register */
  220. #define DMA4_X_MODIFY 0xFFC00D14 /* DMA Channel 4 X Modify Register */
  221. #define DMA4_Y_MODIFY 0xFFC00D1C /* DMA Channel 4 Y Modify Register */
  222. #define DMA4_CURR_DESC_PTR 0xFFC00D20 /* DMA Channel 4 Current Descriptor Pointer Register */
  223. #define DMA4_CURR_ADDR 0xFFC00D24 /* DMA Channel 4 Current Address Register */
  224. #define DMA4_CURR_X_COUNT 0xFFC00D30 /* DMA Channel 4 Current X Count Register */
  225. #define DMA4_CURR_Y_COUNT 0xFFC00D38 /* DMA Channel 4 Current Y Count Register */
  226. #define DMA4_IRQ_STATUS 0xFFC00D28 /* DMA Channel 4 Interrupt/Status Register */
  227. #define DMA4_PERIPHERAL_MAP 0xFFC00D2C /* DMA Channel 4 Peripheral Map Register */
  228. #define DMA5_CONFIG 0xFFC00D48 /* DMA Channel 5 Configuration Register */
  229. #define DMA5_NEXT_DESC_PTR 0xFFC00D40 /* DMA Channel 5 Next Descriptor Pointer Register */
  230. #define DMA5_START_ADDR 0xFFC00D44 /* DMA Channel 5 Start Address Register */
  231. #define DMA5_X_COUNT 0xFFC00D50 /* DMA Channel 5 X Count Register */
  232. #define DMA5_Y_COUNT 0xFFC00D58 /* DMA Channel 5 Y Count Register */
  233. #define DMA5_X_MODIFY 0xFFC00D54 /* DMA Channel 5 X Modify Register */
  234. #define DMA5_Y_MODIFY 0xFFC00D5C /* DMA Channel 5 Y Modify Register */
  235. #define DMA5_CURR_DESC_PTR 0xFFC00D60 /* DMA Channel 5 Current Descriptor Pointer Register */
  236. #define DMA5_CURR_ADDR 0xFFC00D64 /* DMA Channel 5 Current Address Register */
  237. #define DMA5_CURR_X_COUNT 0xFFC00D70 /* DMA Channel 5 Current X Count Register */
  238. #define DMA5_CURR_Y_COUNT 0xFFC00D78 /* DMA Channel 5 Current Y Count Register */
  239. #define DMA5_IRQ_STATUS 0xFFC00D68 /* DMA Channel 5 Interrupt/Status Register */
  240. #define DMA5_PERIPHERAL_MAP 0xFFC00D6C /* DMA Channel 5 Peripheral Map Register */
  241. #define DMA6_CONFIG 0xFFC00D88 /* DMA Channel 6 Configuration Register */
  242. #define DMA6_NEXT_DESC_PTR 0xFFC00D80 /* DMA Channel 6 Next Descriptor Pointer Register */
  243. #define DMA6_START_ADDR 0xFFC00D84 /* DMA Channel 6 Start Address Register */
  244. #define DMA6_X_COUNT 0xFFC00D90 /* DMA Channel 6 X Count Register */
  245. #define DMA6_Y_COUNT 0xFFC00D98 /* DMA Channel 6 Y Count Register */
  246. #define DMA6_X_MODIFY 0xFFC00D94 /* DMA Channel 6 X Modify Register */
  247. #define DMA6_Y_MODIFY 0xFFC00D9C /* DMA Channel 6 Y Modify Register */
  248. #define DMA6_CURR_DESC_PTR 0xFFC00DA0 /* DMA Channel 6 Current Descriptor Pointer Register */
  249. #define DMA6_CURR_ADDR 0xFFC00DA4 /* DMA Channel 6 Current Address Register */
  250. #define DMA6_CURR_X_COUNT 0xFFC00DB0 /* DMA Channel 6 Current X Count Register */
  251. #define DMA6_CURR_Y_COUNT 0xFFC00DB8 /* DMA Channel 6 Current Y Count Register */
  252. #define DMA6_IRQ_STATUS 0xFFC00DA8 /* DMA Channel 6 Interrupt/Status Register */
  253. #define DMA6_PERIPHERAL_MAP 0xFFC00DAC /* DMA Channel 6 Peripheral Map Register */
  254. #define DMA7_CONFIG 0xFFC00DC8 /* DMA Channel 7 Configuration Register */
  255. #define DMA7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA Channel 7 Next Descriptor Pointer Register */
  256. #define DMA7_START_ADDR 0xFFC00DC4 /* DMA Channel 7 Start Address Register */
  257. #define DMA7_X_COUNT 0xFFC00DD0 /* DMA Channel 7 X Count Register */
  258. #define DMA7_Y_COUNT 0xFFC00DD8 /* DMA Channel 7 Y Count Register */
  259. #define DMA7_X_MODIFY 0xFFC00DD4 /* DMA Channel 7 X Modify Register */
  260. #define DMA7_Y_MODIFY 0xFFC00DDC /* DMA Channel 7 Y Modify Register */
  261. #define DMA7_CURR_DESC_PTR 0xFFC00DE0 /* DMA Channel 7 Current Descriptor Pointer Register */
  262. #define DMA7_CURR_ADDR 0xFFC00DE4 /* DMA Channel 7 Current Address Register */
  263. #define DMA7_CURR_X_COUNT 0xFFC00DF0 /* DMA Channel 7 Current X Count Register */
  264. #define DMA7_CURR_Y_COUNT 0xFFC00DF8 /* DMA Channel 7 Current Y Count Register */
  265. #define DMA7_IRQ_STATUS 0xFFC00DE8 /* DMA Channel 7 Interrupt/Status Register */
  266. #define DMA7_PERIPHERAL_MAP 0xFFC00DEC /* DMA Channel 7 Peripheral Map Register */
  267. #define MDMA_D1_CONFIG 0xFFC00E88 /* MemDMA Stream 1 Destination Configuration Register */
  268. #define MDMA_D1_NEXT_DESC_PTR 0xFFC00E80 /* MemDMA Stream 1 Destination Next Descriptor Pointer Register */
  269. #define MDMA_D1_START_ADDR 0xFFC00E84 /* MemDMA Stream 1 Destination Start Address Register */
  270. #define MDMA_D1_X_COUNT 0xFFC00E90 /* MemDMA Stream 1 Destination X Count Register */
  271. #define MDMA_D1_Y_COUNT 0xFFC00E98 /* MemDMA Stream 1 Destination Y Count Register */
  272. #define MDMA_D1_X_MODIFY 0xFFC00E94 /* MemDMA Stream 1 Destination X Modify Register */
  273. #define MDMA_D1_Y_MODIFY 0xFFC00E9C /* MemDMA Stream 1 Destination Y Modify Register */
  274. #define MDMA_D1_CURR_DESC_PTR 0xFFC00EA0 /* MemDMA Stream 1 Destination Current Descriptor Pointer Register */
  275. #define MDMA_D1_CURR_ADDR 0xFFC00EA4 /* MemDMA Stream 1 Destination Current Address Register */
  276. #define MDMA_D1_CURR_X_COUNT 0xFFC00EB0 /* MemDMA Stream 1 Destination Current X Count Register */
  277. #define MDMA_D1_CURR_Y_COUNT 0xFFC00EB8 /* MemDMA Stream 1 Destination Current Y Count Register */
  278. #define MDMA_D1_IRQ_STATUS 0xFFC00EA8 /* MemDMA Stream 1 Destination Interrupt/Status Register */
  279. #define MDMA_D1_PERIPHERAL_MAP 0xFFC00EAC /* MemDMA Stream 1 Destination Peripheral Map Register */
  280. #define MDMA_S1_CONFIG 0xFFC00EC8 /* MemDMA Stream 1 Source Configuration Register */
  281. #define MDMA_S1_NEXT_DESC_PTR 0xFFC00EC0 /* MemDMA Stream 1 Source Next Descriptor Pointer Register */
  282. #define MDMA_S1_START_ADDR 0xFFC00EC4 /* MemDMA Stream 1 Source Start Address Register */
  283. #define MDMA_S1_X_COUNT 0xFFC00ED0 /* MemDMA Stream 1 Source X Count Register */
  284. #define MDMA_S1_Y_COUNT 0xFFC00ED8 /* MemDMA Stream 1 Source Y Count Register */
  285. #define MDMA_S1_X_MODIFY 0xFFC00ED4 /* MemDMA Stream 1 Source X Modify Register */
  286. #define MDMA_S1_Y_MODIFY 0xFFC00EDC /* MemDMA Stream 1 Source Y Modify Register */
  287. #define MDMA_S1_CURR_DESC_PTR 0xFFC00EE0 /* MemDMA Stream 1 Source Current Descriptor Pointer Register */
  288. #define MDMA_S1_CURR_ADDR 0xFFC00EE4 /* MemDMA Stream 1 Source Current Address Register */
  289. #define MDMA_S1_CURR_X_COUNT 0xFFC00EF0 /* MemDMA Stream 1 Source Current X Count Register */
  290. #define MDMA_S1_CURR_Y_COUNT 0xFFC00EF8 /* MemDMA Stream 1 Source Current Y Count Register */
  291. #define MDMA_S1_IRQ_STATUS 0xFFC00EE8 /* MemDMA Stream 1 Source Interrupt/Status Register */
  292. #define MDMA_S1_PERIPHERAL_MAP 0xFFC00EEC /* MemDMA Stream 1 Source Peripheral Map Register */
  293. #define MDMA_D0_CONFIG 0xFFC00E08 /* MemDMA Stream 0 Destination Configuration Register */
  294. #define MDMA_D0_NEXT_DESC_PTR 0xFFC00E00 /* MemDMA Stream 0 Destination Next Descriptor Pointer Register */
  295. #define MDMA_D0_START_ADDR 0xFFC00E04 /* MemDMA Stream 0 Destination Start Address Register */
  296. #define MDMA_D0_X_COUNT 0xFFC00E10 /* MemDMA Stream 0 Destination X Count Register */
  297. #define MDMA_D0_Y_COUNT 0xFFC00E18 /* MemDMA Stream 0 Destination Y Count Register */
  298. #define MDMA_D0_X_MODIFY 0xFFC00E14 /* MemDMA Stream 0 Destination X Modify Register */
  299. #define MDMA_D0_Y_MODIFY 0xFFC00E1C /* MemDMA Stream 0 Destination Y Modify Register */
  300. #define MDMA_D0_CURR_DESC_PTR 0xFFC00E20 /* MemDMA Stream 0 Destination Current Descriptor Pointer Register */
  301. #define MDMA_D0_CURR_ADDR 0xFFC00E24 /* MemDMA Stream 0 Destination Current Address Register */
  302. #define MDMA_D0_CURR_X_COUNT 0xFFC00E30 /* MemDMA Stream 0 Destination Current X Count Register */
  303. #define MDMA_D0_CURR_Y_COUNT 0xFFC00E38 /* MemDMA Stream 0 Destination Current Y Count Register */
  304. #define MDMA_D0_IRQ_STATUS 0xFFC00E28 /* MemDMA Stream 0 Destination Interrupt/Status Register */
  305. #define MDMA_D0_PERIPHERAL_MAP 0xFFC00E2C /* MemDMA Stream 0 Destination Peripheral Map Register */
  306. #define MDMA_S0_CONFIG 0xFFC00E48 /* MemDMA Stream 0 Source Configuration Register */
  307. #define MDMA_S0_NEXT_DESC_PTR 0xFFC00E40 /* MemDMA Stream 0 Source Next Descriptor Pointer Register */
  308. #define MDMA_S0_START_ADDR 0xFFC00E44 /* MemDMA Stream 0 Source Start Address Register */
  309. #define MDMA_S0_X_COUNT 0xFFC00E50 /* MemDMA Stream 0 Source X Count Register */
  310. #define MDMA_S0_Y_COUNT 0xFFC00E58 /* MemDMA Stream 0 Source Y Count Register */
  311. #define MDMA_S0_X_MODIFY 0xFFC00E54 /* MemDMA Stream 0 Source X Modify Register */
  312. #define MDMA_S0_Y_MODIFY 0xFFC00E5C /* MemDMA Stream 0 Source Y Modify Register */
  313. #define MDMA_S0_CURR_DESC_PTR 0xFFC00E60 /* MemDMA Stream 0 Source Current Descriptor Pointer Register */
  314. #define MDMA_S0_CURR_ADDR 0xFFC00E64 /* MemDMA Stream 0 Source Current Address Register */
  315. #define MDMA_S0_CURR_X_COUNT 0xFFC00E70 /* MemDMA Stream 0 Source Current X Count Register */
  316. #define MDMA_S0_CURR_Y_COUNT 0xFFC00E78 /* MemDMA Stream 0 Source Current Y Count Register */
  317. #define MDMA_S0_IRQ_STATUS 0xFFC00E68 /* MemDMA Stream 0 Source Interrupt/Status Register */
  318. #define MDMA_S0_PERIPHERAL_MAP 0xFFC00E6C /* MemDMA Stream 0 Source Peripheral Map Register */
  319. /* Parallel Peripheral Interface (PPI) (0xFFC01000 - 0xFFC010FF) */
  320. #define PPI_CONTROL 0xFFC01000 /* PPI Control Register */
  321. #define PPI_STATUS 0xFFC01004 /* PPI Status Register */
  322. #define PPI_COUNT 0xFFC01008 /* PPI Transfer Count Register */
  323. #define PPI_DELAY 0xFFC0100C /* PPI Delay Count Register */
  324. #define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */
  325. /*********************************************************************************** */
  326. /* System MMR Register Bits */
  327. /******************************************************************************* */
  328. /* CHIPID Masks */
  329. #define CHIPID_VERSION 0xF0000000
  330. #define CHIPID_FAMILY 0x0FFFF000
  331. #define CHIPID_MANUFACTURE 0x00000FFE
  332. /* SWRST Mask */
  333. #define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
  334. #define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
  335. #define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */
  336. #define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
  337. #define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
  338. /* SYSCR Masks */
  339. #define BMODE 0x0006 /* Boot Mode - Latched During HW Reset From Mode Pins */
  340. #define NOBOOT 0x0010 /* Execute From L1 or ASYNC Bank 0 When BMODE = 0 */
  341. /* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */
  342. /* SIC_IAR0 Masks */
  343. #define P0_IVG(x) ((x)-7) /* Peripheral #0 assigned IVG #x */
  344. #define P1_IVG(x) ((x)-7) << 0x4 /* Peripheral #1 assigned IVG #x */
  345. #define P2_IVG(x) ((x)-7) << 0x8 /* Peripheral #2 assigned IVG #x */
  346. #define P3_IVG(x) ((x)-7) << 0xC /* Peripheral #3 assigned IVG #x */
  347. #define P4_IVG(x) ((x)-7) << 0x10 /* Peripheral #4 assigned IVG #x */
  348. #define P5_IVG(x) ((x)-7) << 0x14 /* Peripheral #5 assigned IVG #x */
  349. #define P6_IVG(x) ((x)-7) << 0x18 /* Peripheral #6 assigned IVG #x */
  350. #define P7_IVG(x) ((x)-7) << 0x1C /* Peripheral #7 assigned IVG #x */
  351. /* SIC_IAR1 Masks */
  352. #define P8_IVG(x) ((x)-7) /* Peripheral #8 assigned IVG #x */
  353. #define P9_IVG(x) ((x)-7) << 0x4 /* Peripheral #9 assigned IVG #x */
  354. #define P10_IVG(x) ((x)-7) << 0x8 /* Peripheral #10 assigned IVG #x */
  355. #define P11_IVG(x) ((x)-7) << 0xC /* Peripheral #11 assigned IVG #x */
  356. #define P12_IVG(x) ((x)-7) << 0x10 /* Peripheral #12 assigned IVG #x */
  357. #define P13_IVG(x) ((x)-7) << 0x14 /* Peripheral #13 assigned IVG #x */
  358. #define P14_IVG(x) ((x)-7) << 0x18 /* Peripheral #14 assigned IVG #x */
  359. #define P15_IVG(x) ((x)-7) << 0x1C /* Peripheral #15 assigned IVG #x */
  360. /* SIC_IAR2 Masks */
  361. #define P16_IVG(x) ((x)-7) /* Peripheral #16 assigned IVG #x */
  362. #define P17_IVG(x) ((x)-7) << 0x4 /* Peripheral #17 assigned IVG #x */
  363. #define P18_IVG(x) ((x)-7) << 0x8 /* Peripheral #18 assigned IVG #x */
  364. #define P19_IVG(x) ((x)-7) << 0xC /* Peripheral #19 assigned IVG #x */
  365. #define P20_IVG(x) ((x)-7) << 0x10 /* Peripheral #20 assigned IVG #x */
  366. #define P21_IVG(x) ((x)-7) << 0x14 /* Peripheral #21 assigned IVG #x */
  367. #define P22_IVG(x) ((x)-7) << 0x18 /* Peripheral #22 assigned IVG #x */
  368. #define P23_IVG(x) ((x)-7) << 0x1C /* Peripheral #23 assigned IVG #x */
  369. /* SIC_IMASK Masks */
  370. #define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
  371. #define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
  372. #define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */
  373. #define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */
  374. /* SIC_IWR Masks */
  375. #define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
  376. #define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
  377. #define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */
  378. #define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */
  379. /* ********* PARALLEL PERIPHERAL INTERFACE (PPI) MASKS **************** */
  380. /* PPI_CONTROL Masks */
  381. #define PORT_EN 0x00000001 /* PPI Port Enable */
  382. #define PORT_DIR 0x00000002 /* PPI Port Direction */
  383. #define XFR_TYPE 0x0000000C /* PPI Transfer Type */
  384. #define PORT_CFG 0x00000030 /* PPI Port Configuration */
  385. #define FLD_SEL 0x00000040 /* PPI Active Field Select */
  386. #define PACK_EN 0x00000080 /* PPI Packing Mode */
  387. #define DMA32 0x00000100 /* PPI 32-bit DMA Enable */
  388. #define SKIP_EN 0x00000200 /* PPI Skip Element Enable */
  389. #define SKIP_EO 0x00000400 /* PPI Skip Even/Odd Elements */
  390. #define DLENGTH 0x00003800 /* PPI Data Length */
  391. #define DLEN_8 0x0000 /* Data Length = 8 Bits */
  392. #define DLEN_10 0x0800 /* Data Length = 10 Bits */
  393. #define DLEN_11 0x1000 /* Data Length = 11 Bits */
  394. #define DLEN_12 0x1800 /* Data Length = 12 Bits */
  395. #define DLEN_13 0x2000 /* Data Length = 13 Bits */
  396. #define DLEN_14 0x2800 /* Data Length = 14 Bits */
  397. #define DLEN_15 0x3000 /* Data Length = 15 Bits */
  398. #define DLEN_16 0x3800 /* Data Length = 16 Bits */
  399. #define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */
  400. #define POL 0x0000C000 /* PPI Signal Polarities */
  401. #define POLC 0x4000 /* PPI Clock Polarity */
  402. #define POLS 0x8000 /* PPI Frame Sync Polarity */
  403. /* PPI_STATUS Masks */
  404. #define FLD 0x00000400 /* Field Indicator */
  405. #define FT_ERR 0x00000800 /* Frame Track Error */
  406. #define OVR 0x00001000 /* FIFO Overflow Error */
  407. #define UNDR 0x00002000 /* FIFO Underrun Error */
  408. #define ERR_DET 0x00004000 /* Error Detected Indicator */
  409. #define ERR_NCOR 0x00008000 /* Error Not Corrected Indicator */
  410. /* ********** DMA CONTROLLER MASKS *********************8 */
  411. /* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
  412. #define CTYPE 0x00000040 /* DMA Channel Type Indicator */
  413. #define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */
  414. #define PCAP8 0x00000080 /* DMA 8-bit Operation Indicator */
  415. #define PCAP16 0x00000100 /* DMA 16-bit Operation Indicator */
  416. #define PCAP32 0x00000200 /* DMA 32-bit Operation Indicator */
  417. #define PCAPWR 0x00000400 /* DMA Write Operation Indicator */
  418. #define PCAPRD 0x00000800 /* DMA Read Operation Indicator */
  419. #define PMAP 0x00007000 /* DMA Peripheral Map Field */
  420. #define PMAP_PPI 0x0000 /* PMAP PPI Port DMA */
  421. #define PMAP_SPORT0RX 0x1000 /* PMAP SPORT0 Receive DMA */
  422. #define PMAP_SPORT0TX 0x2000 /* PMAP SPORT0 Transmit DMA */
  423. #define PMAP_SPORT1RX 0x3000 /* PMAP SPORT1 Receive DMA */
  424. #define PMAP_SPORT1TX 0x4000 /* PMAP SPORT1 Transmit DMA */
  425. #define PMAP_SPI 0x5000 /* PMAP SPI DMA */
  426. #define PMAP_UARTRX 0x6000 /* PMAP UART Receive DMA */
  427. #define PMAP_UARTTX 0x7000 /* PMAP UART Transmit DMA */
  428. /* ************* GENERAL PURPOSE TIMER MASKS ******************** */
  429. /* PWM Timer bit definitions */
  430. /* TIMER_ENABLE Register */
  431. #define TIMEN0 0x0001
  432. #define TIMEN1 0x0002
  433. #define TIMEN2 0x0004
  434. #define TIMEN0_P 0x00
  435. #define TIMEN1_P 0x01
  436. #define TIMEN2_P 0x02
  437. /* TIMER_DISABLE Register */
  438. #define TIMDIS0 0x0001
  439. #define TIMDIS1 0x0002
  440. #define TIMDIS2 0x0004
  441. #define TIMDIS0_P 0x00
  442. #define TIMDIS1_P 0x01
  443. #define TIMDIS2_P 0x02
  444. /* TIMER_STATUS Register */
  445. #define TIMIL0 0x0001
  446. #define TIMIL1 0x0002
  447. #define TIMIL2 0x0004
  448. #define TOVF_ERR0 0x0010 /* Timer 0 Counter Overflow */
  449. #define TOVF_ERR1 0x0020 /* Timer 1 Counter Overflow */
  450. #define TOVF_ERR2 0x0040 /* Timer 2 Counter Overflow */
  451. #define TRUN0 0x1000
  452. #define TRUN1 0x2000
  453. #define TRUN2 0x4000
  454. #define TIMIL0_P 0x00
  455. #define TIMIL1_P 0x01
  456. #define TIMIL2_P 0x02
  457. #define TOVF_ERR0_P 0x04
  458. #define TOVF_ERR1_P 0x05
  459. #define TOVF_ERR2_P 0x06
  460. #define TRUN0_P 0x0C
  461. #define TRUN1_P 0x0D
  462. #define TRUN2_P 0x0E
  463. /* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
  464. #define TOVL_ERR0 TOVF_ERR0
  465. #define TOVL_ERR1 TOVF_ERR1
  466. #define TOVL_ERR2 TOVF_ERR2
  467. #define TOVL_ERR0_P TOVF_ERR0_P
  468. #define TOVL_ERR1_P TOVF_ERR1_P
  469. #define TOVL_ERR2_P TOVF_ERR2_P
  470. /* TIMERx_CONFIG Registers */
  471. #define PWM_OUT 0x0001
  472. #define WDTH_CAP 0x0002
  473. #define EXT_CLK 0x0003
  474. #define PULSE_HI 0x0004
  475. #define PERIOD_CNT 0x0008
  476. #define IRQ_ENA 0x0010
  477. #define TIN_SEL 0x0020
  478. #define OUT_DIS 0x0040
  479. #define CLK_SEL 0x0080
  480. #define TOGGLE_HI 0x0100
  481. #define EMU_RUN 0x0200
  482. #define ERR_TYP(x) ((x & 0x03) << 14)
  483. #define TMODE_P0 0x00
  484. #define TMODE_P1 0x01
  485. #define PULSE_HI_P 0x02
  486. #define PERIOD_CNT_P 0x03
  487. #define IRQ_ENA_P 0x04
  488. #define TIN_SEL_P 0x05
  489. #define OUT_DIS_P 0x06
  490. #define CLK_SEL_P 0x07
  491. #define TOGGLE_HI_P 0x08
  492. #define EMU_RUN_P 0x09
  493. #define ERR_TYP_P0 0x0E
  494. #define ERR_TYP_P1 0x0F
  495. /* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
  496. /* AMGCTL Masks */
  497. #define AMCKEN 0x00000001 /* Enable CLKOUT */
  498. #define AMBEN_NONE 0x00000000 /* All Banks Disabled */
  499. #define AMBEN_B0 0x00000002 /* Enable Asynchronous Memory Bank 0 only */
  500. #define AMBEN_B0_B1 0x00000004 /* Enable Asynchronous Memory Banks 0 & 1 only */
  501. #define AMBEN_B0_B1_B2 0x00000006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */
  502. #define AMBEN_ALL 0x00000008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */
  503. /* AMGCTL Bit Positions */
  504. #define AMCKEN_P 0x00000000 /* Enable CLKOUT */
  505. #define AMBEN_P0 0x00000001 /* Asynchronous Memory Enable, 000 - banks 0-3 disabled, 001 - Bank 0 enabled */
  506. #define AMBEN_P1 0x00000002 /* Asynchronous Memory Enable, 010 - banks 0&1 enabled, 011 - banks 0-3 enabled */
  507. #define AMBEN_P2 0x00000003 /* Asynchronous Memory Enable, 1xx - All banks (bank 0, 1, 2, and 3) enabled */
  508. /* AMBCTL0 Masks */
  509. #define B0RDYEN 0x00000001 /* Bank 0 RDY Enable, 0=disable, 1=enable */
  510. #define B0RDYPOL 0x00000002 /* Bank 0 RDY Active high, 0=active low, 1=active high */
  511. #define B0TT_1 0x00000004 /* Bank 0 Transition Time from Read to Write = 1 cycle */
  512. #define B0TT_2 0x00000008 /* Bank 0 Transition Time from Read to Write = 2 cycles */
  513. #define B0TT_3 0x0000000C /* Bank 0 Transition Time from Read to Write = 3 cycles */
  514. #define B0TT_4 0x00000000 /* Bank 0 Transition Time from Read to Write = 4 cycles */
  515. #define B0ST_1 0x00000010 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=1 cycle */
  516. #define B0ST_2 0x00000020 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=2 cycles */
  517. #define B0ST_3 0x00000030 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=3 cycles */
  518. #define B0ST_4 0x00000000 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=4 cycles */
  519. #define B0HT_1 0x00000040 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 1 cycle */
  520. #define B0HT_2 0x00000080 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 2 cycles */
  521. #define B0HT_3 0x000000C0 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 3 cycles */
  522. #define B0HT_0 0x00000000 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 0 cycles */
  523. #define B0RAT_1 0x00000100 /* Bank 0 Read Access Time = 1 cycle */
  524. #define B0RAT_2 0x00000200 /* Bank 0 Read Access Time = 2 cycles */
  525. #define B0RAT_3 0x00000300 /* Bank 0 Read Access Time = 3 cycles */
  526. #define B0RAT_4 0x00000400 /* Bank 0 Read Access Time = 4 cycles */
  527. #define B0RAT_5 0x00000500 /* Bank 0 Read Access Time = 5 cycles */
  528. #define B0RAT_6 0x00000600 /* Bank 0 Read Access Time = 6 cycles */
  529. #define B0RAT_7 0x00000700 /* Bank 0 Read Access Time = 7 cycles */
  530. #define B0RAT_8 0x00000800 /* Bank 0 Read Access Time = 8 cycles */
  531. #define B0RAT_9 0x00000900 /* Bank 0 Read Access Time = 9 cycles */
  532. #define B0RAT_10 0x00000A00 /* Bank 0 Read Access Time = 10 cycles */
  533. #define B0RAT_11 0x00000B00 /* Bank 0 Read Access Time = 11 cycles */
  534. #define B0RAT_12 0x00000C00 /* Bank 0 Read Access Time = 12 cycles */
  535. #define B0RAT_13 0x00000D00 /* Bank 0 Read Access Time = 13 cycles */
  536. #define B0RAT_14 0x00000E00 /* Bank 0 Read Access Time = 14 cycles */
  537. #define B0RAT_15 0x00000F00 /* Bank 0 Read Access Time = 15 cycles */
  538. #define B0WAT_1 0x00001000 /* Bank 0 Write Access Time = 1 cycle */
  539. #define B0WAT_2 0x00002000 /* Bank 0 Write Access Time = 2 cycles */
  540. #define B0WAT_3 0x00003000 /* Bank 0 Write Access Time = 3 cycles */
  541. #define B0WAT_4 0x00004000 /* Bank 0 Write Access Time = 4 cycles */
  542. #define B0WAT_5 0x00005000 /* Bank 0 Write Access Time = 5 cycles */
  543. #define B0WAT_6 0x00006000 /* Bank 0 Write Access Time = 6 cycles */
  544. #define B0WAT_7 0x00007000 /* Bank 0 Write Access Time = 7 cycles */
  545. #define B0WAT_8 0x00008000 /* Bank 0 Write Access Time = 8 cycles */
  546. #define B0WAT_9 0x00009000 /* Bank 0 Write Access Time = 9 cycles */
  547. #define B0WAT_10 0x0000A000 /* Bank 0 Write Access Time = 10 cycles */
  548. #define B0WAT_11 0x0000B000 /* Bank 0 Write Access Time = 11 cycles */
  549. #define B0WAT_12 0x0000C000 /* Bank 0 Write Access Time = 12 cycles */
  550. #define B0WAT_13 0x0000D000 /* Bank 0 Write Access Time = 13 cycles */
  551. #define B0WAT_14 0x0000E000 /* Bank 0 Write Access Time = 14 cycles */
  552. #define B0WAT_15 0x0000F000 /* Bank 0 Write Access Time = 15 cycles */
  553. #define B1RDYEN 0x00010000 /* Bank 1 RDY enable, 0=disable, 1=enable */
  554. #define B1RDYPOL 0x00020000 /* Bank 1 RDY Active high, 0=active low, 1=active high */
  555. #define B1TT_1 0x00040000 /* Bank 1 Transition Time from Read to Write = 1 cycle */
  556. #define B1TT_2 0x00080000 /* Bank 1 Transition Time from Read to Write = 2 cycles */
  557. #define B1TT_3 0x000C0000 /* Bank 1 Transition Time from Read to Write = 3 cycles */
  558. #define B1TT_4 0x00000000 /* Bank 1 Transition Time from Read to Write = 4 cycles */
  559. #define B1ST_1 0x00100000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
  560. #define B1ST_2 0x00200000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
  561. #define B1ST_3 0x00300000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
  562. #define B1ST_4 0x00000000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
  563. #define B1HT_1 0x00400000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
  564. #define B1HT_2 0x00800000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
  565. #define B1HT_3 0x00C00000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
  566. #define B1HT_0 0x00000000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
  567. #define B1RAT_1 0x01000000 /* Bank 1 Read Access Time = 1 cycle */
  568. #define B1RAT_2 0x02000000 /* Bank 1 Read Access Time = 2 cycles */
  569. #define B1RAT_3 0x03000000 /* Bank 1 Read Access Time = 3 cycles */
  570. #define B1RAT_4 0x04000000 /* Bank 1 Read Access Time = 4 cycles */
  571. #define B1RAT_5 0x05000000 /* Bank 1 Read Access Time = 5 cycles */
  572. #define B1RAT_6 0x06000000 /* Bank 1 Read Access Time = 6 cycles */
  573. #define B1RAT_7 0x07000000 /* Bank 1 Read Access Time = 7 cycles */
  574. #define B1RAT_8 0x08000000 /* Bank 1 Read Access Time = 8 cycles */
  575. #define B1RAT_9 0x09000000 /* Bank 1 Read Access Time = 9 cycles */
  576. #define B1RAT_10 0x0A000000 /* Bank 1 Read Access Time = 10 cycles */
  577. #define B1RAT_11 0x0B000000 /* Bank 1 Read Access Time = 11 cycles */
  578. #define B1RAT_12 0x0C000000 /* Bank 1 Read Access Time = 12 cycles */
  579. #define B1RAT_13 0x0D000000 /* Bank 1 Read Access Time = 13 cycles */
  580. #define B1RAT_14 0x0E000000 /* Bank 1 Read Access Time = 14 cycles */
  581. #define B1RAT_15 0x0F000000 /* Bank 1 Read Access Time = 15 cycles */
  582. #define B1WAT_1 0x10000000 /* Bank 1 Write Access Time = 1 cycle */
  583. #define B1WAT_2 0x20000000 /* Bank 1 Write Access Time = 2 cycles */
  584. #define B1WAT_3 0x30000000 /* Bank 1 Write Access Time = 3 cycles */
  585. #define B1WAT_4 0x40000000 /* Bank 1 Write Access Time = 4 cycles */
  586. #define B1WAT_5 0x50000000 /* Bank 1 Write Access Time = 5 cycles */
  587. #define B1WAT_6 0x60000000 /* Bank 1 Write Access Time = 6 cycles */
  588. #define B1WAT_7 0x70000000 /* Bank 1 Write Access Time = 7 cycles */
  589. #define B1WAT_8 0x80000000 /* Bank 1 Write Access Time = 8 cycles */
  590. #define B1WAT_9 0x90000000 /* Bank 1 Write Access Time = 9 cycles */
  591. #define B1WAT_10 0xA0000000 /* Bank 1 Write Access Time = 10 cycles */
  592. #define B1WAT_11 0xB0000000 /* Bank 1 Write Access Time = 11 cycles */
  593. #define B1WAT_12 0xC0000000 /* Bank 1 Write Access Time = 12 cycles */
  594. #define B1WAT_13 0xD0000000 /* Bank 1 Write Access Time = 13 cycles */
  595. #define B1WAT_14 0xE0000000 /* Bank 1 Write Access Time = 14 cycles */
  596. #define B1WAT_15 0xF0000000 /* Bank 1 Write Access Time = 15 cycles */
  597. /* AMBCTL1 Masks */
  598. #define B2RDYEN 0x00000001 /* Bank 2 RDY Enable, 0=disable, 1=enable */
  599. #define B2RDYPOL 0x00000002 /* Bank 2 RDY Active high, 0=active low, 1=active high */
  600. #define B2TT_1 0x00000004 /* Bank 2 Transition Time from Read to Write = 1 cycle */
  601. #define B2TT_2 0x00000008 /* Bank 2 Transition Time from Read to Write = 2 cycles */
  602. #define B2TT_3 0x0000000C /* Bank 2 Transition Time from Read to Write = 3 cycles */
  603. #define B2TT_4 0x00000000 /* Bank 2 Transition Time from Read to Write = 4 cycles */
  604. #define B2ST_1 0x00000010 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
  605. #define B2ST_2 0x00000020 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
  606. #define B2ST_3 0x00000030 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
  607. #define B2ST_4 0x00000000 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
  608. #define B2HT_1 0x00000040 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
  609. #define B2HT_2 0x00000080 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
  610. #define B2HT_3 0x000000C0 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
  611. #define B2HT_0 0x00000000 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
  612. #define B2RAT_1 0x00000100 /* Bank 2 Read Access Time = 1 cycle */
  613. #define B2RAT_2 0x00000200 /* Bank 2 Read Access Time = 2 cycles */
  614. #define B2RAT_3 0x00000300 /* Bank 2 Read Access Time = 3 cycles */
  615. #define B2RAT_4 0x00000400 /* Bank 2 Read Access Time = 4 cycles */
  616. #define B2RAT_5 0x00000500 /* Bank 2 Read Access Time = 5 cycles */
  617. #define B2RAT_6 0x00000600 /* Bank 2 Read Access Time = 6 cycles */
  618. #define B2RAT_7 0x00000700 /* Bank 2 Read Access Time = 7 cycles */
  619. #define B2RAT_8 0x00000800 /* Bank 2 Read Access Time = 8 cycles */
  620. #define B2RAT_9 0x00000900 /* Bank 2 Read Access Time = 9 cycles */
  621. #define B2RAT_10 0x00000A00 /* Bank 2 Read Access Time = 10 cycles */
  622. #define B2RAT_11 0x00000B00 /* Bank 2 Read Access Time = 11 cycles */
  623. #define B2RAT_12 0x00000C00 /* Bank 2 Read Access Time = 12 cycles */
  624. #define B2RAT_13 0x00000D00 /* Bank 2 Read Access Time = 13 cycles */
  625. #define B2RAT_14 0x00000E00 /* Bank 2 Read Access Time = 14 cycles */
  626. #define B2RAT_15 0x00000F00 /* Bank 2 Read Access Time = 15 cycles */
  627. #define B2WAT_1 0x00001000 /* Bank 2 Write Access Time = 1 cycle */
  628. #define B2WAT_2 0x00002000 /* Bank 2 Write Access Time = 2 cycles */
  629. #define B2WAT_3 0x00003000 /* Bank 2 Write Access Time = 3 cycles */
  630. #define B2WAT_4 0x00004000 /* Bank 2 Write Access Time = 4 cycles */
  631. #define B2WAT_5 0x00005000 /* Bank 2 Write Access Time = 5 cycles */
  632. #define B2WAT_6 0x00006000 /* Bank 2 Write Access Time = 6 cycles */
  633. #define B2WAT_7 0x00007000 /* Bank 2 Write Access Time = 7 cycles */
  634. #define B2WAT_8 0x00008000 /* Bank 2 Write Access Time = 8 cycles */
  635. #define B2WAT_9 0x00009000 /* Bank 2 Write Access Time = 9 cycles */
  636. #define B2WAT_10 0x0000A000 /* Bank 2 Write Access Time = 10 cycles */
  637. #define B2WAT_11 0x0000B000 /* Bank 2 Write Access Time = 11 cycles */
  638. #define B2WAT_12 0x0000C000 /* Bank 2 Write Access Time = 12 cycles */
  639. #define B2WAT_13 0x0000D000 /* Bank 2 Write Access Time = 13 cycles */
  640. #define B2WAT_14 0x0000E000 /* Bank 2 Write Access Time = 14 cycles */
  641. #define B2WAT_15 0x0000F000 /* Bank 2 Write Access Time = 15 cycles */
  642. #define B3RDYEN 0x00010000 /* Bank 3 RDY enable, 0=disable, 1=enable */
  643. #define B3RDYPOL 0x00020000 /* Bank 3 RDY Active high, 0=active low, 1=active high */
  644. #define B3TT_1 0x00040000 /* Bank 3 Transition Time from Read to Write = 1 cycle */
  645. #define B3TT_2 0x00080000 /* Bank 3 Transition Time from Read to Write = 2 cycles */
  646. #define B3TT_3 0x000C0000 /* Bank 3 Transition Time from Read to Write = 3 cycles */
  647. #define B3TT_4 0x00000000 /* Bank 3 Transition Time from Read to Write = 4 cycles */
  648. #define B3ST_1 0x00100000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
  649. #define B3ST_2 0x00200000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
  650. #define B3ST_3 0x00300000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
  651. #define B3ST_4 0x00000000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
  652. #define B3HT_1 0x00400000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
  653. #define B3HT_2 0x00800000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
  654. #define B3HT_3 0x00C00000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
  655. #define B3HT_0 0x00000000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
  656. #define B3RAT_1 0x01000000 /* Bank 3 Read Access Time = 1 cycle */
  657. #define B3RAT_2 0x02000000 /* Bank 3 Read Access Time = 2 cycles */
  658. #define B3RAT_3 0x03000000 /* Bank 3 Read Access Time = 3 cycles */
  659. #define B3RAT_4 0x04000000 /* Bank 3 Read Access Time = 4 cycles */
  660. #define B3RAT_5 0x05000000 /* Bank 3 Read Access Time = 5 cycles */
  661. #define B3RAT_6 0x06000000 /* Bank 3 Read Access Time = 6 cycles */
  662. #define B3RAT_7 0x07000000 /* Bank 3 Read Access Time = 7 cycles */
  663. #define B3RAT_8 0x08000000 /* Bank 3 Read Access Time = 8 cycles */
  664. #define B3RAT_9 0x09000000 /* Bank 3 Read Access Time = 9 cycles */
  665. #define B3RAT_10 0x0A000000 /* Bank 3 Read Access Time = 10 cycles */
  666. #define B3RAT_11 0x0B000000 /* Bank 3 Read Access Time = 11 cycles */
  667. #define B3RAT_12 0x0C000000 /* Bank 3 Read Access Time = 12 cycles */
  668. #define B3RAT_13 0x0D000000 /* Bank 3 Read Access Time = 13 cycles */
  669. #define B3RAT_14 0x0E000000 /* Bank 3 Read Access Time = 14 cycles */
  670. #define B3RAT_15 0x0F000000 /* Bank 3 Read Access Time = 15 cycles */
  671. #define B3WAT_1 0x10000000 /* Bank 3 Write Access Time = 1 cycle */
  672. #define B3WAT_2 0x20000000 /* Bank 3 Write Access Time = 2 cycles */
  673. #define B3WAT_3 0x30000000 /* Bank 3 Write Access Time = 3 cycles */
  674. #define B3WAT_4 0x40000000 /* Bank 3 Write Access Time = 4 cycles */
  675. #define B3WAT_5 0x50000000 /* Bank 3 Write Access Time = 5 cycles */
  676. #define B3WAT_6 0x60000000 /* Bank 3 Write Access Time = 6 cycles */
  677. #define B3WAT_7 0x70000000 /* Bank 3 Write Access Time = 7 cycles */
  678. #define B3WAT_8 0x80000000 /* Bank 3 Write Access Time = 8 cycles */
  679. #define B3WAT_9 0x90000000 /* Bank 3 Write Access Time = 9 cycles */
  680. #define B3WAT_10 0xA0000000 /* Bank 3 Write Access Time = 10 cycles */
  681. #define B3WAT_11 0xB0000000 /* Bank 3 Write Access Time = 11 cycles */
  682. #define B3WAT_12 0xC0000000 /* Bank 3 Write Access Time = 12 cycles */
  683. #define B3WAT_13 0xD0000000 /* Bank 3 Write Access Time = 13 cycles */
  684. #define B3WAT_14 0xE0000000 /* Bank 3 Write Access Time = 14 cycles */
  685. #define B3WAT_15 0xF0000000 /* Bank 3 Write Access Time = 15 cycles */
  686. /* ********************** SDRAM CONTROLLER MASKS *************************** */
  687. /* SDGCTL Masks */
  688. #define SCTLE 0x00000001 /* Enable SCLK[0], /SRAS, /SCAS, /SWE, SDQM[3:0] */
  689. #define CL_2 0x00000008 /* SDRAM CAS latency = 2 cycles */
  690. #define CL_3 0x0000000C /* SDRAM CAS latency = 3 cycles */
  691. #define PFE 0x00000010 /* Enable SDRAM prefetch */
  692. #define PFP 0x00000020 /* Prefetch has priority over AMC requests */
  693. #define PASR_ALL 0x00000000 /* All 4 SDRAM Banks Refreshed In Self-Refresh */
  694. #define PASR_B0_B1 0x00000010 /* SDRAM Banks 0 and 1 Are Refreshed In Self-Refresh */
  695. #define PASR_B0 0x00000020 /* Only SDRAM Bank 0 Is Refreshed In Self-Refresh */
  696. #define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */
  697. #define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */
  698. #define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */
  699. #define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */
  700. #define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */
  701. #define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */
  702. #define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */
  703. #define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */
  704. #define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */
  705. #define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */
  706. #define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */
  707. #define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */
  708. #define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */
  709. #define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */
  710. #define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */
  711. #define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */
  712. #define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */
  713. #define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */
  714. #define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */
  715. #define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */
  716. #define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */
  717. #define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */
  718. #define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */
  719. #define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */
  720. #define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */
  721. #define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */
  722. #define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */
  723. #define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */
  724. #define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */
  725. #define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */
  726. #define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */
  727. #define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */
  728. #define PUPSD 0x00200000 /*Power-up start delay */
  729. #define PSM 0x00400000 /* SDRAM power-up sequence = Precharge, mode register set, 8 CBR refresh cycles */
  730. #define PSS 0x00800000 /* enable SDRAM power-up sequence on next SDRAM access */
  731. #define SRFS 0x01000000 /* Start SDRAM self-refresh mode */
  732. #define EBUFE 0x02000000 /* Enable external buffering timing */
  733. #define FBBRW 0x04000000 /* Fast back-to-back read write enable */
  734. #define EMREN 0x10000000 /* Extended mode register enable */
  735. #define TCSR 0x20000000 /* Temp compensated self refresh value 85 deg C */
  736. #define CDDBG 0x40000000 /* Tristate SDRAM controls during bus grant */
  737. /* EBIU_SDBCTL Masks */
  738. #define EBE 0x00000001 /* Enable SDRAM external bank */
  739. #define EBSZ_16 0x00000000 /* SDRAM external bank size = 16MB */
  740. #define EBSZ_32 0x00000002 /* SDRAM external bank size = 32MB */
  741. #define EBSZ_64 0x00000004 /* SDRAM external bank size = 64MB */
  742. #define EBSZ_128 0x00000006 /* SDRAM external bank size = 128MB */
  743. #define EBCAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
  744. #define EBCAW_9 0x00000010 /* SDRAM external bank column address width = 9 bits */
  745. #define EBCAW_10 0x00000020 /* SDRAM external bank column address width = 9 bits */
  746. #define EBCAW_11 0x00000030 /* SDRAM external bank column address width = 9 bits */
  747. /* EBIU_SDSTAT Masks */
  748. #define SDCI 0x00000001 /* SDRAM controller is idle */
  749. #define SDSRA 0x00000002 /* SDRAM SDRAM self refresh is active */
  750. #define SDPUA 0x00000004 /* SDRAM power up active */
  751. #define SDRS 0x00000008 /* SDRAM is in reset state */
  752. #define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */
  753. #define BGSTAT 0x00000020 /* Bus granted */
  754. #endif /* _DEF_BF532_H */