Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 1 | /* |
| 2 | * QUICC Engine (QE) Internal Memory Map. |
| 3 | * The Internal Memory Map for devices with QE on them. This |
| 4 | * is the superset of all QE devices (8360, etc.). |
| 5 | * |
| 6 | * Copyright (c) 2006 Freescale Semiconductor, Inc. |
| 7 | * Author: Shlomi Gridih <gridish@freescale.com> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * option) any later version. |
| 13 | */ |
| 14 | |
| 15 | #ifndef __IMMAP_QE_H__ |
| 16 | #define __IMMAP_QE_H__ |
| 17 | |
| 18 | /* QE I-RAM |
| 19 | */ |
| 20 | typedef struct qe_iram { |
| 21 | u32 iadd; /* I-RAM Address Register */ |
| 22 | u32 idata; /* I-RAM Data Register */ |
| 23 | u8 res0[0x78]; |
| 24 | } __attribute__ ((packed)) qe_iram_t; |
| 25 | |
| 26 | /* QE Interrupt Controller |
| 27 | */ |
| 28 | typedef struct qe_ic { |
| 29 | u32 qicr; |
| 30 | u32 qivec; |
| 31 | u32 qripnr; |
| 32 | u32 qipnr; |
| 33 | u32 qipxcc; |
| 34 | u32 qipycc; |
| 35 | u32 qipwcc; |
| 36 | u32 qipzcc; |
| 37 | u32 qimr; |
| 38 | u32 qrimr; |
| 39 | u32 qicnr; |
| 40 | u8 res0[0x4]; |
| 41 | u32 qiprta; |
| 42 | u32 qiprtb; |
| 43 | u8 res1[0x4]; |
| 44 | u32 qricr; |
| 45 | u8 res2[0x20]; |
| 46 | u32 qhivec; |
| 47 | u8 res3[0x1C]; |
| 48 | } __attribute__ ((packed)) qe_ic_t; |
| 49 | |
| 50 | /* Communications Processor |
| 51 | */ |
| 52 | typedef struct cp_qe { |
| 53 | u32 cecr; /* QE command register */ |
| 54 | u32 ceccr; /* QE controller configuration register */ |
| 55 | u32 cecdr; /* QE command data register */ |
| 56 | u8 res0[0xA]; |
| 57 | u16 ceter; /* QE timer event register */ |
| 58 | u8 res1[0x2]; |
| 59 | u16 cetmr; /* QE timers mask register */ |
| 60 | u32 cetscr; /* QE time-stamp timer control register */ |
| 61 | u32 cetsr1; /* QE time-stamp register 1 */ |
| 62 | u32 cetsr2; /* QE time-stamp register 2 */ |
| 63 | u8 res2[0x8]; |
| 64 | u32 cevter; /* QE virtual tasks event register */ |
| 65 | u32 cevtmr; /* QE virtual tasks mask register */ |
| 66 | u16 cercr; /* QE RAM control register */ |
| 67 | u8 res3[0x2]; |
| 68 | u8 res4[0x24]; |
| 69 | u16 ceexe1; /* QE external request 1 event register */ |
| 70 | u8 res5[0x2]; |
| 71 | u16 ceexm1; /* QE external request 1 mask register */ |
| 72 | u8 res6[0x2]; |
| 73 | u16 ceexe2; /* QE external request 2 event register */ |
| 74 | u8 res7[0x2]; |
| 75 | u16 ceexm2; /* QE external request 2 mask register */ |
| 76 | u8 res8[0x2]; |
| 77 | u16 ceexe3; /* QE external request 3 event register */ |
| 78 | u8 res9[0x2]; |
| 79 | u16 ceexm3; /* QE external request 3 mask register */ |
| 80 | u8 res10[0x2]; |
| 81 | u16 ceexe4; /* QE external request 4 event register */ |
| 82 | u8 res11[0x2]; |
| 83 | u16 ceexm4; /* QE external request 4 mask register */ |
| 84 | u8 res12[0x2]; |
| 85 | u8 res13[0x280]; |
| 86 | } __attribute__ ((packed)) cp_qe_t; |
| 87 | |
| 88 | /* QE Multiplexer |
| 89 | */ |
| 90 | typedef struct qe_mux { |
| 91 | u32 cmxgcr; /* CMX general clock route register */ |
| 92 | u32 cmxsi1cr_l; /* CMX SI1 clock route low register */ |
| 93 | u32 cmxsi1cr_h; /* CMX SI1 clock route high register */ |
| 94 | u32 cmxsi1syr; /* CMX SI1 SYNC route register */ |
| 95 | u32 cmxucr1; /* CMX UCC1, UCC3 clock route register */ |
| 96 | u32 cmxucr2; /* CMX UCC5, UCC7 clock route register */ |
| 97 | u32 cmxucr3; /* CMX UCC2, UCC4 clock route register */ |
| 98 | u32 cmxucr4; /* CMX UCC6, UCC8 clock route register */ |
| 99 | u32 cmxupcr; /* CMX UPC clock route register */ |
| 100 | u8 res0[0x1C]; |
| 101 | } __attribute__ ((packed)) qe_mux_t; |
| 102 | |
| 103 | /* QE Timers |
| 104 | */ |
| 105 | typedef struct qe_timers { |
| 106 | u8 gtcfr1; /* Timer 1 2 global configuration register */ |
| 107 | u8 res0[0x3]; |
| 108 | u8 gtcfr2; /* Timer 3 4 global configuration register */ |
| 109 | u8 res1[0xB]; |
| 110 | u16 gtmdr1; /* Timer 1 mode register */ |
| 111 | u16 gtmdr2; /* Timer 2 mode register */ |
| 112 | u16 gtrfr1; /* Timer 1 reference register */ |
| 113 | u16 gtrfr2; /* Timer 2 reference register */ |
| 114 | u16 gtcpr1; /* Timer 1 capture register */ |
| 115 | u16 gtcpr2; /* Timer 2 capture register */ |
| 116 | u16 gtcnr1; /* Timer 1 counter */ |
| 117 | u16 gtcnr2; /* Timer 2 counter */ |
| 118 | u16 gtmdr3; /* Timer 3 mode register */ |
| 119 | u16 gtmdr4; /* Timer 4 mode register */ |
| 120 | u16 gtrfr3; /* Timer 3 reference register */ |
| 121 | u16 gtrfr4; /* Timer 4 reference register */ |
| 122 | u16 gtcpr3; /* Timer 3 capture register */ |
| 123 | u16 gtcpr4; /* Timer 4 capture register */ |
| 124 | u16 gtcnr3; /* Timer 3 counter */ |
| 125 | u16 gtcnr4; /* Timer 4 counter */ |
| 126 | u16 gtevr1; /* Timer 1 event register */ |
| 127 | u16 gtevr2; /* Timer 2 event register */ |
| 128 | u16 gtevr3; /* Timer 3 event register */ |
| 129 | u16 gtevr4; /* Timer 4 event register */ |
| 130 | u16 gtps; /* Timer 1 prescale register */ |
| 131 | u8 res2[0x46]; |
| 132 | } __attribute__ ((packed)) qe_timers_t; |
| 133 | |
| 134 | /* BRG |
| 135 | */ |
| 136 | typedef struct qe_brg { |
| 137 | u32 brgc1; /* BRG1 configuration register */ |
| 138 | u32 brgc2; /* BRG2 configuration register */ |
| 139 | u32 brgc3; /* BRG3 configuration register */ |
| 140 | u32 brgc4; /* BRG4 configuration register */ |
| 141 | u32 brgc5; /* BRG5 configuration register */ |
| 142 | u32 brgc6; /* BRG6 configuration register */ |
| 143 | u32 brgc7; /* BRG7 configuration register */ |
| 144 | u32 brgc8; /* BRG8 configuration register */ |
| 145 | u32 brgc9; /* BRG9 configuration register */ |
| 146 | u32 brgc10; /* BRG10 configuration register */ |
| 147 | u32 brgc11; /* BRG11 configuration register */ |
| 148 | u32 brgc12; /* BRG12 configuration register */ |
| 149 | u32 brgc13; /* BRG13 configuration register */ |
| 150 | u32 brgc14; /* BRG14 configuration register */ |
| 151 | u32 brgc15; /* BRG15 configuration register */ |
| 152 | u32 brgc16; /* BRG16 configuration register */ |
| 153 | u8 res0[0x40]; |
| 154 | } __attribute__ ((packed)) qe_brg_t; |
| 155 | |
| 156 | /* SPI |
| 157 | */ |
| 158 | typedef struct spi { |
| 159 | u8 res0[0x20]; |
| 160 | u32 spmode; /* SPI mode register */ |
| 161 | u8 res1[0x2]; |
| 162 | u8 spie; /* SPI event register */ |
| 163 | u8 res2[0x1]; |
| 164 | u8 res3[0x2]; |
| 165 | u8 spim; /* SPI mask register */ |
| 166 | u8 res4[0x1]; |
| 167 | u8 res5[0x1]; |
| 168 | u8 spcom; /* SPI command register */ |
| 169 | u8 res6[0x2]; |
| 170 | u32 spitd; /* SPI transmit data register (cpu mode) */ |
| 171 | u32 spird; /* SPI receive data register (cpu mode) */ |
| 172 | u8 res7[0x8]; |
| 173 | } __attribute__ ((packed)) spi_t; |
| 174 | |
| 175 | /* SI |
| 176 | */ |
| 177 | typedef struct si1 { |
| 178 | u16 siamr1; /* SI1 TDMA mode register */ |
| 179 | u16 sibmr1; /* SI1 TDMB mode register */ |
| 180 | u16 sicmr1; /* SI1 TDMC mode register */ |
| 181 | u16 sidmr1; /* SI1 TDMD mode register */ |
| 182 | u8 siglmr1_h; /* SI1 global mode register high */ |
| 183 | u8 res0[0x1]; |
| 184 | u8 sicmdr1_h; /* SI1 command register high */ |
| 185 | u8 res2[0x1]; |
| 186 | u8 sistr1_h; /* SI1 status register high */ |
| 187 | u8 res3[0x1]; |
| 188 | u16 sirsr1_h; /* SI1 RAM shadow address register high */ |
| 189 | u8 sitarc1; /* SI1 RAM counter Tx TDMA */ |
| 190 | u8 sitbrc1; /* SI1 RAM counter Tx TDMB */ |
| 191 | u8 sitcrc1; /* SI1 RAM counter Tx TDMC */ |
| 192 | u8 sitdrc1; /* SI1 RAM counter Tx TDMD */ |
| 193 | u8 sirarc1; /* SI1 RAM counter Rx TDMA */ |
| 194 | u8 sirbrc1; /* SI1 RAM counter Rx TDMB */ |
| 195 | u8 sircrc1; /* SI1 RAM counter Rx TDMC */ |
| 196 | u8 sirdrc1; /* SI1 RAM counter Rx TDMD */ |
| 197 | u8 res4[0x8]; |
| 198 | u16 siemr1; /* SI1 TDME mode register 16 bits */ |
| 199 | u16 sifmr1; /* SI1 TDMF mode register 16 bits */ |
| 200 | u16 sigmr1; /* SI1 TDMG mode register 16 bits */ |
| 201 | u16 sihmr1; /* SI1 TDMH mode register 16 bits */ |
| 202 | u8 siglmg1_l; /* SI1 global mode register low 8 bits */ |
| 203 | u8 res5[0x1]; |
| 204 | u8 sicmdr1_l; /* SI1 command register low 8 bits */ |
| 205 | u8 res6[0x1]; |
| 206 | u8 sistr1_l; /* SI1 status register low 8 bits */ |
| 207 | u8 res7[0x1]; |
| 208 | u16 sirsr1_l; /* SI1 RAM shadow address register low 16 bits */ |
| 209 | u8 siterc1; /* SI1 RAM counter Tx TDME 8 bits */ |
| 210 | u8 sitfrc1; /* SI1 RAM counter Tx TDMF 8 bits */ |
| 211 | u8 sitgrc1; /* SI1 RAM counter Tx TDMG 8 bits */ |
| 212 | u8 sithrc1; /* SI1 RAM counter Tx TDMH 8 bits */ |
| 213 | u8 sirerc1; /* SI1 RAM counter Rx TDME 8 bits */ |
| 214 | u8 sirfrc1; /* SI1 RAM counter Rx TDMF 8 bits */ |
| 215 | u8 sirgrc1; /* SI1 RAM counter Rx TDMG 8 bits */ |
| 216 | u8 sirhrc1; /* SI1 RAM counter Rx TDMH 8 bits */ |
| 217 | u8 res8[0x8]; |
| 218 | u32 siml1; /* SI1 multiframe limit register */ |
| 219 | u8 siedm1; /* SI1 extended diagnostic mode register */ |
| 220 | u8 res9[0xBB]; |
| 221 | } __attribute__ ((packed)) si1_t; |
| 222 | |
| 223 | /* SI Routing Tables |
| 224 | */ |
| 225 | typedef struct sir { |
| 226 | u8 tx[0x400]; |
| 227 | u8 rx[0x400]; |
| 228 | u8 res0[0x800]; |
| 229 | } __attribute__ ((packed)) sir_t; |
| 230 | |
| 231 | /* USB Controller. |
| 232 | */ |
| 233 | typedef struct usb_ctlr { |
| 234 | u8 usb_usmod; |
| 235 | u8 usb_usadr; |
| 236 | u8 usb_uscom; |
| 237 | u8 res1[1]; |
| 238 | u16 usb_usep1; |
| 239 | u16 usb_usep2; |
| 240 | u16 usb_usep3; |
| 241 | u16 usb_usep4; |
| 242 | u8 res2[4]; |
| 243 | u16 usb_usber; |
| 244 | u8 res3[2]; |
| 245 | u16 usb_usbmr; |
| 246 | u8 res4[1]; |
| 247 | u8 usb_usbs; |
| 248 | u16 usb_ussft; |
| 249 | u8 res5[2]; |
| 250 | u16 usb_usfrn; |
| 251 | u8 res6[0x22]; |
| 252 | } __attribute__ ((packed)) usb_t; |
| 253 | |
| 254 | /* MCC |
| 255 | */ |
| 256 | typedef struct mcc { |
| 257 | u32 mcce; /* MCC event register */ |
| 258 | u32 mccm; /* MCC mask register */ |
| 259 | u32 mccf; /* MCC configuration register */ |
| 260 | u32 merl; /* MCC emergency request level register */ |
| 261 | u8 res0[0xF0]; |
| 262 | } __attribute__ ((packed)) mcc_t; |
| 263 | |
| 264 | /* QE UCC Slow |
| 265 | */ |
| 266 | typedef struct ucc_slow { |
| 267 | u32 gumr_l; /* UCCx general mode register (low) */ |
| 268 | u32 gumr_h; /* UCCx general mode register (high) */ |
| 269 | u16 upsmr; /* UCCx protocol-specific mode register */ |
| 270 | u8 res0[0x2]; |
| 271 | u16 utodr; /* UCCx transmit on demand register */ |
| 272 | u16 udsr; /* UCCx data synchronization register */ |
| 273 | u16 ucce; /* UCCx event register */ |
| 274 | u8 res1[0x2]; |
| 275 | u16 uccm; /* UCCx mask register */ |
| 276 | u8 res2[0x1]; |
| 277 | u8 uccs; /* UCCx status register */ |
| 278 | u8 res3[0x24]; |
| 279 | u16 utpt; |
| 280 | u8 guemr; /* UCC general extended mode register */ |
| 281 | u8 res4[0x200 - 0x091]; |
| 282 | } __attribute__ ((packed)) ucc_slow_t; |
| 283 | |
Andy Fleming | da9d461 | 2007-08-14 00:14:25 -0500 | [diff] [blame] | 284 | typedef struct ucc_mii_mng { |
| 285 | u32 miimcfg; /* MII management configuration reg */ |
| 286 | u32 miimcom; /* MII management command reg */ |
| 287 | u32 miimadd; /* MII management address reg */ |
| 288 | u32 miimcon; /* MII management control reg */ |
| 289 | u32 miimstat; /* MII management status reg */ |
| 290 | u32 miimind; /* MII management indication reg */ |
| 291 | u32 ifctl; /* interface control reg */ |
| 292 | u32 ifstat; /* interface statux reg */ |
| 293 | } __attribute__ ((packed))uec_mii_t; |
| 294 | |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 295 | typedef struct ucc_ethernet { |
| 296 | u32 maccfg1; /* mac configuration reg. 1 */ |
| 297 | u32 maccfg2; /* mac configuration reg. 2 */ |
| 298 | u32 ipgifg; /* interframe gap reg. */ |
| 299 | u32 hafdup; /* half-duplex reg. */ |
| 300 | u8 res1[0x10]; |
| 301 | u32 miimcfg; /* MII management configuration reg */ |
| 302 | u32 miimcom; /* MII management command reg */ |
| 303 | u32 miimadd; /* MII management address reg */ |
| 304 | u32 miimcon; /* MII management control reg */ |
| 305 | u32 miimstat; /* MII management status reg */ |
| 306 | u32 miimind; /* MII management indication reg */ |
| 307 | u32 ifctl; /* interface control reg */ |
| 308 | u32 ifstat; /* interface statux reg */ |
| 309 | u32 macstnaddr1; /* mac station address part 1 reg */ |
| 310 | u32 macstnaddr2; /* mac station address part 2 reg */ |
| 311 | u8 res2[0x8]; |
| 312 | u32 uempr; /* UCC Ethernet Mac parameter reg */ |
| 313 | u32 utbipar; /* UCC tbi address reg */ |
| 314 | u16 uescr; /* UCC Ethernet statistics control reg */ |
| 315 | u8 res3[0x180 - 0x15A]; |
| 316 | u32 tx64; /* Total number of frames (including bad |
| 317 | * frames) transmitted that were exactly |
| 318 | * of the minimal length (64 for un tagged, |
| 319 | * 68 for tagged, or with length exactly |
| 320 | * equal to the parameter MINLength */ |
| 321 | u32 tx127; /* Total number of frames (including bad |
| 322 | * frames) transmitted that were between |
| 323 | * MINLength (Including FCS length==4) |
| 324 | * and 127 octets */ |
| 325 | u32 tx255; /* Total number of frames (including bad |
| 326 | * frames) transmitted that were between |
| 327 | * 128 (Including FCS length==4) and 255 |
| 328 | * octets */ |
| 329 | u32 rx64; /* Total number of frames received including |
| 330 | * bad frames that were exactly of the |
| 331 | * mninimal length (64 bytes) */ |
| 332 | u32 rx127; /* Total number of frames (including bad |
| 333 | * frames) received that were between |
| 334 | * MINLength (Including FCS length==4) |
| 335 | * and 127 octets */ |
| 336 | u32 rx255; /* Total number of frames (including |
| 337 | * bad frames) received that were between |
| 338 | * 128 (Including FCS length==4) and 255 |
| 339 | * octets */ |
| 340 | u32 txok; /* Total number of octets residing in frames |
| 341 | * that where involved in succesfull |
| 342 | * transmission */ |
| 343 | u16 txcf; /* Total number of PAUSE control frames |
| 344 | * transmitted by this MAC */ |
| 345 | u8 res4[0x2]; |
| 346 | u32 tmca; /* Total number of frames that were transmitted |
| 347 | * succesfully with the group address bit set |
| 348 | * that are not broadcast frames */ |
| 349 | u32 tbca; /* Total number of frames transmitted |
| 350 | * succesfully that had destination address |
| 351 | * field equal to the broadcast address */ |
| 352 | u32 rxfok; /* Total number of frames received OK */ |
| 353 | u32 rxbok; /* Total number of octets received OK */ |
| 354 | u32 rbyt; /* Total number of octets received including |
| 355 | * octets in bad frames. Must be implemented |
| 356 | * in HW because it includes octets in frames |
| 357 | * that never even reach the UCC */ |
| 358 | u32 rmca; /* Total number of frames that were received |
| 359 | * succesfully with the group address bit set |
| 360 | * that are not broadcast frames */ |
| 361 | u32 rbca; /* Total number of frames received succesfully |
| 362 | * that had destination address equal to the |
| 363 | * broadcast address */ |
| 364 | u32 scar; /* Statistics carry register */ |
| 365 | u32 scam; /* Statistics caryy mask register */ |
| 366 | u8 res5[0x200 - 0x1c4]; |
| 367 | } __attribute__ ((packed)) uec_t; |
| 368 | |
| 369 | /* QE UCC Fast |
| 370 | */ |
| 371 | typedef struct ucc_fast { |
| 372 | u32 gumr; /* UCCx general mode register */ |
| 373 | u32 upsmr; /* UCCx protocol-specific mode register */ |
| 374 | u16 utodr; /* UCCx transmit on demand register */ |
| 375 | u8 res0[0x2]; |
| 376 | u16 udsr; /* UCCx data synchronization register */ |
| 377 | u8 res1[0x2]; |
| 378 | u32 ucce; /* UCCx event register */ |
| 379 | u32 uccm; /* UCCx mask register. */ |
| 380 | u8 uccs; /* UCCx status register */ |
| 381 | u8 res2[0x7]; |
| 382 | u32 urfb; /* UCC receive FIFO base */ |
| 383 | u16 urfs; /* UCC receive FIFO size */ |
| 384 | u8 res3[0x2]; |
| 385 | u16 urfet; /* UCC receive FIFO emergency threshold */ |
| 386 | u16 urfset; /* UCC receive FIFO special emergency |
| 387 | * threshold */ |
| 388 | u32 utfb; /* UCC transmit FIFO base */ |
| 389 | u16 utfs; /* UCC transmit FIFO size */ |
| 390 | u8 res4[0x2]; |
| 391 | u16 utfet; /* UCC transmit FIFO emergency threshold */ |
| 392 | u8 res5[0x2]; |
| 393 | u16 utftt; /* UCC transmit FIFO transmit threshold */ |
| 394 | u8 res6[0x2]; |
| 395 | u16 utpt; /* UCC transmit polling timer */ |
| 396 | u8 res7[0x2]; |
| 397 | u32 urtry; /* UCC retry counter register */ |
| 398 | u8 res8[0x4C]; |
| 399 | u8 guemr; /* UCC general extended mode register */ |
| 400 | u8 res9[0x100 - 0x091]; |
| 401 | uec_t ucc_eth; |
| 402 | } __attribute__ ((packed)) ucc_fast_t; |
| 403 | |
| 404 | /* QE UCC |
| 405 | */ |
| 406 | typedef struct ucc_common { |
| 407 | u8 res1[0x90]; |
| 408 | u8 guemr; |
| 409 | u8 res2[0x200 - 0x091]; |
| 410 | } __attribute__ ((packed)) ucc_common_t; |
| 411 | |
| 412 | typedef struct ucc { |
| 413 | union { |
| 414 | ucc_slow_t slow; |
| 415 | ucc_fast_t fast; |
| 416 | ucc_common_t common; |
| 417 | }; |
| 418 | } __attribute__ ((packed)) ucc_t; |
| 419 | |
| 420 | /* MultiPHY UTOPIA POS Controllers (UPC) |
| 421 | */ |
| 422 | typedef struct upc { |
| 423 | u32 upgcr; /* UTOPIA/POS general configuration register */ |
| 424 | u32 uplpa; /* UTOPIA/POS last PHY address */ |
| 425 | u32 uphec; /* ATM HEC register */ |
| 426 | u32 upuc; /* UTOPIA/POS UCC configuration */ |
| 427 | u32 updc1; /* UTOPIA/POS device 1 configuration */ |
| 428 | u32 updc2; /* UTOPIA/POS device 2 configuration */ |
| 429 | u32 updc3; /* UTOPIA/POS device 3 configuration */ |
| 430 | u32 updc4; /* UTOPIA/POS device 4 configuration */ |
| 431 | u32 upstpa; /* UTOPIA/POS STPA threshold */ |
| 432 | u8 res0[0xC]; |
| 433 | u32 updrs1_h; /* UTOPIA/POS device 1 rate select */ |
| 434 | u32 updrs1_l; /* UTOPIA/POS device 1 rate select */ |
| 435 | u32 updrs2_h; /* UTOPIA/POS device 2 rate select */ |
| 436 | u32 updrs2_l; /* UTOPIA/POS device 2 rate select */ |
| 437 | u32 updrs3_h; /* UTOPIA/POS device 3 rate select */ |
| 438 | u32 updrs3_l; /* UTOPIA/POS device 3 rate select */ |
| 439 | u32 updrs4_h; /* UTOPIA/POS device 4 rate select */ |
| 440 | u32 updrs4_l; /* UTOPIA/POS device 4 rate select */ |
| 441 | u32 updrp1; /* UTOPIA/POS device 1 receive priority low */ |
| 442 | u32 updrp2; /* UTOPIA/POS device 2 receive priority low */ |
| 443 | u32 updrp3; /* UTOPIA/POS device 3 receive priority low */ |
| 444 | u32 updrp4; /* UTOPIA/POS device 4 receive priority low */ |
| 445 | u32 upde1; /* UTOPIA/POS device 1 event */ |
| 446 | u32 upde2; /* UTOPIA/POS device 2 event */ |
| 447 | u32 upde3; /* UTOPIA/POS device 3 event */ |
| 448 | u32 upde4; /* UTOPIA/POS device 4 event */ |
| 449 | u16 uprp1; |
| 450 | u16 uprp2; |
| 451 | u16 uprp3; |
| 452 | u16 uprp4; |
| 453 | u8 res1[0x8]; |
| 454 | u16 uptirr1_0; /* Device 1 transmit internal rate 0 */ |
| 455 | u16 uptirr1_1; /* Device 1 transmit internal rate 1 */ |
| 456 | u16 uptirr1_2; /* Device 1 transmit internal rate 2 */ |
| 457 | u16 uptirr1_3; /* Device 1 transmit internal rate 3 */ |
| 458 | u16 uptirr2_0; /* Device 2 transmit internal rate 0 */ |
| 459 | u16 uptirr2_1; /* Device 2 transmit internal rate 1 */ |
| 460 | u16 uptirr2_2; /* Device 2 transmit internal rate 2 */ |
| 461 | u16 uptirr2_3; /* Device 2 transmit internal rate 3 */ |
| 462 | u16 uptirr3_0; /* Device 3 transmit internal rate 0 */ |
| 463 | u16 uptirr3_1; /* Device 3 transmit internal rate 1 */ |
| 464 | u16 uptirr3_2; /* Device 3 transmit internal rate 2 */ |
| 465 | u16 uptirr3_3; /* Device 3 transmit internal rate 3 */ |
| 466 | u16 uptirr4_0; /* Device 4 transmit internal rate 0 */ |
| 467 | u16 uptirr4_1; /* Device 4 transmit internal rate 1 */ |
| 468 | u16 uptirr4_2; /* Device 4 transmit internal rate 2 */ |
| 469 | u16 uptirr4_3; /* Device 4 transmit internal rate 3 */ |
| 470 | u32 uper1; /* Device 1 port enable register */ |
| 471 | u32 uper2; /* Device 2 port enable register */ |
| 472 | u32 uper3; /* Device 3 port enable register */ |
| 473 | u32 uper4; /* Device 4 port enable register */ |
| 474 | u8 res2[0x150]; |
| 475 | } __attribute__ ((packed)) upc_t; |
| 476 | |
| 477 | /* SDMA |
| 478 | */ |
| 479 | typedef struct sdma { |
| 480 | u32 sdsr; /* Serial DMA status register */ |
| 481 | u32 sdmr; /* Serial DMA mode register */ |
| 482 | u32 sdtr1; /* SDMA system bus threshold register */ |
| 483 | u32 sdtr2; /* SDMA secondary bus threshold register */ |
| 484 | u32 sdhy1; /* SDMA system bus hysteresis register */ |
| 485 | u32 sdhy2; /* SDMA secondary bus hysteresis register */ |
| 486 | u32 sdta1; /* SDMA system bus address register */ |
| 487 | u32 sdta2; /* SDMA secondary bus address register */ |
| 488 | u32 sdtm1; /* SDMA system bus MSNUM register */ |
| 489 | u32 sdtm2; /* SDMA secondary bus MSNUM register */ |
| 490 | u8 res0[0x10]; |
| 491 | u32 sdaqr; /* SDMA address bus qualify register */ |
| 492 | u32 sdaqmr; /* SDMA address bus qualify mask register */ |
| 493 | u8 res1[0x4]; |
| 494 | u32 sdwbcr; /* SDMA CAM entries base register */ |
| 495 | u8 res2[0x38]; |
| 496 | } __attribute__ ((packed)) sdma_t; |
| 497 | |
| 498 | /* Debug Space |
| 499 | */ |
| 500 | typedef struct dbg { |
| 501 | u32 bpdcr; /* Breakpoint debug command register */ |
| 502 | u32 bpdsr; /* Breakpoint debug status register */ |
| 503 | u32 bpdmr; /* Breakpoint debug mask register */ |
| 504 | u32 bprmrr0; /* Breakpoint request mode risc register 0 */ |
| 505 | u32 bprmrr1; /* Breakpoint request mode risc register 1 */ |
| 506 | u8 res0[0x8]; |
| 507 | u32 bprmtr0; /* Breakpoint request mode trb register 0 */ |
| 508 | u32 bprmtr1; /* Breakpoint request mode trb register 1 */ |
| 509 | u8 res1[0x8]; |
| 510 | u32 bprmir; /* Breakpoint request mode immediate register */ |
| 511 | u32 bprmsr; /* Breakpoint request mode serial register */ |
| 512 | u32 bpemr; /* Breakpoint exit mode register */ |
| 513 | u8 res2[0x48]; |
| 514 | } __attribute__ ((packed)) dbg_t; |
| 515 | |
Timur Tabi | b8ec238 | 2008-01-07 13:31:19 -0600 | [diff] [blame] | 516 | /* |
| 517 | * RISC Special Registers (Trap and Breakpoint). These are described in |
| 518 | * the QE Developer's Handbook. |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 519 | */ |
| 520 | typedef struct rsp { |
Timur Tabi | b8ec238 | 2008-01-07 13:31:19 -0600 | [diff] [blame] | 521 | u32 tibcr[16]; /* Trap/instruction breakpoint control regs */ |
| 522 | u8 res0[64]; |
| 523 | u32 ibcr0; |
| 524 | u32 ibs0; |
| 525 | u32 ibcnr0; |
| 526 | u8 res1[4]; |
| 527 | u32 ibcr1; |
| 528 | u32 ibs1; |
| 529 | u32 ibcnr1; |
| 530 | u32 npcr; |
| 531 | u32 dbcr; |
| 532 | u32 dbar; |
| 533 | u32 dbamr; |
| 534 | u32 dbsr; |
| 535 | u32 dbcnr; |
| 536 | u8 res2[12]; |
| 537 | u32 dbdr_h; |
| 538 | u32 dbdr_l; |
| 539 | u32 dbdmr_h; |
| 540 | u32 dbdmr_l; |
| 541 | u32 bsr; |
| 542 | u32 bor; |
| 543 | u32 bior; |
| 544 | u8 res3[4]; |
| 545 | u32 iatr[4]; |
| 546 | u32 eccr; /* Exception control configuration register */ |
| 547 | u32 eicr; |
| 548 | u8 res4[0x100-0xf8]; |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 549 | } __attribute__ ((packed)) rsp_t; |
| 550 | |
| 551 | typedef struct qe_immap { |
| 552 | qe_iram_t iram; /* I-RAM */ |
| 553 | qe_ic_t ic; /* Interrupt Controller */ |
| 554 | cp_qe_t cp; /* Communications Processor */ |
| 555 | qe_mux_t qmx; /* QE Multiplexer */ |
| 556 | qe_timers_t qet; /* QE Timers */ |
| 557 | spi_t spi[0x2]; /* spi */ |
| 558 | mcc_t mcc; /* mcc */ |
| 559 | qe_brg_t brg; /* brg */ |
| 560 | usb_t usb; /* USB */ |
| 561 | si1_t si1; /* SI */ |
| 562 | u8 res11[0x800]; |
| 563 | sir_t sir; /* SI Routing Tables */ |
| 564 | ucc_t ucc1; /* ucc1 */ |
| 565 | ucc_t ucc3; /* ucc3 */ |
| 566 | ucc_t ucc5; /* ucc5 */ |
| 567 | ucc_t ucc7; /* ucc7 */ |
| 568 | u8 res12[0x600]; |
| 569 | upc_t upc1; /* MultiPHY UTOPIA POS Controller 1 */ |
| 570 | ucc_t ucc2; /* ucc2 */ |
| 571 | ucc_t ucc4; /* ucc4 */ |
| 572 | ucc_t ucc6; /* ucc6 */ |
| 573 | ucc_t ucc8; /* ucc8 */ |
| 574 | u8 res13[0x600]; |
| 575 | upc_t upc2; /* MultiPHY UTOPIA POS Controller 2 */ |
| 576 | sdma_t sdma; /* SDMA */ |
| 577 | dbg_t dbg; /* Debug Space */ |
| 578 | rsp_t rsp[0x2]; /* RISC Special Registers |
| 579 | * (Trap and Breakpoint) */ |
| 580 | u8 res14[0x300]; |
| 581 | u8 res15[0x3A00]; |
| 582 | u8 res16[0x8000]; /* 0x108000 - 0x110000 */ |
Andy Fleming | da9d461 | 2007-08-14 00:14:25 -0500 | [diff] [blame] | 583 | #if defined(CONFIG_MPC8568) |
| 584 | u8 muram[0x10000]; /* 0x1_0000 - 0x2_0000 Multi-user RAM */ |
| 585 | u8 res17[0x20000]; /* 0x2_0000 - 0x4_0000 */ |
| 586 | #else |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 587 | u8 muram[0xC000]; /* 0x110000 - 0x11C000 Multi-user RAM */ |
| 588 | u8 res17[0x24000]; /* 0x11C000 - 0x140000 */ |
| 589 | u8 res18[0xC0000]; /* 0x140000 - 0x200000 */ |
Andy Fleming | da9d461 | 2007-08-14 00:14:25 -0500 | [diff] [blame] | 590 | #endif |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 591 | } __attribute__ ((packed)) qe_map_t; |
| 592 | |
| 593 | extern qe_map_t *qe_immr; |
| 594 | |
Andy Fleming | da9d461 | 2007-08-14 00:14:25 -0500 | [diff] [blame] | 595 | #if defined(CONFIG_MPC8568) |
| 596 | #define QE_MURAM_SIZE 0x10000UL |
| 597 | #elif defined(CONFIG_MPC8360) |
Dave Liu | 24c3aca | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 598 | #define QE_MURAM_SIZE 0xc000UL |
| 599 | #elif defined(CONFIG_MPC832X) |
| 600 | #define QE_MURAM_SIZE 0x4000UL |
| 601 | #endif |
| 602 | |
Dave Liu | 23892e4 | 2006-10-31 19:30:40 -0600 | [diff] [blame] | 603 | #endif /* __IMMAP_QE_H__ */ |