Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1 | /* |
| 2 | * MPC8349 Internal Memory Map |
| 3 | * Copyright (c) 2004 Freescale Semiconductor. |
| 4 | * Eran Liberty (liberty@freescale.com) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 5 | * |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 6 | * based on: |
| 7 | * - MPC8260 Internal Memory Map |
| 8 | * Copyright (c) 1999 Dan Malek (dmalek@jlc.net) |
| 9 | * - MPC85xx Internal Memory Map |
| 10 | * Copyright(c) 2002,2003 Motorola Inc. |
| 11 | * Xianghua Xiao (x.xiao@motorola.com) |
| 12 | */ |
| 13 | #ifndef __IMMAP_8349__ |
| 14 | #define __IMMAP_8349__ |
| 15 | |
| 16 | #include <asm/types.h> |
| 17 | #include <asm/i2c.h> |
| 18 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 19 | /* |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 20 | * Local Access Window. |
| 21 | */ |
| 22 | typedef struct law8349 { |
| 23 | u32 bar; /* LBIU local access window base address register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 24 | /* Identifies the 20 most-significant address bits of the base of local |
| 25 | * access window n. The specified base address should be aligned to the |
| 26 | * window size, as defined by LBLAWARn[SIZE]. |
| 27 | */ |
| 28 | #define LAWBAR_BAR 0xFFFFF000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 29 | #define LAWBAR_RES ~(LAWBAR_BAR) |
| 30 | u32 ar; /* LBIU local access window attribute register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 31 | } law8349_t; |
| 32 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 33 | /* |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 34 | * System configuration registers. |
| 35 | */ |
| 36 | typedef struct sysconf8349 { |
| 37 | u32 immrbar; /* Internal memory map base address register */ |
| 38 | u8 res0[0x04]; |
| 39 | u32 altcbar; /* Alternate configuration base address register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 40 | /* Identifies the12 most significant address bits of an alternate base |
| 41 | * address used for boot sequencer configuration accesses. |
| 42 | */ |
| 43 | #define ALTCBAR_BASE_ADDR 0xFFF00000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 44 | #define ALTCBAR_RES ~(ALTCBAR_BASE_ADDR) /* Reserved. Write has no effect, read returns 0. */ |
| 45 | u8 res1[0x14]; |
| 46 | law8349_t lblaw[4]; /* LBIU local access window */ |
| 47 | u8 res2[0x20]; |
| 48 | law8349_t pcilaw[2]; /* PCI local access window */ |
| 49 | u8 res3[0x30]; |
| 50 | law8349_t ddrlaw[2]; /* DDR local access window */ |
| 51 | u8 res4[0x50]; |
| 52 | u32 sgprl; /* System General Purpose Register Low */ |
| 53 | u32 sgprh; /* System General Purpose Register High */ |
| 54 | u32 spridr; /* System Part and Revision ID Register */ |
| 55 | #define SPRIDR_PARTID 0xFFFF0000 /* Part Identification. */ |
| 56 | #define SPRIDR_REVID 0x0000FFFF /* Revision Identification. */ |
| 57 | u8 res5[0x04]; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 58 | u32 spcr; /* System Priority Configuration Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 59 | #define SPCR_PCIHPE 0x10000000 /* PCI Highest Priority Enable. */ |
| 60 | #define SPCR_PCIPR 0x03000000 /* PCI bridge system bus request priority. */ |
| 61 | #define SPCR_TBEN 0x00400000 /* E300 PowerPC core time base unit enable. */ |
| 62 | #define SPCR_COREPR 0x00300000 /* E300 PowerPC Core system bus request priority. */ |
| 63 | #define SPCR_TSEC1DP 0x00003000 /* TSEC1 data priority. */ |
| 64 | #define SPCR_TSEC1BDP 0x00000C00 /* TSEC1 buffer descriptor priority. */ |
| 65 | #define SPCR_TSEC1EP 0x00000300 /* TSEC1 emergency priority. */ |
| 66 | #define SPCR_TSEC2DP 0x00000030 /* TSEC2 data priority. */ |
| 67 | #define SPCR_TSEC2BDP 0x0000000C /* TSEC2 buffer descriptor priority. */ |
| 68 | #define SPCR_TSEC2EP 0x00000003 /* TSEC2 emergency priority. */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 69 | #define SPCR_RES ~(SPCR_PCIHPE | SPCR_PCIPR | SPCR_TBEN | SPCR_COREPR \ |
| 70 | | SPCR_TSEC1DP | SPCR_TSEC1BDP | SPCR_TSEC1EP \ |
| 71 | | SPCR_TSEC2DP | SPCR_TSEC2BDP | SPCR_TSEC2EP) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 72 | u32 sicrl; /* System General Purpose Register Low */ |
| 73 | #define SICRL_LDP_A 0x80000000 |
Kumar Gala | 8245516 | 2006-01-23 16:22:57 -0600 | [diff] [blame] | 74 | #define SICRL_USB1 0x40000000 |
| 75 | #define SICRL_USB0 0x20000000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 76 | #define SICRL_UART 0x0C000000 |
| 77 | #define SICRL_GPIO1_A 0x02000000 |
| 78 | #define SICRL_GPIO1_B 0x01000000 |
| 79 | #define SICRL_GPIO1_C 0x00800000 |
| 80 | #define SICRL_GPIO1_D 0x00400000 |
| 81 | #define SICRL_GPIO1_E 0x00200000 |
| 82 | #define SICRL_GPIO1_F 0x00180000 |
| 83 | #define SICRL_GPIO1_G 0x00040000 |
| 84 | #define SICRL_GPIO1_H 0x00020000 |
| 85 | #define SICRL_GPIO1_I 0x00010000 |
| 86 | #define SICRL_GPIO1_J 0x00008000 |
| 87 | #define SICRL_GPIO1_K 0x00004000 |
| 88 | #define SICRL_GPIO1_L 0x00003000 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 89 | #define SICRL_RES ~(SICRL_LDP_A | SICRL_USB0 | SICRL_USB1 | SICRL_UART \ |
| 90 | | SICRL_GPIO1_A | SICRL_GPIO1_B | SICRL_GPIO1_C \ |
| 91 | | SICRL_GPIO1_D | SICRL_GPIO1_E | SICRL_GPIO1_F \ |
| 92 | | SICRL_GPIO1_G | SICRL_GPIO1_H | SICRL_GPIO1_I \ |
| 93 | | SICRL_GPIO1_J | SICRL_GPIO1_K | SICRL_GPIO1_L ) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 94 | u32 sicrh; /* System General Purpose Register High */ |
| 95 | #define SICRH_DDR 0x80000000 |
| 96 | #define SICRH_TSEC1_A 0x10000000 |
| 97 | #define SICRH_TSEC1_B 0x08000000 |
| 98 | #define SICRH_TSEC1_C 0x04000000 |
| 99 | #define SICRH_TSEC1_D 0x02000000 |
| 100 | #define SICRH_TSEC1_E 0x01000000 |
| 101 | #define SICRH_TSEC1_F 0x00800000 |
| 102 | #define SICRH_TSEC2_A 0x00400000 |
| 103 | #define SICRH_TSEC2_B 0x00200000 |
| 104 | #define SICRH_TSEC2_C 0x00100000 |
| 105 | #define SICRH_TSEC2_D 0x00080000 |
| 106 | #define SICRH_TSEC2_E 0x00040000 |
| 107 | #define SICRH_TSEC2_F 0x00020000 |
| 108 | #define SICRH_TSEC2_G 0x00010000 |
| 109 | #define SICRH_TSEC2_H 0x00008000 |
| 110 | #define SICRH_GPIO2_A 0x00004000 |
| 111 | #define SICRH_GPIO2_B 0x00002000 |
| 112 | #define SICRH_GPIO2_C 0x00001000 |
| 113 | #define SICRH_GPIO2_D 0x00000800 |
| 114 | #define SICRH_GPIO2_E 0x00000400 |
| 115 | #define SICRH_GPIO2_F 0x00000200 |
| 116 | #define SICRH_GPIO2_G 0x00000180 |
| 117 | #define SICRH_GPIO2_H 0x00000060 |
| 118 | #define SICRH_TSOBI1 0x00000002 |
| 119 | #define SICRH_TSOBI2 0x00000001 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 120 | #define SICRh_RES ~( SICRH_DDR | SICRH_TSEC1_A | SICRH_TSEC1_B \ |
| 121 | | SICRH_TSEC1_C | SICRH_TSEC1_D | SICRH_TSEC1_E \ |
| 122 | | SICRH_TSEC1_F | SICRH_TSEC2_A | SICRH_TSEC2_B \ |
| 123 | | SICRH_TSEC2_C | SICRH_TSEC2_D | SICRH_TSEC2_E \ |
| 124 | | SICRH_TSEC2_F | SICRH_TSEC2_G | SICRH_TSEC2_H \ |
| 125 | | SICRH_GPIO2_A | SICRH_GPIO2_B | SICRH_GPIO2_C \ |
| 126 | | SICRH_GPIO2_D | SICRH_GPIO2_E | SICRH_GPIO2_F \ |
| 127 | | SICRH_GPIO2_G | SICRH_GPIO2_H | SICRH_TSOBI1 \ |
| 128 | | SICRH_TSOBI2) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 129 | u8 res6[0xE4]; |
| 130 | } sysconf8349_t; |
| 131 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 132 | /* |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 133 | * Watch Dog Timer (WDT) Registers |
| 134 | */ |
| 135 | typedef struct wdt8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 136 | u8 res0[4]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 137 | u32 swcrr; /* System watchdog control register */ |
| 138 | u32 swcnr; /* System watchdog count register */ |
| 139 | #define SWCNR_SWCN 0x0000FFFF Software Watchdog Count Field. |
| 140 | #define SWCNR_RES ~(SWCNR_SWCN) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 141 | u8 res1[2]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 142 | u16 swsrr; /* System watchdog service register */ |
| 143 | u8 res2[0xF0]; |
| 144 | } wdt8349_t; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 145 | |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 146 | /* |
| 147 | * RTC/PIT Module Registers |
| 148 | */ |
| 149 | typedef struct rtclk8349 { |
| 150 | u32 cnr; /* control register */ |
| 151 | #define CNR_CLEN 0x00000080 /* Clock Enable Control Bit */ |
| 152 | #define CNR_CLIN 0x00000040 /* Input Clock Control Bit */ |
| 153 | #define CNR_AIM 0x00000002 /* Alarm Interrupt Mask Bit */ |
| 154 | #define CNR_SIM 0x00000001 /* Second Interrupt Mask Bit */ |
| 155 | #define CNR_RES ~(CNR_CLEN | CNR_CLIN | CNR_AIM | CNR_SIM) |
| 156 | u32 ldr; /* load register */ |
| 157 | u32 psr; /* prescale register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 158 | u32 ctr; /* register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 159 | u32 evr; /* event register */ |
| 160 | #define RTEVR_SIF 0x00000001 /* Second Interrupt Flag Bit */ |
| 161 | #define RTEVR_AIF 0x00000002 /* Alarm Interrupt Flag Bit */ |
| 162 | #define RTEVR_RES ~(EVR_SIF | EVR_AIF) |
| 163 | u32 alr; /* alarm register */ |
| 164 | u8 res0[0xE8]; |
| 165 | } rtclk8349_t; |
| 166 | |
| 167 | /* |
| 168 | * Global timper module |
| 169 | */ |
| 170 | |
| 171 | typedef struct gtm8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 172 | u8 cfr1; /* Timer1/2 Configuration */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 173 | #define CFR1_PCAS 0x80 /* Pair Cascade mode */ |
| 174 | #define CFR1_BCM 0x40 /* Backward compatible mode */ |
| 175 | #define CFR1_STP2 0x20 /* Stop timer */ |
| 176 | #define CFR1_RST2 0x10 /* Reset timer */ |
| 177 | #define CFR1_GM2 0x08 /* Gate mode for pin 2 */ |
| 178 | #define CFR1_GM1 0x04 /* Gate mode for pin 1 */ |
| 179 | #define CFR1_STP1 0x02 /* Stop timer */ |
| 180 | #define CFR1_RST1 0x01 /* Reset timer */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 181 | u8 res0[3]; |
| 182 | u8 cfr2; /* Timer3/4 Configuration */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 183 | #define CFR2_PCAS 0x80 /* Pair Cascade mode */ |
| 184 | #define CFR2_SCAS 0x40 /* Super Cascade mode */ |
| 185 | #define CFR2_STP4 0x20 /* Stop timer */ |
| 186 | #define CFR2_RST4 0x10 /* Reset timer */ |
| 187 | #define CFR2_GM4 0x08 /* Gate mode for pin 4 */ |
| 188 | #define CFR2_GM3 0x04 /* Gate mode for pin 3 */ |
| 189 | #define CFR2_STP3 0x02 /* Stop timer */ |
| 190 | #define CFR2_RST3 0x01 /* Reset timer */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 191 | u8 res1[10]; |
| 192 | u16 mdr1; /* Timer1 Mode Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 193 | #define MDR_SPS 0xff00 /* Secondary Prescaler value */ |
| 194 | #define MDR_CE 0x00c0 /* Capture edge and enable interrupt */ |
| 195 | #define MDR_OM 0x0020 /* Output mode */ |
| 196 | #define MDR_ORI 0x0010 /* Output reference interrupt enable */ |
| 197 | #define MDR_FRR 0x0008 /* Free run/restart */ |
| 198 | #define MDR_ICLK 0x0006 /* Input clock source for the timer */ |
| 199 | #define MDR_GE 0x0001 /* Gate enable */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 200 | u16 mdr2; /* Timer2 Mode Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 201 | u16 rfr1; /* Timer1 Reference Register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 202 | u16 rfr2; /* Timer2 Reference Register */ |
| 203 | u16 cpr1; /* Timer1 Capture Register */ |
| 204 | u16 cpr2; /* Timer2 Capture Register */ |
| 205 | u16 cnr1; /* Timer1 Counter Register */ |
| 206 | u16 cnr2; /* Timer2 Counter Register */ |
| 207 | u16 mdr3; /* Timer3 Mode Register */ |
| 208 | u16 mdr4; /* Timer4 Mode Register */ |
| 209 | u16 rfr3; /* Timer3 Reference Register */ |
| 210 | u16 rfr4; /* Timer4 Reference Register */ |
| 211 | u16 cpr3; /* Timer3 Capture Register */ |
| 212 | u16 cpr4; /* Timer4 Capture Register */ |
| 213 | u16 cnr3; /* Timer3 Counter Register */ |
| 214 | u16 cnr4; /* Timer4 Counter Register */ |
| 215 | u16 evr1; /* Timer1 Event Register */ |
| 216 | u16 evr2; /* Timer2 Event Register */ |
| 217 | u16 evr3; /* Timer3 Event Register */ |
| 218 | u16 evr4; /* Timer4 Event Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 219 | #define GTEVR_REF 0x0002 /* Output reference event */ |
| 220 | #define GTEVR_CAP 0x0001 /* Counter Capture event */ |
| 221 | #define GTEVR_RES ~(EVR_CAP|EVR_REF) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 222 | u16 psr1; /* Timer1 Prescaler Register */ |
| 223 | u16 psr2; /* Timer2 Prescaler Register */ |
| 224 | u16 psr3; /* Timer3 Prescaler Register */ |
| 225 | u16 psr4; /* Timer4 Prescaler Register */ |
| 226 | u8 res[0xC0]; |
| 227 | } gtm8349_t; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 228 | |
| 229 | /* |
| 230 | * Integrated Programmable Interrupt Controller |
| 231 | */ |
| 232 | typedef struct ipic8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 233 | u32 sicfr; /* System Global Interrupt Configuration Register (SICFR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 234 | #define SICFR_HPI 0x7f000000 /* Highest Priority Interrupt */ |
| 235 | #define SICFR_MPSB 0x00400000 /* Mixed interrupts Priority Scheme for group B */ |
| 236 | #define SICFR_MPSA 0x00200000 /* Mixed interrupts Priority Scheme for group A */ |
| 237 | #define SICFR_IPSD 0x00080000 /* Internal interrupts Priority Scheme for group D */ |
| 238 | #define SICFR_IPSA 0x00010000 /* Internal interrupts Priority Scheme for group A */ |
| 239 | #define SICFR_HPIT 0x00000300 /* HPI priority position IPIC output interrupt Type */ |
| 240 | #define SICFR_RES ~(SICFR_HPI|SICFR_MPSB|SICFR_MPSA|SICFR_IPSD|SICFR_IPSA|SICFR_HPIT) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 241 | u32 sivcr; /* System Global Interrupt Vector Register (SIVCR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 242 | #define SICVR_IVECX 0xfc000000 /* Interrupt vector (for CE compatibility purpose only not used in 8349 IPIC implementation) */ |
| 243 | #define SICVR_IVEC 0x0000007f /* Interrupt vector */ |
| 244 | #define SICVR_RES ~(SICVR_IVECX|SICVR_IVEC) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 245 | u32 sipnr_h; /* System Internal Interrupt Pending Register - High (SIPNR_H) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 246 | #define SIIH_TSEC1TX 0x80000000 /* TSEC1 Tx interrupt */ |
| 247 | #define SIIH_TSEC1RX 0x40000000 /* TSEC1 Rx interrupt */ |
| 248 | #define SIIH_TSEC1ER 0x20000000 /* TSEC1 Eror interrupt */ |
| 249 | #define SIIH_TSEC2TX 0x10000000 /* TSEC2 Tx interrupt */ |
| 250 | #define SIIH_TSEC2RX 0x08000000 /* TSEC2 Rx interrupt */ |
| 251 | #define SIIH_TSEC2ER 0x04000000 /* TSEC2 Eror interrupt */ |
| 252 | #define SIIH_USB2DR 0x02000000 /* USB2 DR interrupt */ |
| 253 | #define SIIH_USB2MPH 0x01000000 /* USB2 MPH interrupt */ |
| 254 | #define SIIH_UART1 0x00000080 /* UART1 interrupt */ |
| 255 | #define SIIH_UART2 0x00000040 /* UART2 interrupt */ |
| 256 | #define SIIH_SEC 0x00000020 /* SEC interrupt */ |
| 257 | #define SIIH_I2C1 0x00000004 /* I2C1 interrupt */ |
| 258 | #define SIIH_I2C2 0x00000002 /* I2C1 interrupt */ |
| 259 | #define SIIH_SPI 0x00000001 /* SPI interrupt */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 260 | #define SIIH_RES ~(SIIH_TSEC1TX | SIIH_TSEC1RX | SIIH_TSEC1ER \ |
| 261 | | SIIH_TSEC2TX | SIIH_TSEC2RX | SIIH_TSEC2ER \ |
| 262 | | SIIH_USB2DR | SIIH_USB2MPH | SIIH_UART1 \ |
| 263 | | SIIH_UART2 | SIIH_SEC | SIIH_I2C1 \ |
| 264 | | SIIH_I2C2 | SIIH_SPI) |
| 265 | u32 sipnr_l; /* System Internal Interrupt Pending Register - Low (SIPNR_L) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 266 | #define SIIL_RTCS 0x80000000 /* RTC SECOND interrupt */ |
| 267 | #define SIIL_PIT 0x40000000 /* PIT interrupt */ |
| 268 | #define SIIL_PCI1 0x20000000 /* PCI1 interrupt */ |
| 269 | #define SIIL_PCI2 0x10000000 /* PCI2 interrupt */ |
| 270 | #define SIIL_RTCA 0x08000000 /* RTC ALARM interrupt */ |
| 271 | #define SIIL_MU 0x04000000 /* Message Unit interrupt */ |
| 272 | #define SIIL_SBA 0x02000000 /* System Bus Arbiter interrupt */ |
| 273 | #define SIIL_DMA 0x01000000 /* DMA interrupt */ |
| 274 | #define SIIL_GTM4 0x00800000 /* GTM4 interrupt */ |
| 275 | #define SIIL_GTM8 0x00400000 /* GTM8 interrupt */ |
| 276 | #define SIIL_GPIO1 0x00200000 /* GPIO1 interrupt */ |
| 277 | #define SIIL_GPIO2 0x00100000 /* GPIO2 interrupt */ |
| 278 | #define SIIL_DDR 0x00080000 /* DDR interrupt */ |
| 279 | #define SIIL_LBC 0x00040000 /* LBC interrupt */ |
| 280 | #define SIIL_GTM2 0x00020000 /* GTM2 interrupt */ |
| 281 | #define SIIL_GTM6 0x00010000 /* GTM6 interrupt */ |
| 282 | #define SIIL_PMC 0x00008000 /* PMC interrupt */ |
| 283 | #define SIIL_GTM3 0x00000800 /* GTM3 interrupt */ |
| 284 | #define SIIL_GTM7 0x00000400 /* GTM7 interrupt */ |
| 285 | #define SIIL_GTM1 0x00000020 /* GTM1 interrupt */ |
| 286 | #define SIIL_GTM5 0x00000010 /* GTM5 interrupt */ |
| 287 | #define SIIL_DPTC 0x00000001 /* DPTC interrupt (!!! Invisible for user !!!) */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 288 | #define SIIL_RES ~(SIIL_RTCS | SIIL_PIT | SIIL_PCI1 | SIIL_PCI2 \ |
| 289 | | SIIL_RTCA | SIIL_MU | SIIL_SBA | SIIL_DMA \ |
| 290 | | SIIL_GTM4 | SIIL_GTM8 | SIIL_GPIO1 | SIIL_GPIO2 \ |
| 291 | | SIIL_DDR | SIIL_LBC | SIIL_GTM2 | SIIL_GTM6 \ |
| 292 | | SIIL_PMC |SIIL_GTM3 | SIIL_GTM7 | SIIL_GTM1 \ |
| 293 | | SIIL_GTM5 |SIIL_DPTC ) |
| 294 | u32 siprr_a; /* System Internal Interrupt Group A Priority Register (PRR) */ |
| 295 | u8 res0[8]; |
| 296 | u32 siprr_d; /* System Internal Interrupt Group D Priority Register (PRR) */ |
| 297 | u32 simsr_h; /* System Internal Interrupt Mask Register - High (SIIH) */ |
| 298 | u32 simsr_l; /* System Internal Interrupt Mask Register - Low (SIIL) */ |
| 299 | u8 res1[4]; |
| 300 | u32 sepnr; /* System External Interrupt Pending Register (SEI) */ |
| 301 | u32 smprr_a; /* System Mixed Interrupt Group A Priority Register (PRR) */ |
| 302 | u32 smprr_b; /* System Mixed Interrupt Group B Priority Register (PRR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 303 | #define PRR_0 0xe0000000 /* Priority Register, Position 0 programming */ |
| 304 | #define PRR_1 0x1c000000 /* Priority Register, Position 1 programming */ |
| 305 | #define PRR_2 0x03800000 /* Priority Register, Position 2 programming */ |
| 306 | #define PRR_3 0x00700000 /* Priority Register, Position 3 programming */ |
| 307 | #define PRR_4 0x0000e000 /* Priority Register, Position 4 programming */ |
| 308 | #define PRR_5 0x00001c00 /* Priority Register, Position 5 programming */ |
| 309 | #define PRR_6 0x00000380 /* Priority Register, Position 6 programming */ |
| 310 | #define PRR_7 0x00000070 /* Priority Register, Position 7 programming */ |
| 311 | #define PRR_RES ~(PRR_0|PRR_1|PRR_2|PRR_3|PRR_4|PRR_5|PRR_6|PRR_7) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 312 | u32 semsr; /* System External Interrupt Mask Register (SEI) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 313 | #define SEI_IRQ0 0x80000000 /* IRQ0 external interrupt */ |
| 314 | #define SEI_IRQ1 0x40000000 /* IRQ1 external interrupt */ |
| 315 | #define SEI_IRQ2 0x20000000 /* IRQ2 external interrupt */ |
| 316 | #define SEI_IRQ3 0x10000000 /* IRQ3 external interrupt */ |
| 317 | #define SEI_IRQ4 0x08000000 /* IRQ4 external interrupt */ |
| 318 | #define SEI_IRQ5 0x04000000 /* IRQ5 external interrupt */ |
| 319 | #define SEI_IRQ6 0x02000000 /* IRQ6 external interrupt */ |
| 320 | #define SEI_IRQ7 0x01000000 /* IRQ7 external interrupt */ |
| 321 | #define SEI_SIRQ0 0x00008000 /* SIRQ0 external interrupt */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 322 | #define SEI_RES ~( SEI_IRQ0 | SEI_IRQ1 | SEI_IRQ2 | SEI_IRQ3 \ |
| 323 | | SEI_IRQ4 | SEI_IRQ5 | SEI_IRQ6 | SEI_IRQ7 \ |
| 324 | | SEI_SIRQ0) |
| 325 | u32 secnr; /* System External Interrupt Control Register (SECNR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 326 | #define SECNR_MIXB0T 0xc0000000 /* MIXB0 priority position IPIC output interrupt type */ |
| 327 | #define SECNR_MIXB1T 0x30000000 /* MIXB1 priority position IPIC output interrupt type */ |
| 328 | #define SECNR_MIXA0T 0x00c00000 /* MIXA0 priority position IPIC output interrupt type */ |
| 329 | #define SECNR_SYSA1T 0x00300000 /* MIXA1 priority position IPIC output interrupt type */ |
| 330 | #define SECNR_EDI0 0x00008000 /* IRQ0 external interrupt edge/level detect */ |
| 331 | #define SECNR_EDI1 0x00004000 /* IRQ1 external interrupt edge/level detect */ |
| 332 | #define SECNR_EDI2 0x00002000 /* IRQ2 external interrupt edge/level detect */ |
| 333 | #define SECNR_EDI3 0x00001000 /* IRQ3 external interrupt edge/level detect */ |
| 334 | #define SECNR_EDI4 0x00000800 /* IRQ4 external interrupt edge/level detect */ |
| 335 | #define SECNR_EDI5 0x00000400 /* IRQ5 external interrupt edge/level detect */ |
| 336 | #define SECNR_EDI6 0x00000200 /* IRQ6 external interrupt edge/level detect */ |
| 337 | #define SECNR_EDI7 0x00000100 /* IRQ7 external interrupt edge/level detect */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 338 | #define SECNR_RES ~( SECNR_MIXB0T | SECNR_MIXB1T | SECNR_MIXA0T \ |
| 339 | | SECNR_SYSA1T | SECNR_EDI0 | SECNR_EDI1 \ |
| 340 | | SECNR_EDI2 | SECNR_EDI3 | SECNR_EDI4 \ |
| 341 | | SECNR_EDI5 | SECNR_EDI6 | SECNR_EDI7) |
| 342 | u32 sersr; /* System Error Status Register (SERR) */ |
| 343 | u32 sermr; /* System Error Mask Register (SERR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 344 | #define SERR_IRQ0 0x80000000 /* IRQ0 MCP request */ |
| 345 | #define SERR_WDT 0x40000000 /* WDT MCP request */ |
| 346 | #define SERR_SBA 0x20000000 /* SBA MCP request */ |
| 347 | #define SERR_DDR 0x10000000 /* DDR MCP request */ |
| 348 | #define SERR_LBC 0x08000000 /* LBC MCP request */ |
| 349 | #define SERR_PCI1 0x04000000 /* PCI1 MCP request */ |
| 350 | #define SERR_PCI2 0x02000000 /* PCI2 MCP request */ |
| 351 | #define SERR_MU 0x01000000 /* MU MCP request */ |
| 352 | #define SERR_RNC 0x00010000 /* MU MCP request (!!! Non-visible for users !!!) */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 353 | #define SERR_RES ~( SERR_IRQ0 | SERR_WDT | SERR_SBA | SERR_DDR \ |
| 354 | |SERR_LBC | SERR_PCI1 | SERR_PCI2 | SERR_MU \ |
| 355 | |SERR_RNC ) |
| 356 | u32 sercr; /* System Error Control Register (SERCR) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 357 | #define SERCR_MCPR 0x00000001 /* MCP Route */ |
| 358 | #define SERCR_RES ~(SERCR_MCPR) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 359 | u8 res2[4]; |
| 360 | u32 sifcr_h; /* System Internal Interrupt Force Register - High (SIIH) */ |
| 361 | u32 sifcr_l; /* System Internal Interrupt Force Register - Low (SIIL) */ |
| 362 | u32 sefcr; /* System External Interrupt Force Register (SEI) */ |
| 363 | u32 serfr; /* System Error Force Register (SERR) */ |
| 364 | u8 res3[0xA0]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 365 | } ipic8349_t; |
| 366 | |
| 367 | /* |
| 368 | * System Arbiter Registers |
| 369 | */ |
| 370 | typedef struct arbiter8349 { |
| 371 | u32 acr; /* Arbiter Configuration Register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 372 | #define ACR_COREDIS 0x10000000 /* Core disable. */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 373 | #define ACR_PIPE_DEP 0x00070000 /* Pipeline depth (number of outstanding transactions). */ |
| 374 | #define ACR_PCI_RPTCNT 0x00007000 /* PCI repeat count. */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 375 | #define ACR_RPTCNT 0x00000700 /* Repeat count. */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 376 | #define ACR_APARK 0x00000030 /* Address parking. */ |
| 377 | #define ACR_PARKM 0x0000000F /* Parking master. */ |
| 378 | #define ACR_RES ~(ACR_COREDIS|ACR_PIPE_DEP|ACR_PCI_RPTCNT|ACR_RPTCNT|ACR_APARK|ACR_PARKM) |
| 379 | u32 atr; /* Arbiter Timers Register */ |
| 380 | #define ATR_DTO 0x00FF0000 /* Data time out. */ |
| 381 | #define ATR_ATO 0x000000FF /* Address time out. */ |
| 382 | #define ATR_RES ~(ATR_DTO|ATR_ATO) |
| 383 | u8 res[4]; |
| 384 | u32 aer; /* Arbiter Event Register (AE)*/ |
| 385 | u32 aidr; /* Arbiter Interrupt Definition Register (AE) */ |
| 386 | u32 amr; /* Arbiter Mask Register (AE) */ |
| 387 | u32 aeatr; /* Arbiter Event Attributes Register */ |
| 388 | #define AEATR_EVENT 0x07000000 /* Event type. */ |
| 389 | #define AEATR_MSTR_ID 0x001F0000 /* Master Id. */ |
| 390 | #define AEATR_TBST 0x00000800 /* Transfer burst. */ |
| 391 | #define AEATR_TSIZE 0x00000700 /* Transfer Size. */ |
| 392 | #define AEATR_TTYPE 0x0000001F /* Transfer Type. */ |
| 393 | #define AEATR_RES ~(AEATR_EVENT|AEATR_MSTR_ID|AEATR_TBST|AEATR_TSIZE|AEATR_TTYPE) |
| 394 | u32 aeadr; /* Arbiter Event Address Register */ |
| 395 | u32 aerr; /* Arbiter Event Response Register (AE)*/ |
| 396 | #define AE_ETEA 0x00000020 /* Transfer error. */ |
| 397 | #define AE_RES_ 0x00000010 /* Reserved transfer type. */ |
| 398 | #define AE_ECW 0x00000008 /* External control word transfer type. */ |
| 399 | #define AE_AO 0x00000004 /* Address Only transfer type. */ |
| 400 | #define AE_DTO 0x00000002 /* Data time out. */ |
| 401 | #define AE_ATO 0x00000001 /* Address time out. */ |
| 402 | #define AE_RSRV ~(AE_ETEA|AE_RES_|AE_ECW|AE_AO|AE_DTO|AE_ATO) |
| 403 | u8 res1[0xDC]; |
| 404 | } arbiter8349_t; |
| 405 | |
| 406 | /* |
| 407 | * Reset Module |
| 408 | */ |
| 409 | typedef struct reset8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 410 | u32 rcwl; /* RCWL Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 411 | #define RCWL_LBIUCM 0x80000000 /* LBIUCM */ |
| 412 | #define RCWL_LBIUCM_SHIFT 31 |
| 413 | #define RCWL_DDRCM 0x40000000 /* DDRCM */ |
| 414 | #define RCWL_DDRCM_SHIFT 30 |
| 415 | #define RCWL_SVCOD 0x30000000 /* SVCOD */ |
| 416 | #define RCWL_SPMF 0x0f000000 /* SPMF */ |
| 417 | #define RCWL_SPMF_SHIFT 24 |
| 418 | #define RCWL_COREPLL 0x007F0000 /* COREPLL */ |
| 419 | #define RCWL_COREPLL_SHIFT 16 |
| 420 | #define RCWL_CEVCOD 0x000000C0 /* CEVCOD */ |
| 421 | #define RCWL_CEPDF 0x00000020 /* CEPDF */ |
| 422 | #define RCWL_CEPMF 0x0000001F /* CEPMF */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 423 | #define RCWL_RES ~(RCWL_BIUCM|RCWL_DDRCM|RCWL_SVCOD|RCWL_SPMF|RCWL_COREPLL|RCWL_CEVCOD|RCWL_CEPDF|RCWL_CEPMF) |
| 424 | u32 rcwh; /* RCHL Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 425 | #define RCWH_PCIHOST 0x80000000 /* PCIHOST */ |
| 426 | #define RCWH_PCIHOST_SHIFT 31 |
| 427 | #define RCWH_PCI64 0x40000000 /* PCI64 */ |
| 428 | #define RCWH_PCI1ARB 0x20000000 /* PCI1ARB */ |
| 429 | #define RCWH_PCI2ARB 0x10000000 /* PCI2ARB */ |
| 430 | #define RCWH_COREDIS 0x08000000 /* COREDIS */ |
| 431 | #define RCWH_BMS 0x04000000 /* BMS */ |
| 432 | #define RCWH_BOOTSEQ 0x03000000 /* BOOTSEQ */ |
| 433 | #define RCWH_SWEN 0x00800000 /* SWEN */ |
| 434 | #define RCWH_ROMLOC 0x00700000 /* ROMLOC */ |
| 435 | #define RCWH_TSEC1M 0x0000c000 /* TSEC1M */ |
| 436 | #define RCWH_TSEC2M 0x00003000 /* TSEC2M */ |
| 437 | #define RCWH_TPR 0x00000100 /* TPR */ |
| 438 | #define RCWH_TLE 0x00000008 /* TLE */ |
| 439 | #define RCWH_LALE 0x00000004 /* LALE */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 440 | #define RCWH_RES ~(RCWH_PCIHOST | RCWH_PCI64 | RCWH_PCI1ARB \ |
| 441 | | RCWH_PCI2ARB | RCWH_COREDIS | RCWH_BMS \ |
| 442 | | RCWH_BOOTSEQ | RCWH_SWEN | RCWH_ROMLOC \ |
| 443 | | RCWH_TSEC1M | RCWH_TSEC2M | RCWH_TPR \ |
| 444 | | RCWH_TLE | RCWH_LALE) |
| 445 | u8 res0[8]; |
| 446 | u32 rsr; /* Reset status Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 447 | #define RSR_RSTSRC 0xE0000000 /* Reset source */ |
| 448 | #define RSR_RSTSRC_SHIFT 29 |
| 449 | #define RSR_BSF 0x00010000 /* Boot seq. fail */ |
| 450 | #define RSR_BSF_SHIFT 16 |
| 451 | #define RSR_SWSR 0x00002000 /* software soft reset */ |
| 452 | #define RSR_SWSR_SHIFT 13 |
| 453 | #define RSR_SWHR 0x00001000 /* software hard reset */ |
| 454 | #define RSR_SWHR_SHIFT 12 |
| 455 | #define RSR_JHRS 0x00000200 /* jtag hreset */ |
| 456 | #define RSR_JHRS_SHIFT 9 |
| 457 | #define RSR_JSRS 0x00000100 /* jtag sreset status */ |
| 458 | #define RSR_JSRS_SHIFT 8 |
| 459 | #define RSR_CSHR 0x00000010 /* checkstop reset status */ |
| 460 | #define RSR_CSHR_SHIFT 4 |
| 461 | #define RSR_SWRS 0x00000008 /* software watchdog reset status */ |
| 462 | #define RSR_SWRS_SHIFT 3 |
| 463 | #define RSR_BMRS 0x00000004 /* bus monitop reset status */ |
| 464 | #define RSR_BMRS_SHIFT 2 |
| 465 | #define RSR_SRS 0x00000002 /* soft reset status */ |
| 466 | #define RSR_SRS_SHIFT 1 |
| 467 | #define RSR_HRS 0x00000001 /* hard reset status */ |
| 468 | #define RSR_HRS_SHIFT 0 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 469 | #define RSR_RES ~(RSR_RSTSRC | RSR_BSF | RSR_SWSR | RSR_SWHR | RSR_JHRS | RSR_JSRS | RSR_CSHR | RSR_SWRS | RSR_BMRS | RSR_SRS | RSR_HRS) |
| 470 | u32 rmr; /* Reset mode Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 471 | #define RMR_CSRE 0x00000001 /* checkstop reset enable */ |
| 472 | #define RMR_CSRE_SHIFT 0 |
| 473 | #define RMR_RES ~(RMR_CSRE) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 474 | u32 rpr; /* Reset protection Register */ |
| 475 | u32 rcr; /* Reset Control Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 476 | #define RCR_SWHR 0x00000002 /* software hard reset */ |
| 477 | #define RCR_SWSR 0x00000001 /* software soft reset */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 478 | #define RCR_RES ~(RCR_SWHR | RCR_SWSR) |
| 479 | u32 rcer; /* Reset Control Enable Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 480 | #define RCER_CRE 0x00000001 /* software hard reset */ |
| 481 | #define RCER_RES ~(RCER_CRE) |
| 482 | u8 res1[0xDC]; |
| 483 | } reset8349_t; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 484 | |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 485 | typedef struct clk8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 486 | u32 spmr; /* system PLL mode Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 487 | #define SPMR_LBIUCM 0x80000000 /* LBIUCM */ |
| 488 | #define SPMR_DDRCM 0x40000000 /* DDRCM */ |
| 489 | #define SPMR_SVCOD 0x30000000 /* SVCOD */ |
| 490 | #define SPMR_SPMF 0x0F000000 /* SPMF */ |
| 491 | #define SPMR_CKID 0x00800000 /* CKID */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 492 | #define SPMR_CKID_SHIFT 23 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 493 | #define SPMR_COREPLL 0x007F0000 /* COREPLL */ |
| 494 | #define SPMR_CEVCOD 0x000000C0 /* CEVCOD */ |
| 495 | #define SPMR_CEPDF 0x00000020 /* CEPDF */ |
| 496 | #define SPMR_CEPMF 0x0000001F /* CEPMF */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 497 | #define SPMR_RES ~(SPMR_LBIUCM | SPMR_DDRCM | SPMR_SVCOD \ |
| 498 | | SPMR_SPMF | SPMR_CKID | SPMR_COREPLL \ |
| 499 | | SPMR_CEVCOD | SPMR_CEPDF | SPMR_CEPMF) |
| 500 | u32 occr; /* output clock control Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 501 | #define OCCR_PCICOE0 0x80000000 /* PCICOE0 */ |
| 502 | #define OCCR_PCICOE1 0x40000000 /* PCICOE1 */ |
| 503 | #define OCCR_PCICOE2 0x20000000 /* PCICOE2 */ |
| 504 | #define OCCR_PCICOE3 0x10000000 /* PCICOE3 */ |
| 505 | #define OCCR_PCICOE4 0x08000000 /* PCICOE4 */ |
| 506 | #define OCCR_PCICOE5 0x04000000 /* PCICOE5 */ |
| 507 | #define OCCR_PCICOE6 0x02000000 /* PCICOE6 */ |
| 508 | #define OCCR_PCICOE7 0x01000000 /* PCICOE7 */ |
| 509 | #define OCCR_PCICD0 0x00800000 /* PCICD0 */ |
| 510 | #define OCCR_PCICD1 0x00400000 /* PCICD1 */ |
| 511 | #define OCCR_PCICD2 0x00200000 /* PCICD2 */ |
| 512 | #define OCCR_PCICD3 0x00100000 /* PCICD3 */ |
| 513 | #define OCCR_PCICD4 0x00080000 /* PCICD4 */ |
| 514 | #define OCCR_PCICD5 0x00040000 /* PCICD5 */ |
| 515 | #define OCCR_PCICD6 0x00020000 /* PCICD6 */ |
| 516 | #define OCCR_PCICD7 0x00010000 /* PCICD7 */ |
| 517 | #define OCCR_PCI1CR 0x00000002 /* PCI1CR */ |
| 518 | #define OCCR_PCI2CR 0x00000001 /* PCI2CR */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 519 | #define OCCR_RES ~(OCCR_PCICOE0 | OCCR_PCICOE1 | OCCR_PCICOE2 \ |
| 520 | | OCCR_PCICOE3 | OCCR_PCICOE4 | OCCR_PCICOE5 \ |
| 521 | | OCCR_PCICOE6 | OCCR_PCICOE7 | OCCR_PCICD0 \ |
| 522 | | OCCR_PCICD1 | OCCR_PCICD2 | OCCR_PCICD3 \ |
| 523 | | OCCR_PCICD4 | OCCR_PCICD5 | OCCR_PCICD6 \ |
| 524 | | OCCR_PCICD7 | OCCR_PCI1CR | OCCR_PCI2CR ) |
| 525 | u32 sccr; /* system clock control Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 526 | #define SCCR_TSEC1CM 0xc0000000 /* TSEC1CM */ |
| 527 | #define SCCR_TSEC1CM_SHIFT 30 |
| 528 | #define SCCR_TSEC2CM 0x30000000 /* TSEC2CM */ |
| 529 | #define SCCR_TSEC2CM_SHIFT 28 |
| 530 | #define SCCR_ENCCM 0x03000000 /* ENCCM */ |
| 531 | #define SCCR_ENCCM_SHIFT 24 |
| 532 | #define SCCR_USBMPHCM 0x00c00000 /* USBMPHCM */ |
| 533 | #define SCCR_USBMPHCM_SHIFT 22 |
| 534 | #define SCCR_USBDRCM 0x00300000 /* USBDRCM */ |
| 535 | #define SCCR_USBDRCM_SHIFT 20 |
| 536 | #define SCCR_PCICM 0x00010000 /* PCICM */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 537 | #define SCCR_RES ~( SCCR_TSEC1CM | SCCR_TSEC2CM | SCCR_ENCCM \ |
| 538 | | SCCR_USBMPHCM | SCCR_USBDRCM | SCCR_PCICM) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 539 | u8 res0[0xF4]; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 540 | } clk8349_t; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 541 | |
| 542 | /* |
| 543 | * Power Management Control Module |
| 544 | */ |
| 545 | typedef struct pmc8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 546 | u32 pmccr; /* PMC Configuration Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 547 | #define PMCCR_SLPEN 0x00000001 /* System Low Power Enable */ |
| 548 | #define PMCCR_DLPEN 0x00000002 /* DDR SDRAM Low Power Enable */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 549 | #define PMCCR_RES ~(PMCCR_SLPEN | PMCCR_DLPEN) |
| 550 | u32 pmcer; /* PMC Event Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 551 | #define PMCER_PMCI 0x00000001 /* PMC Interrupt */ |
| 552 | #define PMCER_RES ~(PMCER_PMCI) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 553 | u32 pmcmr; /* PMC Mask Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 554 | #define PMCMR_PMCIE 0x0001 /* PMC Interrupt Enable */ |
| 555 | #define PMCMR_RES ~(PMCMR_PMCIE) |
| 556 | u8 res0[0xF4]; |
| 557 | } pmc8349_t; |
| 558 | |
| 559 | |
| 560 | /* |
| 561 | * general purpose I/O module |
| 562 | */ |
| 563 | typedef struct gpio8349 { |
| 564 | u32 dir; /* direction register */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 565 | u32 odr; /* open drain register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 566 | u32 dat; /* data register */ |
| 567 | u32 ier; /* interrupt event register */ |
| 568 | u32 imr; /* interrupt mask register */ |
| 569 | u32 icr; /* external interrupt control register */ |
| 570 | u8 res0[0xE8]; |
| 571 | } gpio8349_t; |
| 572 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 573 | /* |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 574 | * DDR Memory Controller Memory Map |
| 575 | */ |
| 576 | typedef struct ddr_cs_bnds{ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 577 | u32 csbnds; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 578 | #define CSBNDS_SA 0x00FF0000 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 579 | #define CSBNDS_SA_SHIFT 8 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 580 | #define CSBNDS_EA 0x000000FF |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 581 | #define CSBNDS_EA_SHIFT 24 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 582 | u8 res0[4]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 583 | } ddr_cs_bnds_t; |
| 584 | |
| 585 | typedef struct ddr8349{ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 586 | ddr_cs_bnds_t csbnds[4]; /**< Chip Select x Memory Bounds */ |
| 587 | u8 res0[0x60]; |
| 588 | u32 cs_config[4]; /**< Chip Select x Configuration */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 589 | #define CSCONFIG_EN 0x80000000 |
| 590 | #define CSCONFIG_AP 0x00800000 |
| 591 | #define CSCONFIG_ROW_BIT 0x00000700 |
| 592 | #define CSCONFIG_ROW_BIT_12 0x00000000 |
| 593 | #define CSCONFIG_ROW_BIT_13 0x00000100 |
| 594 | #define CSCONFIG_ROW_BIT_14 0x00000200 |
| 595 | #define CSCONFIG_COL_BIT 0x00000007 |
| 596 | #define CSCONFIG_COL_BIT_8 0x00000000 |
| 597 | #define CSCONFIG_COL_BIT_9 0x00000001 |
| 598 | #define CSCONFIG_COL_BIT_10 0x00000002 |
| 599 | #define CSCONFIG_COL_BIT_11 0x00000003 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 600 | u8 res1[0x78]; |
| 601 | u32 timing_cfg_1; /**< SDRAM Timing Configuration 1 */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 602 | #define TIMING_CFG1_PRETOACT 0x70000000 |
| 603 | #define TIMING_CFG1_PRETOACT_SHIFT 28 |
| 604 | #define TIMING_CFG1_ACTTOPRE 0x0F000000 |
| 605 | #define TIMING_CFG1_ACTTOPRE_SHIFT 24 |
| 606 | #define TIMING_CFG1_ACTTORW 0x00700000 |
| 607 | #define TIMING_CFG1_ACTTORW_SHIFT 20 |
| 608 | #define TIMING_CFG1_CASLAT 0x00070000 |
| 609 | #define TIMING_CFG1_CASLAT_SHIFT 16 |
| 610 | #define TIMING_CFG1_REFREC 0x0000F000 |
| 611 | #define TIMING_CFG1_REFREC_SHIFT 12 |
| 612 | #define TIMING_CFG1_WRREC 0x00000700 |
| 613 | #define TIMING_CFG1_WRREC_SHIFT 8 |
| 614 | #define TIMING_CFG1_ACTTOACT 0x00000070 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 615 | #define TIMING_CFG1_ACTTOACT_SHIFT 4 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 616 | #define TIMING_CFG1_WRTORD 0x00000007 |
| 617 | #define TIMING_CFG1_WRTORD_SHIFT 0 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 618 | #define TIMING_CFG1_CASLAT_20 0x00030000 /* CAS latency = 2.0 */ |
| 619 | #define TIMING_CFG1_CASLAT_25 0x00040000 /* CAS latency = 2.5 */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 620 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 621 | u32 timing_cfg_2; /**< SDRAM Timing Configuration 2 */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 622 | #define TIMING_CFG2_CPO 0x0F000000 |
| 623 | #define TIMING_CFG2_CPO_SHIFT 24 |
| 624 | #define TIMING_CFG2_ACSM 0x00080000 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 625 | #define TIMING_CFG2_WR_DATA_DELAY 0x00001C00 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 626 | #define TIMING_CFG2_WR_DATA_DELAY_SHIFT 10 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 627 | #define TIMING_CFG2_CPO_DEF 0x00000000 /* default (= CASLAT + 1) */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 628 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 629 | u32 sdram_cfg; /**< SDRAM Control Configuration */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 630 | #define SDRAM_CFG_MEM_EN 0x80000000 |
| 631 | #define SDRAM_CFG_SREN 0x40000000 |
| 632 | #define SDRAM_CFG_ECC_EN 0x20000000 |
| 633 | #define SDRAM_CFG_RD_EN 0x10000000 |
| 634 | #define SDRAM_CFG_SDRAM_TYPE 0x03000000 |
| 635 | #define SDRAM_CFG_SDRAM_TYPE_SHIFT 24 |
| 636 | #define SDRAM_CFG_DYN_PWR 0x00200000 |
| 637 | #define SDRAM_CFG_32_BE 0x00080000 |
| 638 | #define SDRAM_CFG_8_BE 0x00040000 |
| 639 | #define SDRAM_CFG_NCAP 0x00020000 |
| 640 | #define SDRAM_CFG_2T_EN 0x00008000 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 641 | #define SDRAM_CFG_SDRAM_TYPE_DDR 0x02000000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 642 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 643 | u8 res2[4]; |
| 644 | u32 sdram_mode; /**< SDRAM Mode Configuration */ |
| 645 | #define SDRAM_MODE_ESD 0xFFFF0000 |
| 646 | #define SDRAM_MODE_ESD_SHIFT 16 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 647 | #define SDRAM_MODE_SD 0x0000FFFF |
| 648 | #define SDRAM_MODE_SD_SHIFT 0 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 649 | #define DDR_MODE_EXT_MODEREG 0x4000 /* select extended mode reg */ |
| 650 | #define DDR_MODE_EXT_OPMODE 0x3FF8 /* operating mode, mask */ |
| 651 | #define DDR_MODE_EXT_OP_NORMAL 0x0000 /* normal operation */ |
| 652 | #define DDR_MODE_QFC 0x0004 /* QFC / compatibility, mask */ |
| 653 | #define DDR_MODE_QFC_COMP 0x0000 /* compatible to older SDRAMs */ |
| 654 | #define DDR_MODE_WEAK 0x0002 /* weak drivers */ |
| 655 | #define DDR_MODE_DLL_DIS 0x0001 /* disable DLL */ |
| 656 | #define DDR_MODE_CASLAT 0x0070 /* CAS latency, mask */ |
| 657 | #define DDR_MODE_CASLAT_15 0x0010 /* CAS latency 1.5 */ |
| 658 | #define DDR_MODE_CASLAT_20 0x0020 /* CAS latency 2 */ |
| 659 | #define DDR_MODE_CASLAT_25 0x0060 /* CAS latency 2.5 */ |
| 660 | #define DDR_MODE_CASLAT_30 0x0030 /* CAS latency 3 */ |
| 661 | #define DDR_MODE_BTYPE_SEQ 0x0000 /* sequential burst */ |
| 662 | #define DDR_MODE_BTYPE_ILVD 0x0008 /* interleaved burst */ |
| 663 | #define DDR_MODE_BLEN_2 0x0001 /* burst length 2 */ |
| 664 | #define DDR_MODE_BLEN_4 0x0002 /* burst length 4 */ |
| 665 | #define DDR_REFINT_166MHZ_7US 1302 /* exact value for 7.8125 µs */ |
| 666 | #define DDR_BSTOPRE 256 /* use 256 cycles as a starting point */ |
| 667 | #define DDR_MODE_MODEREG 0x0000 /* select mode register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 668 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 669 | u8 res3[8]; |
| 670 | u32 sdram_interval; /**< SDRAM Interval Configuration */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 671 | #define SDRAM_INTERVAL_REFINT 0x3FFF0000 |
| 672 | #define SDRAM_INTERVAL_REFINT_SHIFT 16 |
| 673 | #define SDRAM_INTERVAL_BSTOPRE 0x00003FFF |
| 674 | #define SDRAM_INTERVAL_BSTOPRE_SHIFT 0 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 675 | u8 res9[8]; |
| 676 | u32 sdram_clk_cntl; |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 677 | #define DDR_SDRAM_CLK_CNTL_SS_EN 0x80000000 |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 678 | #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_025 0x01000000 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 679 | #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 0x02000000 |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 680 | #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075 0x03000000 |
| 681 | #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_1 0x04000000 |
Marian Balakowicz | 513b4a1 | 2005-10-11 19:09:42 +0200 | [diff] [blame] | 682 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 683 | u8 res4[0xCCC]; |
| 684 | u32 data_err_inject_hi; /**< Memory Data Path Error Injection Mask High */ |
| 685 | u32 data_err_inject_lo; /**< Memory Data Path Error Injection Mask Low */ |
| 686 | u32 ecc_err_inject; /**< Memory Data Path Error Injection Mask ECC */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 687 | #define ECC_ERR_INJECT_EMB (0x80000000>>22) /* ECC Mirror Byte */ |
| 688 | #define ECC_ERR_INJECT_EIEN (0x80000000>>23) /* Error Injection Enable */ |
| 689 | #define ECC_ERR_INJECT_EEIM (0xF0000000>>24) /* ECC Erroe Injection Enable */ |
| 690 | #define ECC_ERR_INJECT_EEIM_SHIFT 0 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 691 | u8 res5[0x14]; |
| 692 | u32 capture_data_hi; /**< Memory Data Path Read Capture High */ |
| 693 | u32 capture_data_lo; /**< Memory Data Path Read Capture Low */ |
| 694 | u32 capture_ecc; /**< Memory Data Path Read Capture ECC */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 695 | #define CAPTURE_ECC_ECE (0xF0000000>>24) |
| 696 | #define CAPTURE_ECC_ECE_SHIFT 0 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 697 | u8 res6[0x14]; |
| 698 | u32 err_detect; /**< Memory Error Detect */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 699 | #define ECC_ERROR_DETECT_MME (0x80000000>>0) /* Multiple Memory Errors */ |
| 700 | #define ECC_ERROR_DETECT_MBE (0x80000000>>28) /* Multiple-Bit Error */ |
| 701 | #define ECC_ERROR_DETECT_SBE (0x80000000>>29) /* Single-Bit ECC Error Pickup */ |
| 702 | #define ECC_ERROR_DETECT_MSE (0x80000000>>31) /* Memory Select Error */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 703 | u32 err_disable; /**< Memory Error Disable */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 704 | #define ECC_ERROR_DISABLE_MBED (0x80000000>>28) /* Multiple-Bit ECC Error Disable */ |
| 705 | #define ECC_ERROR_DISABLE_SBED (0x80000000>>29) /* Sinle-Bit ECC Error disable */ |
| 706 | #define ECC_ERROR_DISABLE_MSED (0x80000000>>31) /* Memory Select Error Disable */ |
| 707 | #define ECC_ERROR_ENABLE ~(ECC_ERROR_DISABLE_MSED|ECC_ERROR_DISABLE_SBED|ECC_ERROR_DISABLE_MBED) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 708 | u32 err_int_en; /**< Memory Error Interrupt Enable */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 709 | #define ECC_ERR_INT_EN_MBEE (0x80000000>>28) /* Multiple-Bit ECC Error Interrupt Enable */ |
| 710 | #define ECC_ERR_INT_EN_SBEE (0x80000000>>29) /* Single-Bit ECC Error Interrupt Enable */ |
| 711 | #define ECC_ERR_INT_EN_MSEE (0x80000000>>31) /* Memory Select Error Interrupt Enable */ |
| 712 | #define ECC_ERR_INT_DISABLE ~(ECC_ERR_INT_EN_MBEE|ECC_ERR_INT_EN_SBEE|ECC_ERR_INT_EN_MSEE) |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 713 | u32 capture_attributes; /**< Memory Error Attributes Capture */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 714 | #define ECC_CAPT_ATTR_BNUM (0xe0000000>>1) /* Data Beat Num */ |
| 715 | #define ECC_CAPT_ATTR_BNUM_SHIFT 28 |
| 716 | #define ECC_CAPT_ATTR_TSIZ (0xc0000000>>6) /* Transaction Size */ |
| 717 | #define ECC_CAPT_ATTR_TSIZ_FOUR_DW 0 |
| 718 | #define ECC_CAPT_ATTR_TSIZ_ONE_DW 1 |
| 719 | #define ECC_CAPT_ATTR_TSIZ_TWO_DW 2 |
| 720 | #define ECC_CAPT_ATTR_TSIZ_THREE_DW 3 |
| 721 | #define ECC_CAPT_ATTR_TSIZ_SHIFT 24 |
| 722 | #define ECC_CAPT_ATTR_TSRC (0xf8000000>>11) /* Transaction Source */ |
| 723 | #define ECC_CAPT_ATTR_TSRC_E300_CORE_DT 0x0 |
| 724 | #define ECC_CAPT_ATTR_TSRC_E300_CORE_IF 0x2 |
| 725 | #define ECC_CAPT_ATTR_TSRC_TSEC1 0x4 |
| 726 | #define ECC_CAPT_ATTR_TSRC_TSEC2 0x5 |
| 727 | #define ECC_CAPT_ATTR_TSRC_USB (0x06|0x07) |
| 728 | #define ECC_CAPT_ATTR_TSRC_ENCRYPT 0x8 |
| 729 | #define ECC_CAPT_ATTR_TSRC_I2C 0x9 |
| 730 | #define ECC_CAPT_ATTR_TSRC_JTAG 0xA |
| 731 | #define ECC_CAPT_ATTR_TSRC_PCI1 0xD |
| 732 | #define ECC_CAPT_ATTR_TSRC_PCI2 0xE |
| 733 | #define ECC_CAPT_ATTR_TSRC_DMA 0xF |
| 734 | #define ECC_CAPT_ATTR_TSRC_SHIFT 16 |
| 735 | #define ECC_CAPT_ATTR_TTYP (0xe0000000>>18) /* Transaction Type */ |
| 736 | #define ECC_CAPT_ATTR_TTYP_WRITE 0x1 |
| 737 | #define ECC_CAPT_ATTR_TTYP_READ 0x2 |
| 738 | #define ECC_CAPT_ATTR_TTYP_R_M_W 0x3 |
| 739 | #define ECC_CAPT_ATTR_TTYP_SHIFT 12 |
| 740 | #define ECC_CAPT_ATTR_VLD (0x80000000>>31) /* Valid */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 741 | u32 capture_address; /**< Memory Error Address Capture */ |
| 742 | u32 capture_ext_address;/**< Memory Error Extended Address Capture */ |
| 743 | u32 err_sbe; /**< Memory Single-Bit ECC Error Management */ |
Marian Balakowicz | 62e0541 | 2006-03-14 16:03:46 +0100 | [diff] [blame] | 744 | #define ECC_ERROR_MAN_SBET (0xff000000>>8) /* Single-Bit Error Threshold 0..255*/ |
| 745 | #define ECC_ERROR_MAN_SBET_SHIFT 16 |
| 746 | #define ECC_ERROR_MAN_SBEC (0xff000000>>24) /* Single Bit Error Counter 0..255*/ |
| 747 | #define ECC_ERROR_MAN_SBEC_SHIFT 0 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 748 | u8 res7[0xA4]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 749 | u32 debug_reg; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 750 | u8 res8[0xFC]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 751 | } ddr8349_t; |
| 752 | |
| 753 | /* |
| 754 | * I2C1 Controller |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 755 | */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 756 | |
| 757 | |
| 758 | /* |
| 759 | * DUART |
| 760 | */ |
| 761 | typedef struct duart8349{ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 762 | u8 urbr_ulcr_udlb; /**< combined register for URBR, UTHR and UDLB */ |
| 763 | u8 uier_udmb; /**< combined register for UIER and UDMB */ |
| 764 | u8 uiir_ufcr_uafr; /**< combined register for UIIR, UFCR and UAFR */ |
| 765 | u8 ulcr; /**< line control register */ |
| 766 | u8 umcr; /**< MODEM control register */ |
| 767 | u8 ulsr; /**< line status register */ |
| 768 | u8 umsr; /**< MODEM status register */ |
| 769 | u8 uscr; /**< scratch register */ |
| 770 | u8 res0[8]; |
| 771 | u8 udsr; /**< DMA status register */ |
| 772 | u8 res1[3]; |
| 773 | u8 res2[0xEC]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 774 | } duart8349_t; |
| 775 | |
| 776 | /* |
| 777 | * Local Bus Controller Registers |
| 778 | */ |
| 779 | typedef struct lbus_bank{ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 780 | u32 br; /**< Base Register */ |
| 781 | u32 or; /**< Base Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 782 | } lbus_bank_t; |
| 783 | |
| 784 | typedef struct lbus8349 { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 785 | lbus_bank_t bank[8]; |
| 786 | u8 res0[0x28]; |
| 787 | u32 mar; /**< UPM Address Register */ |
| 788 | u8 res1[0x4]; |
| 789 | u32 mamr; /**< UPMA Mode Register */ |
| 790 | u32 mbmr; /**< UPMB Mode Register */ |
| 791 | u32 mcmr; /**< UPMC Mode Register */ |
| 792 | u8 res2[0x8]; |
| 793 | u32 mrtpr; /**< Memory Refresh Timer Prescaler Register */ |
| 794 | u32 mdr; /**< UPM Data Register */ |
| 795 | u8 res3[0x8]; |
| 796 | u32 lsdmr; /**< SDRAM Mode Register */ |
| 797 | u8 res4[0x8]; |
| 798 | u32 lurt; /**< UPM Refresh Timer */ |
| 799 | u32 lsrt; /**< SDRAM Refresh Timer */ |
| 800 | u8 res5[0x8]; |
| 801 | u32 ltesr; /**< Transfer Error Status Register */ |
| 802 | u32 ltedr; /**< Transfer Error Disable Register */ |
| 803 | u32 lteir; /**< Transfer Error Interrupt Register */ |
| 804 | u32 lteatr; /**< Transfer Error Attributes Register */ |
| 805 | u32 ltear; /**< Transfer Error Address Register */ |
| 806 | u8 res6[0xC]; |
| 807 | u32 lbcr; /**< Configuration Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 808 | #define LBCR_LDIS 0x80000000 |
| 809 | #define LBCR_LDIS_SHIFT 31 |
| 810 | #define LBCR_BCTLC 0x00C00000 |
| 811 | #define LBCR_BCTLC_SHIFT 22 |
| 812 | #define LBCR_LPBSE 0x00020000 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 813 | #define LBCR_LPBSE_SHIFT 17 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 814 | #define LBCR_EPAR 0x00010000 |
| 815 | #define LBCR_EPAR_SHIFT 16 |
| 816 | #define LBCR_BMT 0x0000FF00 |
| 817 | #define LBCR_BMT_SHIFT 8 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 818 | u32 lcrr; /**< Clock Ratio Register */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 819 | #define LCRR_DBYP 0x80000000 |
| 820 | #define LCRR_DBYP_SHIFT 31 |
| 821 | #define LCRR_BUFCMDC 0x30000000 |
| 822 | #define LCRR_BUFCMDC_SHIFT 28 |
| 823 | #define LCRR_ECL 0x03000000 |
| 824 | #define LCRR_ECL_SHIFT 24 |
| 825 | #define LCRR_EADC 0x00030000 |
| 826 | #define LCRR_EADC_SHIFT 16 |
| 827 | #define LCRR_CLKDIV 0x0000000F |
| 828 | #define LCRR_CLKDIV_SHIFT 0 |
| 829 | |
| 830 | |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 831 | u8 res7[0x28]; |
| 832 | u8 res8[0xF00]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 833 | } lbus8349_t; |
| 834 | |
| 835 | /* |
| 836 | * Serial Peripheral Interface |
| 837 | */ |
| 838 | typedef struct spi8349 |
| 839 | { |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 840 | u32 mode; /**< mode register */ |
| 841 | u32 event; /**< event register */ |
| 842 | u32 mask; /**< mask register */ |
| 843 | u32 com; /**< command register */ |
| 844 | u8 res0[0x10]; |
| 845 | u32 tx; /**< transmit register */ |
| 846 | u32 rx; /**< receive register */ |
| 847 | u8 res1[0xD8]; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 848 | } spi8349_t; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 849 | |
Marian Balakowicz | 7ec9ebc | 2006-03-14 16:14:48 +0100 | [diff] [blame^] | 850 | |
| 851 | /* |
| 852 | * DMA/Messaging Unit |
| 853 | */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 854 | typedef struct dma8349 { |
Marian Balakowicz | 7ec9ebc | 2006-03-14 16:14:48 +0100 | [diff] [blame^] | 855 | u32 res0[0xC]; /* 0x0-0x29 reseverd */ |
| 856 | u32 omisr; /* 0x30 Outbound message interrupt status register */ |
| 857 | u32 omimr; /* 0x34 Outbound message interrupt mask register */ |
| 858 | u32 res1[0x6]; /* 0x38-0x49 reserved */ |
| 859 | |
| 860 | u32 imr0; /* 0x50 Inbound message register 0 */ |
| 861 | u32 imr1; /* 0x54 Inbound message register 1 */ |
| 862 | u32 omr0; /* 0x58 Outbound message register 0 */ |
| 863 | u32 omr1; /* 0x5C Outbound message register 1 */ |
| 864 | |
| 865 | u32 odr; /* 0x60 Outbound doorbell register */ |
| 866 | u32 res2; /* 0x64-0x67 reserved */ |
| 867 | u32 idr; /* 0x68 Inbound doorbell register */ |
| 868 | u32 res3[0x5]; /* 0x6C-0x79 reserved */ |
| 869 | |
| 870 | u32 imisr; /* 0x80 Inbound message interrupt status register */ |
| 871 | u32 imimr; /* 0x84 Inbound message interrupt mask register */ |
| 872 | u32 res4[0x1E]; /* 0x88-0x99 reserved */ |
| 873 | |
| 874 | u32 dmamr0; /* 0x100 DMA 0 mode register */ |
| 875 | u32 dmasr0; /* 0x104 DMA 0 status register */ |
| 876 | u32 dmacdar0; /* 0x108 DMA 0 current descriptor address register */ |
| 877 | u32 res5; /* 0x10C reserved */ |
| 878 | u32 dmasar0; /* 0x110 DMA 0 source address register */ |
| 879 | u32 res6; /* 0x114 reserved */ |
| 880 | u32 dmadar0; /* 0x118 DMA 0 destination address register */ |
| 881 | u32 res7; /* 0x11C reserved */ |
| 882 | u32 dmabcr0; /* 0x120 DMA 0 byte count register */ |
| 883 | u32 dmandar0; /* 0x124 DMA 0 next descriptor address register */ |
| 884 | u32 res8[0x16]; /* 0x128-0x179 reserved */ |
| 885 | |
| 886 | u32 dmamr1; /* 0x180 DMA 1 mode register */ |
| 887 | u32 dmasr1; /* 0x184 DMA 1 status register */ |
| 888 | u32 dmacdar1; /* 0x188 DMA 1 current descriptor address register */ |
| 889 | u32 res9; /* 0x18C reserved */ |
| 890 | u32 dmasar1; /* 0x190 DMA 1 source address register */ |
| 891 | u32 res10; /* 0x194 reserved */ |
| 892 | u32 dmadar1; /* 0x198 DMA 1 destination address register */ |
| 893 | u32 res11; /* 0x19C reserved */ |
| 894 | u32 dmabcr1; /* 0x1A0 DMA 1 byte count register */ |
| 895 | u32 dmandar1; /* 0x1A4 DMA 1 next descriptor address register */ |
| 896 | u32 res12[0x16];/* 0x1A8-0x199 reserved */ |
| 897 | |
| 898 | u32 dmamr2; /* 0x200 DMA 2 mode register */ |
| 899 | u32 dmasr2; /* 0x204 DMA 2 status register */ |
| 900 | u32 dmacdar2; /* 0x208 DMA 2 current descriptor address register */ |
| 901 | u32 res13; /* 0x20C reserved */ |
| 902 | u32 dmasar2; /* 0x210 DMA 2 source address register */ |
| 903 | u32 res14; /* 0x214 reserved */ |
| 904 | u32 dmadar2; /* 0x218 DMA 2 destination address register */ |
| 905 | u32 res15; /* 0x21C reserved */ |
| 906 | u32 dmabcr2; /* 0x220 DMA 2 byte count register */ |
| 907 | u32 dmandar2; /* 0x224 DMA 2 next descriptor address register */ |
| 908 | u32 res16[0x16];/* 0x228-0x279 reserved */ |
| 909 | |
| 910 | u32 dmamr3; /* 0x280 DMA 3 mode register */ |
| 911 | u32 dmasr3; /* 0x284 DMA 3 status register */ |
| 912 | u32 dmacdar3; /* 0x288 DMA 3 current descriptor address register */ |
| 913 | u32 res17; /* 0x28C reserved */ |
| 914 | u32 dmasar3; /* 0x290 DMA 3 source address register */ |
| 915 | u32 res18; /* 0x294 reserved */ |
| 916 | u32 dmadar3; /* 0x298 DMA 3 destination address register */ |
| 917 | u32 res19; /* 0x29C reserved */ |
| 918 | u32 dmabcr3; /* 0x2A0 DMA 3 byte count register */ |
| 919 | u32 dmandar3; /* 0x2A4 DMA 3 next descriptor address register */ |
| 920 | |
| 921 | u32 dmagsr; /* 0x2A8 DMA general status register */ |
| 922 | u32 res20[0x15];/* 0x2AC-0x2FF reserved */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 923 | } dma8349_t; |
| 924 | |
Marian Balakowicz | 7ec9ebc | 2006-03-14 16:14:48 +0100 | [diff] [blame^] | 925 | /* DMAMRn bits */ |
| 926 | #define DMA_CHANNEL_START (0x00000001) /* Bit - DMAMRn CS */ |
| 927 | #define DMA_CHANNEL_TRANSFER_MODE_DIRECT (0x00000004) /* Bit - DMAMRn CTM */ |
| 928 | #define DMA_CHANNEL_SOURCE_ADRESSS_HOLD_EN (0x00001000) /* Bit - DMAMRn SAHE */ |
| 929 | #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_1B (0x00000000) /* 2Bit- DMAMRn SAHTS 1byte */ |
| 930 | #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_2B (0x00004000) /* 2Bit- DMAMRn SAHTS 2bytes */ |
| 931 | #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_4B (0x00008000) /* 2Bit- DMAMRn SAHTS 4bytes */ |
| 932 | #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_8B (0x0000c000) /* 2Bit- DMAMRn SAHTS 8bytes */ |
| 933 | #define DMA_CHANNEL_SNOOP (0x00010000) /* Bit - DMAMRn DMSEN */ |
| 934 | |
| 935 | /* DMASRn bits */ |
| 936 | #define DMA_CHANNEL_BUSY (0x00000004) /* Bit - DMASRn CB */ |
| 937 | #define DMA_CHANNEL_TRANSFER_ERROR (0x00000080) /* Bit - DMASRn TE */ |
| 938 | |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 939 | /* |
| 940 | * PCI Software Configuration Registers |
| 941 | */ |
| 942 | typedef struct pciconf8349 { |
| 943 | u32 config_address; |
| 944 | #define PCI_CONFIG_ADDRESS_EN 0x80000000 |
| 945 | #define PCI_CONFIG_ADDRESS_BN_SHIFT 16 |
| 946 | #define PCI_CONFIG_ADDRESS_BN_MASK 0x00ff0000 |
| 947 | #define PCI_CONFIG_ADDRESS_DN_SHIFT 11 |
| 948 | #define PCI_CONFIG_ADDRESS_DN_MASK 0x0000f800 |
| 949 | #define PCI_CONFIG_ADDRESS_FN_SHIFT 8 |
| 950 | #define PCI_CONFIG_ADDRESS_FN_MASK 0x00000700 |
| 951 | #define PCI_CONFIG_ADDRESS_RN_SHIFT 0 |
| 952 | #define PCI_CONFIG_ADDRESS_RN_MASK 0x000000fc |
| 953 | u32 config_data; |
| 954 | u32 int_ack; |
| 955 | u8 res[116]; |
| 956 | } pciconf8349_t; |
| 957 | |
| 958 | /* |
| 959 | * PCI Outbound Translation Register |
| 960 | */ |
| 961 | typedef struct pci_outbound_window { |
| 962 | u32 potar; |
| 963 | u8 res0[4]; |
| 964 | u32 pobar; |
| 965 | u8 res1[4]; |
| 966 | u32 pocmr; |
| 967 | u8 res2[4]; |
| 968 | } pot8349_t; |
| 969 | /* |
| 970 | * Sequencer |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 971 | */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 972 | typedef struct ios8349 { |
| 973 | pot8349_t pot[6]; |
| 974 | #define POTAR_TA_MASK 0x000fffff |
| 975 | #define POBAR_BA_MASK 0x000fffff |
| 976 | #define POCMR_EN 0x80000000 |
| 977 | #define POCMR_IO 0x40000000 /* 0--memory space 1--I/O space */ |
| 978 | #define POCMR_SE 0x20000000 /* streaming enable */ |
| 979 | #define POCMR_DST 0x10000000 /* 0--PCI1 1--PCI2*/ |
| 980 | #define POCMR_CM_MASK 0x000fffff |
| 981 | #define POCMR_CM_4G 0x00000000 |
| 982 | #define POCMR_CM_2G 0x00080000 |
| 983 | #define POCMR_CM_1G 0x000C0000 |
| 984 | #define POCMR_CM_512M 0x000E0000 |
| 985 | #define POCMR_CM_256M 0x000F0000 |
| 986 | #define POCMR_CM_128M 0x000F8000 |
| 987 | #define POCMR_CM_64M 0x000FC000 |
| 988 | #define POCMR_CM_32M 0x000FE000 |
| 989 | #define POCMR_CM_16M 0x000FF000 |
| 990 | #define POCMR_CM_8M 0x000FF800 |
| 991 | #define POCMR_CM_4M 0x000FFC00 |
| 992 | #define POCMR_CM_2M 0x000FFE00 |
| 993 | #define POCMR_CM_1M 0x000FFF00 |
| 994 | #define POCMR_CM_512K 0x000FFF80 |
| 995 | #define POCMR_CM_256K 0x000FFFC0 |
| 996 | #define POCMR_CM_128K 0x000FFFE0 |
| 997 | #define POCMR_CM_64K 0x000FFFF0 |
| 998 | #define POCMR_CM_32K 0x000FFFF8 |
| 999 | #define POCMR_CM_16K 0x000FFFFC |
| 1000 | #define POCMR_CM_8K 0x000FFFFE |
| 1001 | #define POCMR_CM_4K 0x000FFFFF |
| 1002 | u8 res0[0x60]; |
| 1003 | u32 pmcr; |
| 1004 | u8 res1[4]; |
| 1005 | u32 dtcr; |
| 1006 | u8 res2[4]; |
| 1007 | } ios8349_t; |
| 1008 | |
| 1009 | /* |
| 1010 | * PCI Controller Control and Status Registers |
| 1011 | */ |
| 1012 | typedef struct pcictrl8349 { |
| 1013 | u32 esr; |
| 1014 | #define ESR_MERR 0x80000000 |
| 1015 | #define ESR_APAR 0x00000400 |
| 1016 | #define ESR_PCISERR 0x00000200 |
| 1017 | #define ESR_MPERR 0x00000100 |
| 1018 | #define ESR_TPERR 0x00000080 |
| 1019 | #define ESR_NORSP 0x00000040 |
| 1020 | #define ESR_TABT 0x00000020 |
| 1021 | u32 ecdr; |
| 1022 | #define ECDR_APAR 0x00000400 |
| 1023 | #define ECDR_PCISERR 0x00000200 |
| 1024 | #define ECDR_MPERR 0x00000100 |
| 1025 | #define ECDR_TPERR 0x00000080 |
| 1026 | #define ECDR_NORSP 0x00000040 |
| 1027 | #define ECDR_TABT 0x00000020 |
| 1028 | u32 eer; |
| 1029 | #define EER_APAR 0x00000400 |
| 1030 | #define EER_PCISERR 0x00000200 |
| 1031 | #define EER_MPERR 0x00000100 |
| 1032 | #define EER_TPERR 0x00000080 |
| 1033 | #define EER_NORSP 0x00000040 |
| 1034 | #define EER_TABT 0x00000020 |
| 1035 | u32 eatcr; |
| 1036 | #define EATCR_ERRTYPR_MASK 0x70000000 |
| 1037 | #define EATCR_ERRTYPR_APR 0x00000000 /* address parity error */ |
| 1038 | #define EATCR_ERRTYPR_WDPR 0x10000000 /* write data parity error */ |
| 1039 | #define EATCR_ERRTYPR_RDPR 0x20000000 /* read data parity error */ |
| 1040 | #define EATCR_ERRTYPR_MA 0x30000000 /* master abort */ |
| 1041 | #define EATCR_ERRTYPR_TA 0x40000000 /* target abort */ |
| 1042 | #define EATCR_ERRTYPR_SE 0x50000000 /* system error indication received */ |
| 1043 | #define EATCR_ERRTYPR_PEA 0x60000000 /* parity error indication received on a read */ |
| 1044 | #define EATCR_ERRTYPR_PEW 0x70000000 /* parity error indication received on a write */ |
| 1045 | #define EATCR_BN_MASK 0x0f000000 /* beat number */ |
| 1046 | #define EATCR_BN_1st 0x00000000 |
| 1047 | #define EATCR_BN_2ed 0x01000000 |
| 1048 | #define EATCR_BN_3rd 0x02000000 |
| 1049 | #define EATCR_BN_4th 0x03000000 |
| 1050 | #define EATCR_BN_5th 0x0400000 |
| 1051 | #define EATCR_BN_6th 0x05000000 |
| 1052 | #define EATCR_BN_7th 0x06000000 |
| 1053 | #define EATCR_BN_8th 0x07000000 |
| 1054 | #define EATCR_BN_9th 0x08000000 |
| 1055 | #define EATCR_TS_MASK 0x00300000 /* transaction size */ |
| 1056 | #define EATCR_TS_4 0x00000000 |
| 1057 | #define EATCR_TS_1 0x00100000 |
| 1058 | #define EATCR_TS_2 0x00200000 |
| 1059 | #define EATCR_TS_3 0x00300000 |
| 1060 | #define EATCR_ES_MASK 0x000f0000 /* error source */ |
| 1061 | #define EATCR_ES_EM 0x00000000 /* external master */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1062 | #define EATCR_ES_DMA 0x00050000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1063 | #define EATCR_CMD_MASK 0x0000f000 |
| 1064 | #define EATCR_HBE_MASK 0x00000f00 /* PCI high byte enable*/ |
| 1065 | #define EATCR_BE_MASK 0x000000f0 /* PCI byte enable */ |
| 1066 | #define EATCR_HPB 0x00000004 /* high parity bit */ |
| 1067 | #define EATCR_PB 0x00000002 /* parity bit*/ |
| 1068 | #define EATCR_VI 0x00000001 /* error information valid */ |
| 1069 | u32 eacr; |
| 1070 | u32 eeacr; |
| 1071 | u32 edlcr; |
| 1072 | u32 edhcr; |
| 1073 | u32 gcr; |
| 1074 | u32 ecr; |
| 1075 | u32 gsr; |
| 1076 | u8 res0[12]; |
| 1077 | u32 pitar2; |
| 1078 | u8 res1[4]; |
| 1079 | u32 pibar2; |
| 1080 | u32 piebar2; |
| 1081 | u32 piwar2; |
| 1082 | u8 res2[4]; |
| 1083 | u32 pitar1; |
| 1084 | u8 res3[4]; |
| 1085 | u32 pibar1; |
| 1086 | u32 piebar1; |
| 1087 | u32 piwar1; |
| 1088 | u8 res4[4]; |
| 1089 | u32 pitar0; |
| 1090 | u8 res5[4]; |
| 1091 | u32 pibar0; |
| 1092 | u8 res6[4]; |
| 1093 | u32 piwar0; |
| 1094 | u8 res7[132]; |
| 1095 | #define PITAR_TA_MASK 0x000fffff |
| 1096 | #define PIBAR_MASK 0xffffffff |
| 1097 | #define PIEBAR_EBA_MASK 0x000fffff |
| 1098 | #define PIWAR_EN 0x80000000 |
| 1099 | #define PIWAR_PF 0x20000000 |
| 1100 | #define PIWAR_RTT_MASK 0x000f0000 |
| 1101 | #define PIWAR_RTT_NO_SNOOP 0x00040000 |
| 1102 | #define PIWAR_RTT_SNOOP 0x00050000 |
| 1103 | #define PIWAR_WTT_MASK 0x0000f000 |
| 1104 | #define PIWAR_WTT_NO_SNOOP 0x00004000 |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1105 | #define PIWAR_WTT_SNOOP 0x00005000 |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1106 | #define PIWAR_IWS_MASK 0x0000003F |
| 1107 | #define PIWAR_IWS_4K 0x0000000B |
| 1108 | #define PIWAR_IWS_8K 0x0000000C |
| 1109 | #define PIWAR_IWS_16K 0x0000000D |
| 1110 | #define PIWAR_IWS_32K 0x0000000E |
| 1111 | #define PIWAR_IWS_64K 0x0000000F |
| 1112 | #define PIWAR_IWS_128K 0x00000010 |
| 1113 | #define PIWAR_IWS_256K 0x00000011 |
| 1114 | #define PIWAR_IWS_512K 0x00000012 |
| 1115 | #define PIWAR_IWS_1M 0x00000013 |
| 1116 | #define PIWAR_IWS_2M 0x00000014 |
| 1117 | #define PIWAR_IWS_4M 0x00000015 |
| 1118 | #define PIWAR_IWS_8M 0x00000016 |
| 1119 | #define PIWAR_IWS_16M 0x00000017 |
| 1120 | #define PIWAR_IWS_32M 0x00000018 |
| 1121 | #define PIWAR_IWS_64M 0x00000019 |
| 1122 | #define PIWAR_IWS_128M 0x0000001A |
| 1123 | #define PIWAR_IWS_256M 0x0000001B |
| 1124 | #define PIWAR_IWS_512M 0x0000001C |
| 1125 | #define PIWAR_IWS_1G 0x0000001D |
| 1126 | #define PIWAR_IWS_2G 0x0000001E |
| 1127 | } pcictrl8349_t; |
| 1128 | |
| 1129 | /* |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1130 | * USB |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1131 | */ |
| 1132 | typedef struct usb8349 { |
| 1133 | u8 fixme[0x2000]; |
| 1134 | } usb8349_t; |
| 1135 | |
| 1136 | /* |
| 1137 | * TSEC |
| 1138 | */ |
| 1139 | typedef struct tsec8349 { |
| 1140 | u8 fixme[0x1000]; |
| 1141 | } tsec8349_t; |
| 1142 | |
| 1143 | /* |
| 1144 | * Security |
| 1145 | */ |
| 1146 | typedef struct security8349 { |
| 1147 | u8 fixme[0x10000]; |
| 1148 | } security8349_t; |
| 1149 | |
| 1150 | typedef struct immap { |
| 1151 | sysconf8349_t sysconf; /* System configuration */ |
| 1152 | wdt8349_t wdt; /* Watch Dog Timer (WDT) Registers */ |
| 1153 | rtclk8349_t rtc; /* Real Time Clock Module Registers */ |
| 1154 | rtclk8349_t pit; /* Periodic Interval Timer */ |
| 1155 | gtm8349_t gtm[2]; /* Global Timers Module */ |
| 1156 | ipic8349_t ipic; /* Integrated Programmable Interrupt Controller */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1157 | arbiter8349_t arbiter; /* System Arbiter Registers */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1158 | reset8349_t reset; /* Reset Module */ |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1159 | clk8349_t clk; /* System Clock Module */ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1160 | pmc8349_t pmc; /* Power Management Control Module */ |
| 1161 | gpio8349_t pgio[2]; /* general purpose I/O module */ |
| 1162 | u8 res0[0x200]; |
| 1163 | u8 DDL_DDR[0x100]; |
| 1164 | u8 DDL_LBIU[0x100]; |
| 1165 | u8 res1[0xE00]; |
| 1166 | ddr8349_t ddr; /* DDR Memory Controller Memory */ |
| 1167 | i2c_t i2c[2]; /* I2C1 Controller */ |
| 1168 | u8 res2[0x1300]; |
| 1169 | duart8349_t duart[2];/* DUART */ |
| 1170 | u8 res3[0x900]; |
| 1171 | lbus8349_t lbus; /* Local Bus Controller Registers */ |
| 1172 | u8 res4[0x1000]; |
| 1173 | spi8349_t spi; /* Serial Peripheral Interface */ |
| 1174 | u8 res5[0xF00]; |
| 1175 | dma8349_t dma; /* DMA */ |
| 1176 | pciconf8349_t pci_conf[2]; /* PCI Software Configuration Registers */ |
| 1177 | ios8349_t ios; /* Sequencer */ |
| 1178 | pcictrl8349_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */ |
| 1179 | u8 res6[0x19900]; |
| 1180 | usb8349_t usb; |
| 1181 | tsec8349_t tsec[2]; |
| 1182 | u8 res7[0xA000]; |
Jon Loeliger | ebc7224 | 2005-08-01 13:20:47 -0500 | [diff] [blame] | 1183 | security8349_t security; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 1184 | } immap_t; |
| 1185 | |
| 1186 | #endif /* __IMMAP_8349__ */ |