Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 1 | /* |
| 2 | * defBF532.h |
| 3 | * |
| 4 | * This file is subject to the terms and conditions of the GNU Public |
| 5 | * License. See the file "COPYING" in the main directory of this archive |
| 6 | * for more details. |
| 7 | * |
| 8 | * Non-GPL License also available as part of VisualDSP++ |
| 9 | * |
| 10 | * http://www.analog.com/processors/resources/crosscore/visualDspDevSoftware.html |
| 11 | * |
| 12 | * (c) Copyright 2001-2005 Analog Devices, Inc. All rights reserved |
| 13 | * |
| 14 | * This file under source code control, please send bugs or changes to: |
| 15 | * dsptools.support@analog.com |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | /* SYSTEM & MM REGISTER BIT & ADDRESS DEFINITIONS FOR ADSP-BF532 */ |
| 20 | |
| 21 | #ifndef _DEF_BF532_H |
| 22 | #define _DEF_BF532_H |
| 23 | |
| 24 | /* |
| 25 | * #if !defined(__ADSPLPBLACKFIN__) |
| 26 | * #warning defBF532.h should only be included for 532 compatible chips |
| 27 | * #endif |
| 28 | */ |
| 29 | |
| 30 | /* include all Core registers and bit definitions */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 31 | #include <asm/arch-common/def_LPBlackfin.h> |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 32 | |
Wolfgang Denk | 2bad868 | 2006-03-12 02:55:22 +0100 | [diff] [blame] | 33 | /* Helper macros |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 34 | * usage: |
| 35 | * P0.H = HI(UART_THR); |
| 36 | * P0.L = LO(UART_THR); |
| 37 | */ |
| 38 | |
| 39 | #define LO(con32) ((con32) & 0xFFFF) |
| 40 | #define lo(con32) ((con32) & 0xFFFF) |
| 41 | #define HI(con32) (((con32) >> 16) & 0xFFFF) |
| 42 | #define hi(con32) (((con32) >> 16) & 0xFFFF) |
| 43 | |
| 44 | /* |
| 45 | * System MMR Register Map |
| 46 | */ |
| 47 | |
| 48 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ |
| 49 | #define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */ |
| 50 | #define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */ |
| 51 | #define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */ |
| 52 | #define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */ |
| 53 | #define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 54 | #define CHIPID 0xFFC00014 /* Chip ID register (32-bit) */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 55 | #define SWRST 0xFFC00100 /* Software Reset Register (16-bit) */ |
| 56 | #define SYSCR 0xFFC00104 /* System Configuration register */ |
| 57 | |
| 58 | /* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */ |
| 59 | #define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */ |
| 60 | #define SIC_IMASK 0xFFC0010C /* Interrupt Mask Register */ |
| 61 | #define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */ |
| 62 | #define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */ |
| 63 | #define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */ |
| 64 | #define SIC_ISR 0xFFC00120 /* Interrupt Status Register */ |
| 65 | #define SIC_IWR 0xFFC00124 /* Interrupt Wakeup Register */ |
| 66 | |
| 67 | /* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */ |
| 68 | #define WDOG_CTL 0xFFC00200 /* Watchdog Control Register */ |
| 69 | #define WDOG_CNT 0xFFC00204 /* Watchdog Count Register */ |
| 70 | #define WDOG_STAT 0xFFC00208 /* Watchdog Status Register */ |
| 71 | |
| 72 | /* Real Time Clock (0xFFC00300 - 0xFFC003FF) */ |
| 73 | #define RTC_STAT 0xFFC00300 /* RTC Status Register */ |
| 74 | #define RTC_ICTL 0xFFC00304 /* RTC Interrupt Control Register */ |
| 75 | #define RTC_ISTAT 0xFFC00308 /* RTC Interrupt Status Register */ |
| 76 | #define RTC_SWCNT 0xFFC0030C /* RTC Stopwatch Count Register */ |
| 77 | #define RTC_ALARM 0xFFC00310 /* RTC Alarm Time Register */ |
| 78 | #define RTC_FAST 0xFFC00314 /* RTC Prescaler Enable Register */ |
| 79 | #define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Register (alternate macro) */ |
| 80 | |
| 81 | /* UART Controller (0xFFC00400 - 0xFFC004FF) */ |
| 82 | #define UART_THR 0xFFC00400 /* Transmit Holding register */ |
| 83 | #define UART_RBR 0xFFC00400 /* Receive Buffer register */ |
| 84 | #define UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */ |
| 85 | #define UART_IER 0xFFC00404 /* Interrupt Enable Register */ |
| 86 | #define UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */ |
| 87 | #define UART_IIR 0xFFC00408 /* Interrupt Identification Register */ |
| 88 | #define UART_LCR 0xFFC0040C /* Line Control Register */ |
| 89 | #define UART_MCR 0xFFC00410 /* Modem Control Register */ |
| 90 | #define UART_LSR 0xFFC00414 /* Line Status Register */ |
Aubrey Li | f83a65c | 2007-03-10 23:49:29 +0800 | [diff] [blame] | 91 | /* #define UART_MSR 0xFFC00418 */ /* Modem Status Register (UNUSED in ADSP-BF532) */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 92 | #define UART_SCR 0xFFC0041C /* SCR Scratch Register */ |
| 93 | #define UART_GCTL 0xFFC00424 /* Global Control Register */ |
| 94 | |
| 95 | /* SPI Controller (0xFFC00500 - 0xFFC005FF) */ |
| 96 | #define SPI_CTL 0xFFC00500 /* SPI Control Register */ |
| 97 | #define SPI_FLG 0xFFC00504 /* SPI Flag register */ |
| 98 | #define SPI_STAT 0xFFC00508 /* SPI Status register */ |
| 99 | #define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */ |
| 100 | #define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */ |
| 101 | #define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */ |
| 102 | #define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */ |
| 103 | |
| 104 | /* TIMER 0, 1, 2 Registers (0xFFC00600 - 0xFFC006FF) */ |
| 105 | #define TIMER0_CONFIG 0xFFC00600 /* Timer 0 Configuration Register */ |
| 106 | #define TIMER0_COUNTER 0xFFC00604 /* Timer 0 Counter Register */ |
| 107 | #define TIMER0_PERIOD 0xFFC00608 /* Timer 0 Period Register */ |
| 108 | #define TIMER0_WIDTH 0xFFC0060C /* Timer 0 Width Register */ |
| 109 | |
| 110 | #define TIMER1_CONFIG 0xFFC00610 /* Timer 1 Configuration Register */ |
| 111 | #define TIMER1_COUNTER 0xFFC00614 /* Timer 1 Counter Register */ |
| 112 | #define TIMER1_PERIOD 0xFFC00618 /* Timer 1 Period Register */ |
| 113 | #define TIMER1_WIDTH 0xFFC0061C /* Timer 1 Width Register */ |
| 114 | |
| 115 | #define TIMER2_CONFIG 0xFFC00620 /* Timer 2 Configuration Register */ |
| 116 | #define TIMER2_COUNTER 0xFFC00624 /* Timer 2 Counter Register */ |
| 117 | #define TIMER2_PERIOD 0xFFC00628 /* Timer 2 Period Register */ |
| 118 | #define TIMER2_WIDTH 0xFFC0062C /* Timer 2 Width Register */ |
| 119 | |
| 120 | #define TIMER_ENABLE 0xFFC00640 /* Timer Enable Register */ |
| 121 | #define TIMER_DISABLE 0xFFC00644 /* Timer Disable Register */ |
| 122 | #define TIMER_STATUS 0xFFC00648 /* Timer Status Register */ |
| 123 | |
| 124 | /* General Purpose IO (0xFFC00700 - 0xFFC007FF) */ |
| 125 | #define FIO_FLAG_D 0xFFC00700 /* Flag Mask to directly specify state of pins */ |
| 126 | #define FIO_FLAG_C 0xFFC00704 /* Peripheral Interrupt Flag Register (clear) */ |
| 127 | #define FIO_FLAG_S 0xFFC00708 /* Peripheral Interrupt Flag Register (set) */ |
| 128 | #define FIO_FLAG_T 0xFFC0070C /* Flag Mask to directly toggle state of pins */ |
| 129 | #define FIO_MASKA_D 0xFFC00710 /* Flag Mask Interrupt A Register (set directly) */ |
| 130 | #define FIO_MASKA_C 0xFFC00714 /* Flag Mask Interrupt A Register (clear) */ |
| 131 | #define FIO_MASKA_S 0xFFC00718 /* Flag Mask Interrupt A Register (set) */ |
| 132 | #define FIO_MASKA_T 0xFFC0071C /* Flag Mask Interrupt A Register (toggle) */ |
| 133 | #define FIO_MASKB_D 0xFFC00720 /* Flag Mask Interrupt B Register (set directly) */ |
| 134 | #define FIO_MASKB_C 0xFFC00724 /* Flag Mask Interrupt B Register (clear) */ |
| 135 | #define FIO_MASKB_S 0xFFC00728 /* Flag Mask Interrupt B Register (set) */ |
| 136 | #define FIO_MASKB_T 0xFFC0072C /* Flag Mask Interrupt B Register (toggle) */ |
| 137 | #define FIO_DIR 0xFFC00730 /* Peripheral Flag Direction Register */ |
| 138 | #define FIO_POLAR 0xFFC00734 /* Flag Source Polarity Register */ |
| 139 | #define FIO_EDGE 0xFFC00738 /* Flag Source Sensitivity Register */ |
| 140 | #define FIO_BOTH 0xFFC0073C /* Flag Set on BOTH Edges Register */ |
| 141 | #define FIO_INEN 0xFFC00740 /* Flag Input Enable Register */ |
| 142 | |
| 143 | /* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */ |
| 144 | #define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */ |
| 145 | #define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */ |
| 146 | #define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */ |
| 147 | #define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */ |
| 148 | #define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */ |
| 149 | #define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */ |
| 150 | #define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */ |
| 151 | #define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */ |
| 152 | #define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */ |
| 153 | #define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */ |
| 154 | #define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */ |
| 155 | #define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */ |
| 156 | #define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */ |
| 157 | #define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */ |
| 158 | #define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */ |
| 159 | #define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */ |
| 160 | #define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */ |
| 161 | #define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */ |
| 162 | #define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */ |
| 163 | #define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */ |
| 164 | #define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */ |
| 165 | #define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */ |
| 166 | |
| 167 | /* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */ |
| 168 | #define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */ |
| 169 | #define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */ |
| 170 | #define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */ |
| 171 | #define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */ |
| 172 | #define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */ |
| 173 | #define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */ |
| 174 | #define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */ |
| 175 | #define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */ |
| 176 | #define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */ |
| 177 | #define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */ |
| 178 | #define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */ |
| 179 | #define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */ |
| 180 | #define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */ |
| 181 | #define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */ |
| 182 | #define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */ |
| 183 | #define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */ |
| 184 | #define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */ |
| 185 | #define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */ |
| 186 | #define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */ |
| 187 | #define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */ |
| 188 | #define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */ |
| 189 | #define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */ |
| 190 | |
| 191 | /* Asynchronous Memory Controller - External Bus Interface Unit */ |
| 192 | #define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */ |
| 193 | #define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */ |
| 194 | #define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */ |
| 195 | |
| 196 | /* SDRAM Controller External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */ |
| 197 | #define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */ |
| 198 | #define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */ |
| 199 | #define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */ |
| 200 | #define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */ |
| 201 | |
| 202 | /* DMA Test Registers */ |
| 203 | #define DMA_CCOMP 0xFFC00B04 /* DMA Cycle Count Register */ |
| 204 | #define DMA_ACOMP 0xFFC00B00 /* Debug Compare Address Register */ |
| 205 | #define DMA_MISR 0xFFC00B08 /* MISR Register */ |
| 206 | #define DMA_TCPER 0xFFC00B0C /* Traffic Control Periods Register */ |
| 207 | #define DMA_TCCNT 0xFFC00B10 /* Traffic Control Current Counts Register */ |
| 208 | #define DMA_TMODE 0xFFC00B14 /* DMA Test Modes Register */ |
| 209 | #define DMA_TMCHAN 0xFFC00B18 /* DMA Testmode Selected Channel Register */ |
| 210 | #define DMA_TMSTAT 0xFFC00B1C /* DMA Testmode Channel Status Register */ |
| 211 | #define DMA_TMBD 0xFFC00B20 /* DMA Testmode DAB Bus Data Register */ |
| 212 | #define DMA_TMM0D 0xFFC00B24 /* DMA Testmode Mem0 Data Register */ |
| 213 | #define DMA_TMM1D 0xFFC00B28 /* DMA Testmode Mem1 Data Register */ |
| 214 | #define DMA_TMMA 0xFFC00B2C /* DMA Testmode Memory Address Register */ |
| 215 | |
| 216 | /* DMA Controller (0xFFC00C00 - 0xFFC00FFF) */ |
| 217 | #define DMA0_CONFIG 0xFFC00C08 /* DMA Channel 0 Configuration Register */ |
| 218 | #define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */ |
| 219 | #define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */ |
| 220 | #define DMA0_X_COUNT 0xFFC00C10 /* DMA Channel 0 X Count Register */ |
| 221 | #define DMA0_Y_COUNT 0xFFC00C18 /* DMA Channel 0 Y Count Register */ |
| 222 | #define DMA0_X_MODIFY 0xFFC00C14 /* DMA Channel 0 X Modify Register */ |
| 223 | #define DMA0_Y_MODIFY 0xFFC00C1C /* DMA Channel 0 Y Modify Register */ |
| 224 | #define DMA0_CURR_DESC_PTR 0xFFC00C20 /* DMA Channel 0 Current Descriptor Pointer Register */ |
| 225 | #define DMA0_CURR_ADDR 0xFFC00C24 /* DMA Channel 0 Current Address Register */ |
| 226 | #define DMA0_CURR_X_COUNT 0xFFC00C30 /* DMA Channel 0 Current X Count Register */ |
| 227 | #define DMA0_CURR_Y_COUNT 0xFFC00C38 /* DMA Channel 0 Current Y Count Register */ |
| 228 | #define DMA0_IRQ_STATUS 0xFFC00C28 /* DMA Channel 0 Interrupt/Status Register */ |
| 229 | #define DMA0_PERIPHERAL_MAP 0xFFC00C2C /* DMA Channel 0 Peripheral Map Register */ |
| 230 | |
| 231 | #define DMA1_CONFIG 0xFFC00C48 /* DMA Channel 1 Configuration Register */ |
| 232 | #define DMA1_NEXT_DESC_PTR 0xFFC00C40 /* DMA Channel 1 Next Descriptor Pointer Register */ |
| 233 | #define DMA1_START_ADDR 0xFFC00C44 /* DMA Channel 1 Start Address Register */ |
| 234 | #define DMA1_X_COUNT 0xFFC00C50 /* DMA Channel 1 X Count Register */ |
| 235 | #define DMA1_Y_COUNT 0xFFC00C58 /* DMA Channel 1 Y Count Register */ |
| 236 | #define DMA1_X_MODIFY 0xFFC00C54 /* DMA Channel 1 X Modify Register */ |
| 237 | #define DMA1_Y_MODIFY 0xFFC00C5C /* DMA Channel 1 Y Modify Register */ |
| 238 | #define DMA1_CURR_DESC_PTR 0xFFC00C60 /* DMA Channel 1 Current Descriptor Pointer Register */ |
| 239 | #define DMA1_CURR_ADDR 0xFFC00C64 /* DMA Channel 1 Current Address Register */ |
| 240 | #define DMA1_CURR_X_COUNT 0xFFC00C70 /* DMA Channel 1 Current X Count Register */ |
| 241 | #define DMA1_CURR_Y_COUNT 0xFFC00C78 /* DMA Channel 1 Current Y Count Register */ |
| 242 | #define DMA1_IRQ_STATUS 0xFFC00C68 /* DMA Channel 1 Interrupt/Status Register */ |
| 243 | #define DMA1_PERIPHERAL_MAP 0xFFC00C6C /* DMA Channel 1 Peripheral Map Register */ |
| 244 | |
| 245 | #define DMA2_CONFIG 0xFFC00C88 /* DMA Channel 2 Configuration Register */ |
| 246 | #define DMA2_NEXT_DESC_PTR 0xFFC00C80 /* DMA Channel 2 Next Descriptor Pointer Register */ |
| 247 | #define DMA2_START_ADDR 0xFFC00C84 /* DMA Channel 2 Start Address Register */ |
| 248 | #define DMA2_X_COUNT 0xFFC00C90 /* DMA Channel 2 X Count Register */ |
| 249 | #define DMA2_Y_COUNT 0xFFC00C98 /* DMA Channel 2 Y Count Register */ |
| 250 | #define DMA2_X_MODIFY 0xFFC00C94 /* DMA Channel 2 X Modify Register */ |
| 251 | #define DMA2_Y_MODIFY 0xFFC00C9C /* DMA Channel 2 Y Modify Register */ |
| 252 | #define DMA2_CURR_DESC_PTR 0xFFC00CA0 /* DMA Channel 2 Current Descriptor Pointer Register */ |
| 253 | #define DMA2_CURR_ADDR 0xFFC00CA4 /* DMA Channel 2 Current Address Register */ |
| 254 | #define DMA2_CURR_X_COUNT 0xFFC00CB0 /* DMA Channel 2 Current X Count Register */ |
| 255 | #define DMA2_CURR_Y_COUNT 0xFFC00CB8 /* DMA Channel 2 Current Y Count Register */ |
| 256 | #define DMA2_IRQ_STATUS 0xFFC00CA8 /* DMA Channel 2 Interrupt/Status Register */ |
| 257 | #define DMA2_PERIPHERAL_MAP 0xFFC00CAC /* DMA Channel 2 Peripheral Map Register */ |
| 258 | |
| 259 | #define DMA3_CONFIG 0xFFC00CC8 /* DMA Channel 3 Configuration Register */ |
| 260 | #define DMA3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA Channel 3 Next Descriptor Pointer Register */ |
| 261 | #define DMA3_START_ADDR 0xFFC00CC4 /* DMA Channel 3 Start Address Register */ |
| 262 | #define DMA3_X_COUNT 0xFFC00CD0 /* DMA Channel 3 X Count Register */ |
| 263 | #define DMA3_Y_COUNT 0xFFC00CD8 /* DMA Channel 3 Y Count Register */ |
| 264 | #define DMA3_X_MODIFY 0xFFC00CD4 /* DMA Channel 3 X Modify Register */ |
| 265 | #define DMA3_Y_MODIFY 0xFFC00CDC /* DMA Channel 3 Y Modify Register */ |
| 266 | #define DMA3_CURR_DESC_PTR 0xFFC00CE0 /* DMA Channel 3 Current Descriptor Pointer Register */ |
| 267 | #define DMA3_CURR_ADDR 0xFFC00CE4 /* DMA Channel 3 Current Address Register */ |
| 268 | #define DMA3_CURR_X_COUNT 0xFFC00CF0 /* DMA Channel 3 Current X Count Register */ |
| 269 | #define DMA3_CURR_Y_COUNT 0xFFC00CF8 /* DMA Channel 3 Current Y Count Register */ |
| 270 | #define DMA3_IRQ_STATUS 0xFFC00CE8 /* DMA Channel 3 Interrupt/Status Register */ |
| 271 | #define DMA3_PERIPHERAL_MAP 0xFFC00CEC /* DMA Channel 3 Peripheral Map Register */ |
| 272 | |
| 273 | #define DMA4_CONFIG 0xFFC00D08 /* DMA Channel 4 Configuration Register */ |
| 274 | #define DMA4_NEXT_DESC_PTR 0xFFC00D00 /* DMA Channel 4 Next Descriptor Pointer Register */ |
| 275 | #define DMA4_START_ADDR 0xFFC00D04 /* DMA Channel 4 Start Address Register */ |
| 276 | #define DMA4_X_COUNT 0xFFC00D10 /* DMA Channel 4 X Count Register */ |
| 277 | #define DMA4_Y_COUNT 0xFFC00D18 /* DMA Channel 4 Y Count Register */ |
| 278 | #define DMA4_X_MODIFY 0xFFC00D14 /* DMA Channel 4 X Modify Register */ |
| 279 | #define DMA4_Y_MODIFY 0xFFC00D1C /* DMA Channel 4 Y Modify Register */ |
| 280 | #define DMA4_CURR_DESC_PTR 0xFFC00D20 /* DMA Channel 4 Current Descriptor Pointer Register */ |
| 281 | #define DMA4_CURR_ADDR 0xFFC00D24 /* DMA Channel 4 Current Address Register */ |
| 282 | #define DMA4_CURR_X_COUNT 0xFFC00D30 /* DMA Channel 4 Current X Count Register */ |
| 283 | #define DMA4_CURR_Y_COUNT 0xFFC00D38 /* DMA Channel 4 Current Y Count Register */ |
| 284 | #define DMA4_IRQ_STATUS 0xFFC00D28 /* DMA Channel 4 Interrupt/Status Register */ |
| 285 | #define DMA4_PERIPHERAL_MAP 0xFFC00D2C /* DMA Channel 4 Peripheral Map Register */ |
| 286 | |
| 287 | #define DMA5_CONFIG 0xFFC00D48 /* DMA Channel 5 Configuration Register */ |
| 288 | #define DMA5_NEXT_DESC_PTR 0xFFC00D40 /* DMA Channel 5 Next Descriptor Pointer Register */ |
| 289 | #define DMA5_START_ADDR 0xFFC00D44 /* DMA Channel 5 Start Address Register */ |
| 290 | #define DMA5_X_COUNT 0xFFC00D50 /* DMA Channel 5 X Count Register */ |
| 291 | #define DMA5_Y_COUNT 0xFFC00D58 /* DMA Channel 5 Y Count Register */ |
| 292 | #define DMA5_X_MODIFY 0xFFC00D54 /* DMA Channel 5 X Modify Register */ |
| 293 | #define DMA5_Y_MODIFY 0xFFC00D5C /* DMA Channel 5 Y Modify Register */ |
| 294 | #define DMA5_CURR_DESC_PTR 0xFFC00D60 /* DMA Channel 5 Current Descriptor Pointer Register */ |
| 295 | #define DMA5_CURR_ADDR 0xFFC00D64 /* DMA Channel 5 Current Address Register */ |
| 296 | #define DMA5_CURR_X_COUNT 0xFFC00D70 /* DMA Channel 5 Current X Count Register */ |
| 297 | #define DMA5_CURR_Y_COUNT 0xFFC00D78 /* DMA Channel 5 Current Y Count Register */ |
| 298 | #define DMA5_IRQ_STATUS 0xFFC00D68 /* DMA Channel 5 Interrupt/Status Register */ |
| 299 | #define DMA5_PERIPHERAL_MAP 0xFFC00D6C /* DMA Channel 5 Peripheral Map Register */ |
| 300 | |
| 301 | #define DMA6_CONFIG 0xFFC00D88 /* DMA Channel 6 Configuration Register */ |
| 302 | #define DMA6_NEXT_DESC_PTR 0xFFC00D80 /* DMA Channel 6 Next Descriptor Pointer Register */ |
| 303 | #define DMA6_START_ADDR 0xFFC00D84 /* DMA Channel 6 Start Address Register */ |
| 304 | #define DMA6_X_COUNT 0xFFC00D90 /* DMA Channel 6 X Count Register */ |
| 305 | #define DMA6_Y_COUNT 0xFFC00D98 /* DMA Channel 6 Y Count Register */ |
| 306 | #define DMA6_X_MODIFY 0xFFC00D94 /* DMA Channel 6 X Modify Register */ |
| 307 | #define DMA6_Y_MODIFY 0xFFC00D9C /* DMA Channel 6 Y Modify Register */ |
| 308 | #define DMA6_CURR_DESC_PTR 0xFFC00DA0 /* DMA Channel 6 Current Descriptor Pointer Register */ |
| 309 | #define DMA6_CURR_ADDR 0xFFC00DA4 /* DMA Channel 6 Current Address Register */ |
| 310 | #define DMA6_CURR_X_COUNT 0xFFC00DB0 /* DMA Channel 6 Current X Count Register */ |
| 311 | #define DMA6_CURR_Y_COUNT 0xFFC00DB8 /* DMA Channel 6 Current Y Count Register */ |
| 312 | #define DMA6_IRQ_STATUS 0xFFC00DA8 /* DMA Channel 6 Interrupt/Status Register */ |
| 313 | #define DMA6_PERIPHERAL_MAP 0xFFC00DAC /* DMA Channel 6 Peripheral Map Register */ |
| 314 | |
| 315 | #define DMA7_CONFIG 0xFFC00DC8 /* DMA Channel 7 Configuration Register */ |
| 316 | #define DMA7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA Channel 7 Next Descriptor Pointer Register */ |
| 317 | #define DMA7_START_ADDR 0xFFC00DC4 /* DMA Channel 7 Start Address Register */ |
| 318 | #define DMA7_X_COUNT 0xFFC00DD0 /* DMA Channel 7 X Count Register */ |
| 319 | #define DMA7_Y_COUNT 0xFFC00DD8 /* DMA Channel 7 Y Count Register */ |
| 320 | #define DMA7_X_MODIFY 0xFFC00DD4 /* DMA Channel 7 X Modify Register */ |
| 321 | #define DMA7_Y_MODIFY 0xFFC00DDC /* DMA Channel 7 Y Modify Register */ |
| 322 | #define DMA7_CURR_DESC_PTR 0xFFC00DE0 /* DMA Channel 7 Current Descriptor Pointer Register */ |
| 323 | #define DMA7_CURR_ADDR 0xFFC00DE4 /* DMA Channel 7 Current Address Register */ |
| 324 | #define DMA7_CURR_X_COUNT 0xFFC00DF0 /* DMA Channel 7 Current X Count Register */ |
| 325 | #define DMA7_CURR_Y_COUNT 0xFFC00DF8 /* DMA Channel 7 Current Y Count Register */ |
| 326 | #define DMA7_IRQ_STATUS 0xFFC00DE8 /* DMA Channel 7 Interrupt/Status Register */ |
| 327 | #define DMA7_PERIPHERAL_MAP 0xFFC00DEC /* DMA Channel 7 Peripheral Map Register */ |
| 328 | |
| 329 | #define MDMA_D1_CONFIG 0xFFC00E88 /* MemDMA Stream 1 Destination Configuration Register */ |
| 330 | #define MDMA_D1_NEXT_DESC_PTR 0xFFC00E80 /* MemDMA Stream 1 Destination Next Descriptor Pointer Register */ |
| 331 | #define MDMA_D1_START_ADDR 0xFFC00E84 /* MemDMA Stream 1 Destination Start Address Register */ |
| 332 | #define MDMA_D1_X_COUNT 0xFFC00E90 /* MemDMA Stream 1 Destination X Count Register */ |
| 333 | #define MDMA_D1_Y_COUNT 0xFFC00E98 /* MemDMA Stream 1 Destination Y Count Register */ |
| 334 | #define MDMA_D1_X_MODIFY 0xFFC00E94 /* MemDMA Stream 1 Destination X Modify Register */ |
| 335 | #define MDMA_D1_Y_MODIFY 0xFFC00E9C /* MemDMA Stream 1 Destination Y Modify Register */ |
| 336 | #define MDMA_D1_CURR_DESC_PTR 0xFFC00EA0 /* MemDMA Stream 1 Destination Current Descriptor Pointer Register */ |
| 337 | #define MDMA_D1_CURR_ADDR 0xFFC00EA4 /* MemDMA Stream 1 Destination Current Address Register */ |
| 338 | #define MDMA_D1_CURR_X_COUNT 0xFFC00EB0 /* MemDMA Stream 1 Destination Current X Count Register */ |
| 339 | #define MDMA_D1_CURR_Y_COUNT 0xFFC00EB8 /* MemDMA Stream 1 Destination Current Y Count Register */ |
| 340 | #define MDMA_D1_IRQ_STATUS 0xFFC00EA8 /* MemDMA Stream 1 Destination Interrupt/Status Register */ |
| 341 | #define MDMA_D1_PERIPHERAL_MAP 0xFFC00EAC /* MemDMA Stream 1 Destination Peripheral Map Register */ |
| 342 | |
| 343 | #define MDMA_S1_CONFIG 0xFFC00EC8 /* MemDMA Stream 1 Source Configuration Register */ |
| 344 | #define MDMA_S1_NEXT_DESC_PTR 0xFFC00EC0 /* MemDMA Stream 1 Source Next Descriptor Pointer Register */ |
| 345 | #define MDMA_S1_START_ADDR 0xFFC00EC4 /* MemDMA Stream 1 Source Start Address Register */ |
| 346 | #define MDMA_S1_X_COUNT 0xFFC00ED0 /* MemDMA Stream 1 Source X Count Register */ |
| 347 | #define MDMA_S1_Y_COUNT 0xFFC00ED8 /* MemDMA Stream 1 Source Y Count Register */ |
| 348 | #define MDMA_S1_X_MODIFY 0xFFC00ED4 /* MemDMA Stream 1 Source X Modify Register */ |
| 349 | #define MDMA_S1_Y_MODIFY 0xFFC00EDC /* MemDMA Stream 1 Source Y Modify Register */ |
| 350 | #define MDMA_S1_CURR_DESC_PTR 0xFFC00EE0 /* MemDMA Stream 1 Source Current Descriptor Pointer Register */ |
| 351 | #define MDMA_S1_CURR_ADDR 0xFFC00EE4 /* MemDMA Stream 1 Source Current Address Register */ |
| 352 | #define MDMA_S1_CURR_X_COUNT 0xFFC00EF0 /* MemDMA Stream 1 Source Current X Count Register */ |
| 353 | #define MDMA_S1_CURR_Y_COUNT 0xFFC00EF8 /* MemDMA Stream 1 Source Current Y Count Register */ |
| 354 | #define MDMA_S1_IRQ_STATUS 0xFFC00EE8 /* MemDMA Stream 1 Source Interrupt/Status Register */ |
| 355 | #define MDMA_S1_PERIPHERAL_MAP 0xFFC00EEC /* MemDMA Stream 1 Source Peripheral Map Register */ |
| 356 | |
| 357 | #define MDMA_D0_CONFIG 0xFFC00E08 /* MemDMA Stream 0 Destination Configuration Register */ |
| 358 | #define MDMA_D0_NEXT_DESC_PTR 0xFFC00E00 /* MemDMA Stream 0 Destination Next Descriptor Pointer Register */ |
| 359 | #define MDMA_D0_START_ADDR 0xFFC00E04 /* MemDMA Stream 0 Destination Start Address Register */ |
| 360 | #define MDMA_D0_X_COUNT 0xFFC00E10 /* MemDMA Stream 0 Destination X Count Register */ |
| 361 | #define MDMA_D0_Y_COUNT 0xFFC00E18 /* MemDMA Stream 0 Destination Y Count Register */ |
| 362 | #define MDMA_D0_X_MODIFY 0xFFC00E14 /* MemDMA Stream 0 Destination X Modify Register */ |
| 363 | #define MDMA_D0_Y_MODIFY 0xFFC00E1C /* MemDMA Stream 0 Destination Y Modify Register */ |
| 364 | #define MDMA_D0_CURR_DESC_PTR 0xFFC00E20 /* MemDMA Stream 0 Destination Current Descriptor Pointer Register */ |
| 365 | #define MDMA_D0_CURR_ADDR 0xFFC00E24 /* MemDMA Stream 0 Destination Current Address Register */ |
| 366 | #define MDMA_D0_CURR_X_COUNT 0xFFC00E30 /* MemDMA Stream 0 Destination Current X Count Register */ |
| 367 | #define MDMA_D0_CURR_Y_COUNT 0xFFC00E38 /* MemDMA Stream 0 Destination Current Y Count Register */ |
| 368 | #define MDMA_D0_IRQ_STATUS 0xFFC00E28 /* MemDMA Stream 0 Destination Interrupt/Status Register */ |
| 369 | #define MDMA_D0_PERIPHERAL_MAP 0xFFC00E2C /* MemDMA Stream 0 Destination Peripheral Map Register */ |
| 370 | |
| 371 | #define MDMA_S0_CONFIG 0xFFC00E48 /* MemDMA Stream 0 Source Configuration Register */ |
| 372 | #define MDMA_S0_NEXT_DESC_PTR 0xFFC00E40 /* MemDMA Stream 0 Source Next Descriptor Pointer Register */ |
| 373 | #define MDMA_S0_START_ADDR 0xFFC00E44 /* MemDMA Stream 0 Source Start Address Register */ |
| 374 | #define MDMA_S0_X_COUNT 0xFFC00E50 /* MemDMA Stream 0 Source X Count Register */ |
| 375 | #define MDMA_S0_Y_COUNT 0xFFC00E58 /* MemDMA Stream 0 Source Y Count Register */ |
| 376 | #define MDMA_S0_X_MODIFY 0xFFC00E54 /* MemDMA Stream 0 Source X Modify Register */ |
| 377 | #define MDMA_S0_Y_MODIFY 0xFFC00E5C /* MemDMA Stream 0 Source Y Modify Register */ |
| 378 | #define MDMA_S0_CURR_DESC_PTR 0xFFC00E60 /* MemDMA Stream 0 Source Current Descriptor Pointer Register */ |
| 379 | #define MDMA_S0_CURR_ADDR 0xFFC00E64 /* MemDMA Stream 0 Source Current Address Register */ |
| 380 | #define MDMA_S0_CURR_X_COUNT 0xFFC00E70 /* MemDMA Stream 0 Source Current X Count Register */ |
| 381 | #define MDMA_S0_CURR_Y_COUNT 0xFFC00E78 /* MemDMA Stream 0 Source Current Y Count Register */ |
| 382 | #define MDMA_S0_IRQ_STATUS 0xFFC00E68 /* MemDMA Stream 0 Source Interrupt/Status Register */ |
| 383 | #define MDMA_S0_PERIPHERAL_MAP 0xFFC00E6C /* MemDMA Stream 0 Source Peripheral Map Register */ |
| 384 | |
| 385 | /* Parallel Peripheral Interface (PPI) (0xFFC01000 - 0xFFC010FF) */ |
| 386 | #define PPI_CONTROL 0xFFC01000 /* PPI Control Register */ |
| 387 | #define PPI_STATUS 0xFFC01004 /* PPI Status Register */ |
| 388 | #define PPI_COUNT 0xFFC01008 /* PPI Transfer Count Register */ |
| 389 | #define PPI_DELAY 0xFFC0100C /* PPI Delay Count Register */ |
| 390 | #define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */ |
| 391 | |
| 392 | /* |
| 393 | * System MMR Register Bits |
| 394 | */ |
| 395 | /* |
| 396 | * PLL AND RESET MASKS |
| 397 | */ |
| 398 | |
| 399 | /* PLL_CTL Masks */ |
| 400 | #define PLL_CLKIN 0x00000000 /* Pass CLKIN to PLL */ |
| 401 | #define PLL_CLKIN_DIV2 0x00000001 /* Pass CLKIN/2 to PLL */ |
| 402 | #define PLL_OFF 0x00000002 /* Shut off PLL clocks */ |
| 403 | #define STOPCK_OFF 0x00000008 /* Core clock off */ |
| 404 | #define PDWN 0x00000020 /* Put the PLL in a Deep Sleep state */ |
| 405 | #define BYPASS 0x00000100 /* Bypass the PLL */ |
| 406 | |
| 407 | /* PLL_DIV Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 408 | #define SCLK_DIV(x) (x) /* SCLK = VCO / x */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 409 | |
| 410 | #define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */ |
| 411 | #define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */ |
| 412 | #define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */ |
| 413 | #define CCLK_DIV8 0x00000030 /* CCLK = VCO / 8 */ |
| 414 | |
| 415 | /* SWRST Mask */ |
| 416 | #define SYSTEM_RESET 0x00000007 /* Initiates a system software reset */ |
| 417 | |
| 418 | /* |
| 419 | * SYSTEM INTERRUPT CONTROLLER MASKS |
| 420 | */ |
| 421 | |
| 422 | /* SIC_IAR0 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 423 | #define P0_IVG(x) ((x)-7) /* Peripheral #0 assigned IVG #x */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 424 | #define P1_IVG(x) ((x)-7) << 0x4 /* Peripheral #1 assigned IVG #x */ |
| 425 | #define P2_IVG(x) ((x)-7) << 0x8 /* Peripheral #2 assigned IVG #x */ |
| 426 | #define P3_IVG(x) ((x)-7) << 0xC /* Peripheral #3 assigned IVG #x */ |
| 427 | #define P4_IVG(x) ((x)-7) << 0x10 /* Peripheral #4 assigned IVG #x */ |
| 428 | #define P5_IVG(x) ((x)-7) << 0x14 /* Peripheral #5 assigned IVG #x */ |
| 429 | #define P6_IVG(x) ((x)-7) << 0x18 /* Peripheral #6 assigned IVG #x */ |
| 430 | #define P7_IVG(x) ((x)-7) << 0x1C /* Peripheral #7 assigned IVG #x */ |
| 431 | |
| 432 | /* SIC_IAR1 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 433 | #define P8_IVG(x) ((x)-7) /* Peripheral #8 assigned IVG #x */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 434 | #define P9_IVG(x) ((x)-7) << 0x4 /* Peripheral #9 assigned IVG #x */ |
| 435 | #define P10_IVG(x) ((x)-7) << 0x8 /* Peripheral #10 assigned IVG #x */ |
| 436 | #define P11_IVG(x) ((x)-7) << 0xC /* Peripheral #11 assigned IVG #x */ |
| 437 | #define P12_IVG(x) ((x)-7) << 0x10 /* Peripheral #12 assigned IVG #x */ |
| 438 | #define P13_IVG(x) ((x)-7) << 0x14 /* Peripheral #13 assigned IVG #x */ |
| 439 | #define P14_IVG(x) ((x)-7) << 0x18 /* Peripheral #14 assigned IVG #x */ |
| 440 | #define P15_IVG(x) ((x)-7) << 0x1C /* Peripheral #15 assigned IVG #x */ |
| 441 | |
| 442 | /* SIC_IAR2 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 443 | #define P16_IVG(x) ((x)-7) /* Peripheral #16 assigned IVG #x */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 444 | #define P17_IVG(x) ((x)-7) << 0x4 /* Peripheral #17 assigned IVG #x */ |
| 445 | #define P18_IVG(x) ((x)-7) << 0x8 /* Peripheral #18 assigned IVG #x */ |
| 446 | #define P19_IVG(x) ((x)-7) << 0xC /* Peripheral #19 assigned IVG #x */ |
| 447 | #define P20_IVG(x) ((x)-7) << 0x10 /* Peripheral #20 assigned IVG #x */ |
| 448 | #define P21_IVG(x) ((x)-7) << 0x14 /* Peripheral #21 assigned IVG #x */ |
| 449 | #define P22_IVG(x) ((x)-7) << 0x18 /* Peripheral #22 assigned IVG #x */ |
| 450 | #define P23_IVG(x) ((x)-7) << 0x1C /* Peripheral #23 assigned IVG #x */ |
| 451 | |
| 452 | /* SIC_IMASK Masks */ |
| 453 | #define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */ |
| 454 | #define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */ |
| 455 | #define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */ |
| 456 | #define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */ |
| 457 | |
| 458 | /* SIC_IWR Masks */ |
| 459 | #define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */ |
| 460 | #define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */ |
| 461 | #define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */ |
| 462 | #define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */ |
| 463 | |
| 464 | /* |
| 465 | * WATCHDOG TIMER MASKS |
| 466 | */ |
| 467 | /* Watchdog Timer WDOG_CTL Register */ |
| 468 | #define ICTL(x) ((x<<1) & 0x0006) |
| 469 | #define ENABLE_RESET 0x00000000 /* Set Watchdog Timer to generate reset */ |
| 470 | #define ENABLE_NMI 0x00000002 /* Set Watchdog Timer to generate non-maskable interrupt */ |
| 471 | #define ENABLE_GPI 0x00000004 /* Set Watchdog Timer to generate general-purpose interrupt */ |
| 472 | #define DISABLE_EVT 0x00000006 /* Disable Watchdog Timer interrupts */ |
| 473 | |
| 474 | #define TMR_EN 0x0000 |
| 475 | #define TMR_DIS 0x0AD0 |
| 476 | #define TRO 0x8000 |
| 477 | |
| 478 | #define ICTL_P0 0x01 |
| 479 | #define ICTL_P1 0x02 |
| 480 | #define TRO_P 0x0F |
| 481 | |
| 482 | /* RTC_STAT and RTC_ALARM register */ |
| 483 | #define RTSEC 0x0000003F /* Real-Time Clock Seconds */ |
| 484 | #define RTMIN 0x00000FC0 /* Real-Time Clock Minutes */ |
| 485 | #define RTHR 0x0001F000 /* Real-Time Clock Hours */ |
| 486 | #define RTDAY 0xFFFE0000 /* Real-Time Clock Days */ |
| 487 | |
| 488 | /* RTC_ICTL register */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 489 | #define SWIE 0x0001 /* Stopwatch Interrupt Enable */ |
| 490 | #define AIE 0x0002 /* Alarm Interrupt Enable */ |
| 491 | #define SIE 0x0004 /* Seconds (1 Hz) Interrupt Enable */ |
| 492 | #define MIE 0x0008 /* Minutes Interrupt Enable */ |
| 493 | #define HIE 0x0010 /* Hours Interrupt Enable */ |
| 494 | #define DIE 0x0020 /* 24 Hours (Days) Interrupt Enable */ |
| 495 | #define DAIE 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */ |
| 496 | #define WCIE 0x8000 /* Write Complete Interrupt Enable */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 497 | |
| 498 | /* RTC_ISTAT register */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 499 | #define SWEF 0x0001 /* Stopwatch Event Flag */ |
| 500 | #define AEF 0x0002 /* Alarm Event Flag */ |
| 501 | #define SEF 0x0004 /* Seconds (1 Hz) Event Flag */ |
| 502 | #define MEF 0x0008 /* Minutes Event Flag */ |
| 503 | #define HEF 0x0010 /* Hours Event Flag */ |
| 504 | #define DEF 0x0020 /* 24 Hours (Days) Event Flag */ |
| 505 | #define DAEF 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Event Flag */ |
| 506 | #define WPS 0x4000 /* Write Pending Status (RO) */ |
| 507 | #define WCOM 0x8000 /* Write Complete */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 508 | |
| 509 | /* RTC_FAST Mask (RTC_PREN Mask) */ |
| 510 | #define ENABLE_PRESCALE 0x00000001 /* Enable prescaler so RTC runs at 1 Hz */ |
| 511 | #define PREN 0x00000001 /* ** Must be set after power-up for proper operation of RTC */ |
| 512 | |
| 513 | /* |
| 514 | * UART CONTROLLER MASKS |
| 515 | */ |
| 516 | |
| 517 | /* UART_LCR Register */ |
| 518 | #define DLAB 0x80 |
| 519 | #define SB 0x40 |
| 520 | #define STP 0x20 |
| 521 | #define EPS 0x10 |
| 522 | #define PEN 0x08 |
| 523 | #define STB 0x04 |
| 524 | #define WLS(x) ((x-5) & 0x03) |
| 525 | |
| 526 | #define DLAB_P 0x07 |
| 527 | #define SB_P 0x06 |
| 528 | #define STP_P 0x05 |
| 529 | #define EPS_P 0x04 |
| 530 | #define PEN_P 0x03 |
| 531 | #define STB_P 0x02 |
| 532 | #define WLS_P1 0x01 |
| 533 | #define WLS_P0 0x00 |
| 534 | |
| 535 | /* UART_MCR Register */ |
| 536 | #define LOOP_ENA 0x10 |
| 537 | #define LOOP_ENA_P 0x04 |
| 538 | |
| 539 | /* UART_LSR Register */ |
| 540 | #define TEMT 0x40 |
| 541 | #define THRE 0x20 |
| 542 | #define BI 0x10 |
| 543 | #define FE 0x08 |
| 544 | #define PE 0x04 |
| 545 | #define OE 0x02 |
| 546 | #define DR 0x01 |
| 547 | |
| 548 | #define TEMP_P 0x06 |
| 549 | #define THRE_P 0x05 |
| 550 | #define BI_P 0x04 |
| 551 | #define FE_P 0x03 |
| 552 | #define PE_P 0x02 |
| 553 | #define OE_P 0x01 |
| 554 | #define DR_P 0x00 |
| 555 | |
| 556 | /* UART_IER Register */ |
| 557 | #define ELSI 0x04 |
| 558 | #define ETBEI 0x02 |
| 559 | #define ERBFI 0x01 |
| 560 | |
| 561 | #define ELSI_P 0x02 |
| 562 | #define ETBEI_P 0x01 |
| 563 | #define ERBFI_P 0x00 |
| 564 | |
| 565 | /* UART_IIR Register */ |
| 566 | #define STATUS(x) ((x << 1) & 0x06) |
| 567 | #define NINT 0x01 |
| 568 | #define STATUS_P1 0x02 |
| 569 | #define STATUS_P0 0x01 |
| 570 | #define NINT_P 0x00 |
| 571 | |
| 572 | /* UART_GCTL Register */ |
| 573 | #define FFE 0x20 |
| 574 | #define FPE 0x10 |
| 575 | #define RPOLC 0x08 |
| 576 | #define TPOLC 0x04 |
| 577 | #define IREN 0x02 |
| 578 | #define UCEN 0x01 |
| 579 | |
| 580 | #define FFE_P 0x05 |
| 581 | #define FPE_P 0x04 |
| 582 | #define RPOLC_P 0x03 |
| 583 | #define TPOLC_P 0x02 |
| 584 | #define IREN_P 0x01 |
| 585 | #define UCEN_P 0x00 |
| 586 | |
| 587 | /* |
| 588 | * SERIAL PORT MASKS |
| 589 | */ |
| 590 | /* SPORTx_TCR1 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 591 | #define TSPEN 0x0001 /* TX enable */ |
| 592 | #define ITCLK 0x0002 /* Internal TX Clock Select */ |
| 593 | #define TDTYPE 0x000C /* TX Data Formatting Select */ |
| 594 | #define TLSBIT 0x0010 /* TX Bit Order */ |
| 595 | #define ITFS 0x0200 /* Internal TX Frame Sync Select */ |
| 596 | #define TFSR 0x0400 /* TX Frame Sync Required Select */ |
| 597 | #define DITFS 0x0800 /* Data Independent TX Frame Sync Select */ |
| 598 | #define LTFS 0x1000 /* Low TX Frame Sync Select */ |
| 599 | #define LATFS 0x2000 /* Late TX Frame Sync Select */ |
| 600 | #define TCKFE 0x4000 /* TX Clock Falling Edge Select */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 601 | |
| 602 | /* SPORTx_TCR2 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 603 | #define SLEN 0x001F /*TX Word Length */ |
| 604 | #define TXSE 0x0100 /*TX Secondary Enable */ |
| 605 | #define TSFSE 0x0200 /*TX Stereo Frame Sync Enable */ |
| 606 | #define TRFST 0x0400 /*TX Right-First Data Order */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 607 | |
| 608 | /* SPORTx_RCR1 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 609 | #define RSPEN 0x0001 /* RX enable */ |
| 610 | #define IRCLK 0x0002 /* Internal RX Clock Select */ |
| 611 | #define RDTYPE 0x000C /* RX Data Formatting Select */ |
| 612 | #define RULAW 0x0008 /* u-Law enable */ |
| 613 | #define RALAW 0x000C /* A-Law enable */ |
| 614 | #define RLSBIT 0x0010 /* RX Bit Order */ |
| 615 | #define IRFS 0x0200 /* Internal RX Frame Sync Select */ |
| 616 | #define RFSR 0x0400 /* RX Frame Sync Required Select */ |
| 617 | #define LRFS 0x1000 /* Low RX Frame Sync Select */ |
| 618 | #define LARFS 0x2000 /* Late RX Frame Sync Select */ |
| 619 | #define RCKFE 0x4000 /* RX Clock Falling Edge Select */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 620 | |
| 621 | /* SPORTx_RCR2 Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 622 | #define SLEN 0x001F /* RX Word Length */ |
| 623 | #define RXSE 0x0100 /* RX Secondary Enable */ |
| 624 | #define RSFSE 0x0200 /* RX Stereo Frame Sync Enable */ |
| 625 | #define RRFST 0x0400 /* Right-First Data Order */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 626 | |
| 627 | /* SPORTx_STAT Masks */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 628 | #define RXNE 0x0001 /* RX FIFO Not Empty Status */ |
| 629 | #define RUVF 0x0002 /* RX Underflow Status */ |
| 630 | #define ROVF 0x0004 /* RX Overflow Status */ |
| 631 | #define TXF 0x0008 /* TX FIFO Full Status */ |
| 632 | #define TUVF 0x0010 /* TX Underflow Status */ |
| 633 | #define TOVF 0x0020 /* TX Overflow Status */ |
| 634 | #define TXHRE 0x0040 /* TX Hold Register Empty */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 635 | |
| 636 | /* SPORTx_MCMC1 Masks */ |
| 637 | #define WSIZE 0x0000F000 /* Multichannel Window Size Field */ |
| 638 | #define WOFF 0x000003FF /* /Multichannel Window Offset Field */ |
| 639 | |
| 640 | /* SPORTx_MCMC2 Masks */ |
| 641 | #define MCCRM 0x00000003 /* Multichannel Clock Recovery Mode */ |
| 642 | #define MCDTXPE 0x00000004 /* Multichannel DMA Transmit Packing */ |
| 643 | #define MCDRXPE 0x00000008 /* Multichannel DMA Receive Packing */ |
| 644 | #define MCMEN 0x00000010 /* Multichannel Frame Mode Enable */ |
| 645 | #define FSDR 0x00000080 /* Multichannel Frame Sync to Data Relationship */ |
| 646 | #define MFD 0x0000F000 /* Multichannel Frame Delay */ |
| 647 | |
| 648 | /* |
| 649 | * PARALLEL PERIPHERAL INTERFACE (PPI) MASKS |
| 650 | */ |
| 651 | |
| 652 | /* PPI_CONTROL Masks */ |
| 653 | #define PORT_EN 0x00000001 /* PPI Port Enable */ |
| 654 | #define PORT_DIR 0x00000002 /* PPI Port Direction */ |
| 655 | #define XFR_TYPE 0x0000000C /* PPI Transfer Type */ |
| 656 | #define PORT_CFG 0x00000030 /* PPI Port Configuration */ |
| 657 | #define FLD_SEL 0x00000040 /* PPI Active Field Select */ |
| 658 | #define PACK_EN 0x00000080 /* PPI Packing Mode */ |
| 659 | #define DMA32 0x00000100 /* PPI 32-bit DMA Enable */ |
| 660 | #define SKIP_EN 0x00000200 /* PPI Skip Element Enable */ |
| 661 | #define SKIP_EO 0x00000400 /* PPI Skip Even/Odd Elements */ |
| 662 | #define DLENGTH 0x00003800 /* PPI Data Length */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 663 | #define DLEN_8 0x0 /* PPI Data Length mask for DLEN=8 */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 664 | #define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */ |
| 665 | #define POL 0x0000C000 /* PPI Signal Polarities */ |
| 666 | |
| 667 | /* PPI_STATUS Masks */ |
| 668 | #define FLD 0x00000400 /* Field Indicator */ |
| 669 | #define FT_ERR 0x00000800 /* Frame Track Error */ |
| 670 | #define OVR 0x00001000 /* FIFO Overflow Error */ |
| 671 | #define UNDR 0x00002000 /* FIFO Underrun Error */ |
| 672 | #define ERR_DET 0x00004000 /* Error Detected Indicator */ |
| 673 | #define ERR_NCOR 0x00008000 /* Error Not Corrected Indicator */ |
| 674 | |
| 675 | /* |
| 676 | * DMA CONTROLLER MASKS |
| 677 | */ |
| 678 | |
| 679 | /* DMAx_CONFIG, MDMA_yy_CONFIG Masks */ |
| 680 | #define DMAEN 0x00000001 /* Channel Enable */ |
| 681 | #define WNR 0x00000002 /* Channel Direction (W/R*) */ |
| 682 | #define WDSIZE_8 0x00000000 /* Word Size 8 bits */ |
| 683 | #define WDSIZE_16 0x00000004 /* Word Size 16 bits */ |
| 684 | #define WDSIZE_32 0x00000008 /* Word Size 32 bits */ |
| 685 | #define DMA2D 0x00000010 /* 2D/1D* Mode */ |
| 686 | #define RESTART 0x00000020 /* Restart */ |
| 687 | #define DI_SEL 0x00000040 /* Data Interrupt Select */ |
| 688 | #define DI_EN 0x00000080 /* Data Interrupt Enable */ |
| 689 | #define NDSIZE 0x00000900 /* Next Descriptor Size */ |
| 690 | #define FLOW 0x00007000 /* Flow Control */ |
| 691 | |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 692 | #define DMAEN_P 0 /* Channel Enable */ |
| 693 | #define WNR_P 1 /* Channel Direction (W/R*) */ |
| 694 | #define DMA2D_P 4 /* 2D/1D* Mode */ |
| 695 | #define RESTART_P 5 /* Restart */ |
| 696 | #define DI_SEL_P 6 /* Data Interrupt Select */ |
| 697 | #define DI_EN_P 7 /* Data Interrupt Enable */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 698 | |
| 699 | /* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */ |
| 700 | #define DMA_DONE 0x00000001 /* DMA Done Indicator */ |
| 701 | #define DMA_ERR 0x00000002 /* DMA Error Indicator */ |
| 702 | #define DFETCH 0x00000004 /* Descriptor Fetch Indicator */ |
| 703 | #define DMA_RUN 0x00000008 /* DMA Running Indicator */ |
| 704 | |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 705 | #define DMA_DONE_P 0 /* DMA Done Indicator */ |
| 706 | #define DMA_ERR_P 1 /* DMA Error Indicator */ |
| 707 | #define DFETCH_P 2 /* Descriptor Fetch Indicator */ |
| 708 | #define DMA_RUN_P 3 /* DMA Running Indicator */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 709 | |
| 710 | /* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */ |
| 711 | #define CTYPE 0x00000040 /* DMA Channel Type Indicator */ |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 712 | #define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 713 | #define PCAP8 0x00000080 /* DMA 8-bit Operation Indicator */ |
| 714 | #define PCAP16 0x00000100 /* DMA 16-bit Operation Indicator */ |
| 715 | #define PCAP32 0x00000200 /* DMA 32-bit Operation Indicator */ |
| 716 | #define PCAPWR 0x00000400 /* DMA Write Operation Indicator */ |
| 717 | #define PCAPRD 0x00000800 /* DMA Read Operation Indicator */ |
| 718 | #define PMAP 0x00007000 /* DMA Peripheral Map Field */ |
| 719 | |
| 720 | /* |
| 721 | * GENERAL PURPOSE TIMER MASKS |
| 722 | */ |
| 723 | |
| 724 | /* PWM Timer bit definitions */ |
| 725 | |
| 726 | /* TIMER_ENABLE Register */ |
| 727 | #define TIMEN0 0x0001 |
| 728 | #define TIMEN1 0x0002 |
| 729 | #define TIMEN2 0x0004 |
| 730 | |
| 731 | #define TIMEN0_P 0x00 |
| 732 | #define TIMEN1_P 0x01 |
| 733 | #define TIMEN2_P 0x02 |
| 734 | |
| 735 | /* TIMER_DISABLE Register */ |
| 736 | #define TIMDIS0 0x0001 |
| 737 | #define TIMDIS1 0x0002 |
| 738 | #define TIMDIS2 0x0004 |
| 739 | |
| 740 | #define TIMDIS0_P 0x00 |
| 741 | #define TIMDIS1_P 0x01 |
| 742 | #define TIMDIS2_P 0x02 |
| 743 | |
| 744 | /* TIMER_STATUS Register */ |
| 745 | #define TIMIL0 0x0001 |
| 746 | #define TIMIL1 0x0002 |
| 747 | #define TIMIL2 0x0004 |
| 748 | #define TOVL_ERR0 0x0010 |
| 749 | #define TOVL_ERR1 0x0020 |
| 750 | #define TOVL_ERR2 0x0040 |
| 751 | #define TRUN0 0x1000 |
| 752 | #define TRUN1 0x2000 |
| 753 | #define TRUN2 0x4000 |
| 754 | |
| 755 | #define TIMIL0_P 0x00 |
| 756 | #define TIMIL1_P 0x01 |
| 757 | #define TIMIL2_P 0x02 |
| 758 | #define TOVL_ERR0_P 0x04 |
| 759 | #define TOVL_ERR1_P 0x05 |
| 760 | #define TOVL_ERR2_P 0x06 |
| 761 | #define TRUN0_P 0x0C |
| 762 | #define TRUN1_P 0x0D |
| 763 | #define TRUN2_P 0x0E |
| 764 | |
| 765 | /* TIMERx_CONFIG Registers */ |
| 766 | #define PWM_OUT 0x0001 |
| 767 | #define WDTH_CAP 0x0002 |
| 768 | #define EXT_CLK 0x0003 |
| 769 | #define PULSE_HI 0x0004 |
| 770 | #define PERIOD_CNT 0x0008 |
| 771 | #define IRQ_ENA 0x0010 |
| 772 | #define TIN_SEL 0x0020 |
| 773 | #define OUT_DIS 0x0040 |
| 774 | #define CLK_SEL 0x0080 |
| 775 | #define TOGGLE_HI 0x0100 |
| 776 | #define EMU_RUN 0x0200 |
| 777 | #define ERR_TYP(x) ((x & 0x03) << 14) |
| 778 | |
| 779 | #define TMODE_P0 0x00 |
| 780 | #define TMODE_P1 0x01 |
| 781 | #define PULSE_HI_P 0x02 |
| 782 | #define PERIOD_CNT_P 0x03 |
| 783 | #define IRQ_ENA_P 0x04 |
| 784 | #define TIN_SEL_P 0x05 |
| 785 | #define OUT_DIS_P 0x06 |
| 786 | #define CLK_SEL_P 0x07 |
| 787 | #define TOGGLE_HI_P 0x08 |
| 788 | #define EMU_RUN_P 0x09 |
| 789 | #define ERR_TYP_P0 0x0E |
| 790 | #define ERR_TYP_P1 0x0F |
| 791 | |
Wolfgang Denk | 2bad868 | 2006-03-12 02:55:22 +0100 | [diff] [blame] | 792 | /* |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 793 | * PROGRAMMABLE FLAG MASKS |
| 794 | */ |
| 795 | |
| 796 | /* General Purpose IO (0xFFC00700 - 0xFFC007FF) Masks */ |
| 797 | #define PF0 0x0001 |
| 798 | #define PF1 0x0002 |
| 799 | #define PF2 0x0004 |
| 800 | #define PF3 0x0008 |
| 801 | #define PF4 0x0010 |
| 802 | #define PF5 0x0020 |
| 803 | #define PF6 0x0040 |
| 804 | #define PF7 0x0080 |
| 805 | #define PF8 0x0100 |
| 806 | #define PF9 0x0200 |
| 807 | #define PF10 0x0400 |
| 808 | #define PF11 0x0800 |
| 809 | #define PF12 0x1000 |
| 810 | #define PF13 0x2000 |
| 811 | #define PF14 0x4000 |
| 812 | #define PF15 0x8000 |
| 813 | |
| 814 | /* General Purpose IO (0xFFC00700 - 0xFFC007FF) BIT POSITIONS */ |
| 815 | #define PF0_P 0 |
| 816 | #define PF1_P 1 |
| 817 | #define PF2_P 2 |
| 818 | #define PF3_P 3 |
| 819 | #define PF4_P 4 |
| 820 | #define PF5_P 5 |
| 821 | #define PF6_P 6 |
| 822 | #define PF7_P 7 |
| 823 | #define PF8_P 8 |
| 824 | #define PF9_P 9 |
| 825 | #define PF10_P 10 |
| 826 | #define PF11_P 11 |
| 827 | #define PF12_P 12 |
| 828 | #define PF13_P 13 |
| 829 | #define PF14_P 14 |
| 830 | #define PF15_P 15 |
| 831 | |
| 832 | /* |
| 833 | * SERIAL PERIPHERAL INTERFACE (SPI) MASKS |
| 834 | */ |
| 835 | |
| 836 | /* SPI_CTL Masks */ |
| 837 | #define TIMOD 0x00000003 /* Transfer initiation mode and interrupt generation */ |
| 838 | #define SZ 0x00000004 /* Send Zero (=0) or last (=1) word when TDBR empty. */ |
| 839 | #define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */ |
| 840 | #define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */ |
| 841 | #define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */ |
| 842 | #define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */ |
| 843 | #define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */ |
| 844 | #define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */ |
| 845 | #define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */ |
| 846 | #define MSTR 0x00001000 /* Configures SPI as master (=1) or slave (=0) */ |
| 847 | #define WOM 0x00002000 /* Open drain (=1) data output enable (for MOSI and MISO) */ |
| 848 | #define SPE 0x00004000 /* SPI module enable (=1), disable (=0) */ |
| 849 | |
| 850 | /* SPI_FLG Masks */ |
| 851 | #define FLS1 0x00000002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */ |
| 852 | #define FLS2 0x00000004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */ |
| 853 | #define FLS3 0x00000008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */ |
| 854 | #define FLS4 0x00000010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */ |
| 855 | #define FLS5 0x00000020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */ |
| 856 | #define FLS6 0x00000040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */ |
| 857 | #define FLS7 0x00000080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */ |
| 858 | #define FLG1 0x00000200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */ |
| 859 | #define FLG2 0x00000400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */ |
| 860 | #define FLG3 0x00000800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */ |
| 861 | #define FLG4 0x00001000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */ |
| 862 | #define FLG5 0x00002000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */ |
| 863 | #define FLG6 0x00004000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */ |
| 864 | #define FLG7 0x00008000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */ |
| 865 | |
| 866 | /* SPI_FLG Bit Positions */ |
| 867 | #define FLS1_P 0x00000001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */ |
| 868 | #define FLS2_P 0x00000002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */ |
| 869 | #define FLS3_P 0x00000003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */ |
| 870 | #define FLS4_P 0x00000004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */ |
| 871 | #define FLS5_P 0x00000005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */ |
| 872 | #define FLS6_P 0x00000006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */ |
| 873 | #define FLS7_P 0x00000007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */ |
| 874 | #define FLG1_P 0x00000009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */ |
| 875 | #define FLG2_P 0x0000000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */ |
| 876 | #define FLG3_P 0x0000000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */ |
| 877 | #define FLG4_P 0x0000000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */ |
| 878 | #define FLG5_P 0x0000000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */ |
| 879 | #define FLG6_P 0x0000000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */ |
| 880 | #define FLG7_P 0x0000000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */ |
| 881 | |
| 882 | /* SPI_STAT Masks */ |
| 883 | #define SPIF 0x00000001 /* Set (=1) when SPI single-word transfer complete */ |
| 884 | #define MODF 0x00000002 /* Set(=1)in a master device when some other device tries to become master */ |
| 885 | #define TXE 0x00000004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */ |
| 886 | #define TXS 0x00000008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */ |
| 887 | #define RBSY 0x00000010 /* Set (=1) when data is received with RDBR full */ |
| 888 | #define RXS 0x00000020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */ |
| 889 | #define TXCOL 0x00000040 /* When set (=1), corrupt data may have been transmitted */ |
| 890 | |
| 891 | /* |
| 892 | * ASYNCHRONOUS MEMORY CONTROLLER MASKS |
| 893 | */ |
| 894 | |
| 895 | /* AMGCTL Masks */ |
| 896 | #define AMCKEN 0x00000001 /* Enable CLKOUT */ |
| 897 | #define AMBEN_B0 0x00000002 /* Enable Asynchronous Memory Bank 0 only */ |
| 898 | #define AMBEN_B0_B1 0x00000004 /* Enable Asynchronous Memory Banks 0 & 1 only */ |
| 899 | #define AMBEN_B0_B1_B2 0x00000006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */ |
| 900 | #define AMBEN_ALL 0x00000008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */ |
| 901 | |
| 902 | /* AMGCTL Bit Positions */ |
| 903 | #define AMCKEN_P 0x00000000 /* Enable CLKOUT */ |
| 904 | #define AMBEN_P0 0x00000001 /* Asynchronous Memory Enable, 000 - banks 0-3 disabled, 001 - Bank 0 enabled */ |
| 905 | #define AMBEN_P1 0x00000002 /* Asynchronous Memory Enable, 010 - banks 0&1 enabled, 011 - banks 0-3 enabled */ |
| 906 | #define AMBEN_P2 0x00000003 /* Asynchronous Memory Enable, 1xx - All banks (bank 0, 1, 2, and 3) enabled */ |
| 907 | |
| 908 | /* AMBCTL0 Masks */ |
| 909 | #define B0RDYEN 0x00000001 /* Bank 0 RDY Enable, 0=disable, 1=enable */ |
| 910 | #define B0RDYPOL 0x00000002 /* Bank 0 RDY Active high, 0=active low, 1=active high */ |
| 911 | #define B0TT_1 0x00000004 /* Bank 0 Transition Time from Read to Write = 1 cycle */ |
| 912 | #define B0TT_2 0x00000008 /* Bank 0 Transition Time from Read to Write = 2 cycles */ |
| 913 | #define B0TT_3 0x0000000C /* Bank 0 Transition Time from Read to Write = 3 cycles */ |
| 914 | #define B0TT_4 0x00000000 /* Bank 0 Transition Time from Read to Write = 4 cycles */ |
| 915 | #define B0ST_1 0x00000010 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=1 cycle */ |
| 916 | #define B0ST_2 0x00000020 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=2 cycles */ |
| 917 | #define B0ST_3 0x00000030 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=3 cycles */ |
| 918 | #define B0ST_4 0x00000000 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=4 cycles */ |
| 919 | #define B0HT_1 0x00000040 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 1 cycle */ |
| 920 | #define B0HT_2 0x00000080 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 2 cycles */ |
| 921 | #define B0HT_3 0x000000C0 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 3 cycles */ |
| 922 | #define B0HT_0 0x00000000 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 0 cycles */ |
| 923 | #define B0RAT_1 0x00000100 /* Bank 0 Read Access Time = 1 cycle */ |
| 924 | #define B0RAT_2 0x00000200 /* Bank 0 Read Access Time = 2 cycles */ |
| 925 | #define B0RAT_3 0x00000300 /* Bank 0 Read Access Time = 3 cycles */ |
| 926 | #define B0RAT_4 0x00000400 /* Bank 0 Read Access Time = 4 cycles */ |
| 927 | #define B0RAT_5 0x00000500 /* Bank 0 Read Access Time = 5 cycles */ |
| 928 | #define B0RAT_6 0x00000600 /* Bank 0 Read Access Time = 6 cycles */ |
| 929 | #define B0RAT_7 0x00000700 /* Bank 0 Read Access Time = 7 cycles */ |
| 930 | #define B0RAT_8 0x00000800 /* Bank 0 Read Access Time = 8 cycles */ |
| 931 | #define B0RAT_9 0x00000900 /* Bank 0 Read Access Time = 9 cycles */ |
| 932 | #define B0RAT_10 0x00000A00 /* Bank 0 Read Access Time = 10 cycles */ |
| 933 | #define B0RAT_11 0x00000B00 /* Bank 0 Read Access Time = 11 cycles */ |
| 934 | #define B0RAT_12 0x00000C00 /* Bank 0 Read Access Time = 12 cycles */ |
| 935 | #define B0RAT_13 0x00000D00 /* Bank 0 Read Access Time = 13 cycles */ |
| 936 | #define B0RAT_14 0x00000E00 /* Bank 0 Read Access Time = 14 cycles */ |
| 937 | #define B0RAT_15 0x00000F00 /* Bank 0 Read Access Time = 15 cycles */ |
| 938 | #define B0WAT_1 0x00001000 /* Bank 0 Write Access Time = 1 cycle */ |
| 939 | #define B0WAT_2 0x00002000 /* Bank 0 Write Access Time = 2 cycles */ |
| 940 | #define B0WAT_3 0x00003000 /* Bank 0 Write Access Time = 3 cycles */ |
| 941 | #define B0WAT_4 0x00004000 /* Bank 0 Write Access Time = 4 cycles */ |
| 942 | #define B0WAT_5 0x00005000 /* Bank 0 Write Access Time = 5 cycles */ |
| 943 | #define B0WAT_6 0x00006000 /* Bank 0 Write Access Time = 6 cycles */ |
| 944 | #define B0WAT_7 0x00007000 /* Bank 0 Write Access Time = 7 cycles */ |
| 945 | #define B0WAT_8 0x00008000 /* Bank 0 Write Access Time = 8 cycles */ |
| 946 | #define B0WAT_9 0x00009000 /* Bank 0 Write Access Time = 9 cycles */ |
| 947 | #define B0WAT_10 0x0000A000 /* Bank 0 Write Access Time = 10 cycles */ |
| 948 | #define B0WAT_11 0x0000B000 /* Bank 0 Write Access Time = 11 cycles */ |
| 949 | #define B0WAT_12 0x0000C000 /* Bank 0 Write Access Time = 12 cycles */ |
| 950 | #define B0WAT_13 0x0000D000 /* Bank 0 Write Access Time = 13 cycles */ |
| 951 | #define B0WAT_14 0x0000E000 /* Bank 0 Write Access Time = 14 cycles */ |
| 952 | #define B0WAT_15 0x0000F000 /* Bank 0 Write Access Time = 15 cycles */ |
| 953 | #define B1RDYEN 0x00010000 /* Bank 1 RDY enable, 0=disable, 1=enable */ |
| 954 | #define B1RDYPOL 0x00020000 /* Bank 1 RDY Active high, 0=active low, 1=active high */ |
| 955 | #define B1TT_1 0x00040000 /* Bank 1 Transition Time from Read to Write = 1 cycle */ |
| 956 | #define B1TT_2 0x00080000 /* Bank 1 Transition Time from Read to Write = 2 cycles */ |
| 957 | #define B1TT_3 0x000C0000 /* Bank 1 Transition Time from Read to Write = 3 cycles */ |
| 958 | #define B1TT_4 0x00000000 /* Bank 1 Transition Time from Read to Write = 4 cycles */ |
| 959 | #define B1ST_1 0x00100000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */ |
| 960 | #define B1ST_2 0x00200000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */ |
| 961 | #define B1ST_3 0x00300000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */ |
| 962 | #define B1ST_4 0x00000000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */ |
| 963 | #define B1HT_1 0x00400000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */ |
| 964 | #define B1HT_2 0x00800000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */ |
| 965 | #define B1HT_3 0x00C00000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */ |
| 966 | #define B1HT_0 0x00000000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */ |
| 967 | #define B1RAT_1 0x01000000 /* Bank 1 Read Access Time = 1 cycle */ |
| 968 | #define B1RAT_2 0x02000000 /* Bank 1 Read Access Time = 2 cycles */ |
| 969 | #define B1RAT_3 0x03000000 /* Bank 1 Read Access Time = 3 cycles */ |
| 970 | #define B1RAT_4 0x04000000 /* Bank 1 Read Access Time = 4 cycles */ |
| 971 | #define B1RAT_5 0x05000000 /* Bank 1 Read Access Time = 5 cycles */ |
| 972 | #define B1RAT_6 0x06000000 /* Bank 1 Read Access Time = 6 cycles */ |
| 973 | #define B1RAT_7 0x07000000 /* Bank 1 Read Access Time = 7 cycles */ |
| 974 | #define B1RAT_8 0x08000000 /* Bank 1 Read Access Time = 8 cycles */ |
| 975 | #define B1RAT_9 0x09000000 /* Bank 1 Read Access Time = 9 cycles */ |
| 976 | #define B1RAT_10 0x0A000000 /* Bank 1 Read Access Time = 10 cycles */ |
| 977 | #define B1RAT_11 0x0B000000 /* Bank 1 Read Access Time = 11 cycles */ |
| 978 | #define B1RAT_12 0x0C000000 /* Bank 1 Read Access Time = 12 cycles */ |
| 979 | #define B1RAT_13 0x0D000000 /* Bank 1 Read Access Time = 13 cycles */ |
| 980 | #define B1RAT_14 0x0E000000 /* Bank 1 Read Access Time = 14 cycles */ |
| 981 | #define B1RAT_15 0x0F000000 /* Bank 1 Read Access Time = 15 cycles */ |
| 982 | #define B1WAT_1 0x10000000 /* Bank 1 Write Access Time = 1 cycle */ |
| 983 | #define B1WAT_2 0x20000000 /* Bank 1 Write Access Time = 2 cycles */ |
| 984 | #define B1WAT_3 0x30000000 /* Bank 1 Write Access Time = 3 cycles */ |
| 985 | #define B1WAT_4 0x40000000 /* Bank 1 Write Access Time = 4 cycles */ |
| 986 | #define B1WAT_5 0x50000000 /* Bank 1 Write Access Time = 5 cycles */ |
| 987 | #define B1WAT_6 0x60000000 /* Bank 1 Write Access Time = 6 cycles */ |
| 988 | #define B1WAT_7 0x70000000 /* Bank 1 Write Access Time = 7 cycles */ |
| 989 | #define B1WAT_8 0x80000000 /* Bank 1 Write Access Time = 8 cycles */ |
| 990 | #define B1WAT_9 0x90000000 /* Bank 1 Write Access Time = 9 cycles */ |
| 991 | #define B1WAT_10 0xA0000000 /* Bank 1 Write Access Time = 10 cycles */ |
| 992 | #define B1WAT_11 0xB0000000 /* Bank 1 Write Access Time = 11 cycles */ |
| 993 | #define B1WAT_12 0xC0000000 /* Bank 1 Write Access Time = 12 cycles */ |
| 994 | #define B1WAT_13 0xD0000000 /* Bank 1 Write Access Time = 13 cycles */ |
| 995 | #define B1WAT_14 0xE0000000 /* Bank 1 Write Access Time = 14 cycles */ |
| 996 | #define B1WAT_15 0xF0000000 /* Bank 1 Write Access Time = 15 cycles */ |
| 997 | |
| 998 | /* AMBCTL1 Masks */ |
| 999 | #define B2RDYEN 0x00000001 /* Bank 2 RDY Enable, 0=disable, 1=enable */ |
| 1000 | #define B2RDYPOL 0x00000002 /* Bank 2 RDY Active high, 0=active low, 1=active high */ |
| 1001 | #define B2TT_1 0x00000004 /* Bank 2 Transition Time from Read to Write = 1 cycle */ |
| 1002 | #define B2TT_2 0x00000008 /* Bank 2 Transition Time from Read to Write = 2 cycles */ |
| 1003 | #define B2TT_3 0x0000000C /* Bank 2 Transition Time from Read to Write = 3 cycles */ |
| 1004 | #define B2TT_4 0x00000000 /* Bank 2 Transition Time from Read to Write = 4 cycles */ |
| 1005 | #define B2ST_1 0x00000010 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */ |
| 1006 | #define B2ST_2 0x00000020 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */ |
| 1007 | #define B2ST_3 0x00000030 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */ |
| 1008 | #define B2ST_4 0x00000000 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */ |
| 1009 | #define B2HT_1 0x00000040 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */ |
| 1010 | #define B2HT_2 0x00000080 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */ |
| 1011 | #define B2HT_3 0x000000C0 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */ |
| 1012 | #define B2HT_0 0x00000000 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */ |
| 1013 | #define B2RAT_1 0x00000100 /* Bank 2 Read Access Time = 1 cycle */ |
| 1014 | #define B2RAT_2 0x00000200 /* Bank 2 Read Access Time = 2 cycles */ |
| 1015 | #define B2RAT_3 0x00000300 /* Bank 2 Read Access Time = 3 cycles */ |
| 1016 | #define B2RAT_4 0x00000400 /* Bank 2 Read Access Time = 4 cycles */ |
| 1017 | #define B2RAT_5 0x00000500 /* Bank 2 Read Access Time = 5 cycles */ |
| 1018 | #define B2RAT_6 0x00000600 /* Bank 2 Read Access Time = 6 cycles */ |
| 1019 | #define B2RAT_7 0x00000700 /* Bank 2 Read Access Time = 7 cycles */ |
| 1020 | #define B2RAT_8 0x00000800 /* Bank 2 Read Access Time = 8 cycles */ |
| 1021 | #define B2RAT_9 0x00000900 /* Bank 2 Read Access Time = 9 cycles */ |
| 1022 | #define B2RAT_10 0x00000A00 /* Bank 2 Read Access Time = 10 cycles */ |
| 1023 | #define B2RAT_11 0x00000B00 /* Bank 2 Read Access Time = 11 cycles */ |
| 1024 | #define B2RAT_12 0x00000C00 /* Bank 2 Read Access Time = 12 cycles */ |
| 1025 | #define B2RAT_13 0x00000D00 /* Bank 2 Read Access Time = 13 cycles */ |
| 1026 | #define B2RAT_14 0x00000E00 /* Bank 2 Read Access Time = 14 cycles */ |
| 1027 | #define B2RAT_15 0x00000F00 /* Bank 2 Read Access Time = 15 cycles */ |
| 1028 | #define B2WAT_1 0x00001000 /* Bank 2 Write Access Time = 1 cycle */ |
| 1029 | #define B2WAT_2 0x00002000 /* Bank 2 Write Access Time = 2 cycles */ |
| 1030 | #define B2WAT_3 0x00003000 /* Bank 2 Write Access Time = 3 cycles */ |
| 1031 | #define B2WAT_4 0x00004000 /* Bank 2 Write Access Time = 4 cycles */ |
| 1032 | #define B2WAT_5 0x00005000 /* Bank 2 Write Access Time = 5 cycles */ |
| 1033 | #define B2WAT_6 0x00006000 /* Bank 2 Write Access Time = 6 cycles */ |
| 1034 | #define B2WAT_7 0x00007000 /* Bank 2 Write Access Time = 7 cycles */ |
| 1035 | #define B2WAT_8 0x00008000 /* Bank 2 Write Access Time = 8 cycles */ |
| 1036 | #define B2WAT_9 0x00009000 /* Bank 2 Write Access Time = 9 cycles */ |
| 1037 | #define B2WAT_10 0x0000A000 /* Bank 2 Write Access Time = 10 cycles */ |
| 1038 | #define B2WAT_11 0x0000B000 /* Bank 2 Write Access Time = 11 cycles */ |
| 1039 | #define B2WAT_12 0x0000C000 /* Bank 2 Write Access Time = 12 cycles */ |
| 1040 | #define B2WAT_13 0x0000D000 /* Bank 2 Write Access Time = 13 cycles */ |
| 1041 | #define B2WAT_14 0x0000E000 /* Bank 2 Write Access Time = 14 cycles */ |
| 1042 | #define B2WAT_15 0x0000F000 /* Bank 2 Write Access Time = 15 cycles */ |
| 1043 | #define B3RDYEN 0x00010000 /* Bank 3 RDY enable, 0=disable, 1=enable */ |
| 1044 | #define B3RDYPOL 0x00020000 /* Bank 3 RDY Active high, 0=active low, 1=active high */ |
| 1045 | #define B3TT_1 0x00040000 /* Bank 3 Transition Time from Read to Write = 1 cycle */ |
| 1046 | #define B3TT_2 0x00080000 /* Bank 3 Transition Time from Read to Write = 2 cycles */ |
| 1047 | #define B3TT_3 0x000C0000 /* Bank 3 Transition Time from Read to Write = 3 cycles */ |
| 1048 | #define B3TT_4 0x00000000 /* Bank 3 Transition Time from Read to Write = 4 cycles */ |
| 1049 | #define B3ST_1 0x00100000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */ |
| 1050 | #define B3ST_2 0x00200000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */ |
| 1051 | #define B3ST_3 0x00300000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */ |
| 1052 | #define B3ST_4 0x00000000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */ |
| 1053 | #define B3HT_1 0x00400000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */ |
| 1054 | #define B3HT_2 0x00800000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */ |
| 1055 | #define B3HT_3 0x00C00000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */ |
| 1056 | #define B3HT_0 0x00000000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */ |
| 1057 | #define B3RAT_1 0x01000000 /* Bank 3 Read Access Time = 1 cycle */ |
| 1058 | #define B3RAT_2 0x02000000 /* Bank 3 Read Access Time = 2 cycles */ |
| 1059 | #define B3RAT_3 0x03000000 /* Bank 3 Read Access Time = 3 cycles */ |
| 1060 | #define B3RAT_4 0x04000000 /* Bank 3 Read Access Time = 4 cycles */ |
| 1061 | #define B3RAT_5 0x05000000 /* Bank 3 Read Access Time = 5 cycles */ |
| 1062 | #define B3RAT_6 0x06000000 /* Bank 3 Read Access Time = 6 cycles */ |
| 1063 | #define B3RAT_7 0x07000000 /* Bank 3 Read Access Time = 7 cycles */ |
| 1064 | #define B3RAT_8 0x08000000 /* Bank 3 Read Access Time = 8 cycles */ |
| 1065 | #define B3RAT_9 0x09000000 /* Bank 3 Read Access Time = 9 cycles */ |
| 1066 | #define B3RAT_10 0x0A000000 /* Bank 3 Read Access Time = 10 cycles */ |
| 1067 | #define B3RAT_11 0x0B000000 /* Bank 3 Read Access Time = 11 cycles */ |
| 1068 | #define B3RAT_12 0x0C000000 /* Bank 3 Read Access Time = 12 cycles */ |
| 1069 | #define B3RAT_13 0x0D000000 /* Bank 3 Read Access Time = 13 cycles */ |
| 1070 | #define B3RAT_14 0x0E000000 /* Bank 3 Read Access Time = 14 cycles */ |
| 1071 | #define B3RAT_15 0x0F000000 /* Bank 3 Read Access Time = 15 cycles */ |
| 1072 | #define B3WAT_1 0x10000000 /* Bank 3 Write Access Time = 1 cycle */ |
| 1073 | #define B3WAT_2 0x20000000 /* Bank 3 Write Access Time = 2 cycles */ |
| 1074 | #define B3WAT_3 0x30000000 /* Bank 3 Write Access Time = 3 cycles */ |
| 1075 | #define B3WAT_4 0x40000000 /* Bank 3 Write Access Time = 4 cycles */ |
| 1076 | #define B3WAT_5 0x50000000 /* Bank 3 Write Access Time = 5 cycles */ |
| 1077 | #define B3WAT_6 0x60000000 /* Bank 3 Write Access Time = 6 cycles */ |
| 1078 | #define B3WAT_7 0x70000000 /* Bank 3 Write Access Time = 7 cycles */ |
| 1079 | #define B3WAT_8 0x80000000 /* Bank 3 Write Access Time = 8 cycles */ |
| 1080 | #define B3WAT_9 0x90000000 /* Bank 3 Write Access Time = 9 cycles */ |
| 1081 | #define B3WAT_10 0xA0000000 /* Bank 3 Write Access Time = 10 cycles */ |
| 1082 | #define B3WAT_11 0xB0000000 /* Bank 3 Write Access Time = 11 cycles */ |
| 1083 | #define B3WAT_12 0xC0000000 /* Bank 3 Write Access Time = 12 cycles */ |
| 1084 | #define B3WAT_13 0xD0000000 /* Bank 3 Write Access Time = 13 cycles */ |
| 1085 | #define B3WAT_14 0xE0000000 /* Bank 3 Write Access Time = 14 cycles */ |
| 1086 | #define B3WAT_15 0xF0000000 /* Bank 3 Write Access Time = 15 cycles */ |
| 1087 | |
| 1088 | /* |
| 1089 | * SDRAM CONTROLLER MASKS |
| 1090 | */ |
| 1091 | |
| 1092 | /* SDGCTL Masks */ |
| 1093 | #define SCTLE 0x00000001 /* Enable SCLK[0], /SRAS, /SCAS, /SWE, SDQM[3:0] */ |
| 1094 | #define CL_2 0x00000008 /* SDRAM CAS latency = 2 cycles */ |
| 1095 | #define CL_3 0x0000000C /* SDRAM CAS latency = 3 cycles */ |
| 1096 | #define PFE 0x00000010 /* Enable SDRAM prefetch */ |
| 1097 | #define PFP 0x00000020 /* Prefetch has priority over AMC requests */ |
| 1098 | #define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */ |
| 1099 | #define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */ |
| 1100 | #define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */ |
| 1101 | #define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */ |
| 1102 | #define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */ |
| 1103 | #define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */ |
| 1104 | #define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */ |
| 1105 | #define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */ |
| 1106 | #define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */ |
| 1107 | #define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */ |
| 1108 | #define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */ |
| 1109 | #define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */ |
| 1110 | #define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */ |
| 1111 | #define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */ |
| 1112 | #define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */ |
| 1113 | #define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */ |
| 1114 | #define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */ |
| 1115 | #define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */ |
| 1116 | #define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */ |
| 1117 | #define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */ |
| 1118 | #define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */ |
| 1119 | #define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */ |
| 1120 | #define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */ |
| 1121 | #define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */ |
| 1122 | #define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */ |
| 1123 | #define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */ |
| 1124 | #define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */ |
| 1125 | #define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */ |
| 1126 | #define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */ |
| 1127 | #define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */ |
| 1128 | #define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */ |
| 1129 | #define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */ |
| 1130 | #define PUPSD 0x00200000 /* Power-up start delay */ |
| 1131 | #define PSM 0x00400000 /* SDRAM power-up sequence = Precharge, mode register set, 8 CBR refresh cycles */ |
| 1132 | #define PSS 0x00800000 /* enable SDRAM power-up sequence on next SDRAM access */ |
| 1133 | #define SRFS 0x01000000 /* Start SDRAM self-refresh mode */ |
| 1134 | #define EBUFE 0x02000000 /* Enable external buffering timing */ |
| 1135 | #define FBBRW 0x04000000 /* Fast back-to-back read write enable */ |
| 1136 | #define EMREN 0x10000000 /* Extended mode register enable */ |
| 1137 | #define TCSR 0x20000000 /* Temp compensated self refresh value 85 deg C */ |
| 1138 | #define CDDBG 0x40000000 /* Tristate SDRAM controls during bus grant */ |
| 1139 | |
| 1140 | /* EBIU_SDBCTL Masks */ |
| 1141 | #define EBE 0x00000001 /* Enable SDRAM external bank */ |
| 1142 | #define EBSZ_16 0x00000000 /* SDRAM external bank size = 16MB */ |
| 1143 | #define EBSZ_32 0x00000002 /* SDRAM external bank size = 32MB */ |
| 1144 | #define EBSZ_64 0x00000004 /* SDRAM external bank size = 64MB */ |
| 1145 | #define EBSZ_128 0x00000006 /* SDRAM external bank size = 128MB */ |
| 1146 | #define EBCAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */ |
| 1147 | #define EBCAW_9 0x00000010 /* SDRAM external bank column address width = 9 bits */ |
| 1148 | #define EBCAW_10 0x00000020 /* SDRAM external bank column address width = 9 bits */ |
| 1149 | #define EBCAW_11 0x00000030 /* SDRAM external bank column address width = 9 bits */ |
| 1150 | |
| 1151 | /* EBIU_SDSTAT Masks */ |
| 1152 | #define SDCI 0x00000001 /* SDRAM controller is idle */ |
| 1153 | #define SDSRA 0x00000002 /* SDRAM SDRAM self refresh is active */ |
| 1154 | #define SDPUA 0x00000004 /* SDRAM power up active */ |
| 1155 | #define SDRS 0x00000008 /* SDRAM is in reset state */ |
| 1156 | #define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */ |
| 1157 | #define BGSTAT 0x00000020 /* Bus granted */ |
| 1158 | |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 1159 | #endif /* _DEF_BF532_H */ |