12874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 27aa1aa6eSZhao Qiang /* 37aa1aa6eSZhao Qiang * QUICC Engine (QE) Internal Memory Map. 47aa1aa6eSZhao Qiang * The Internal Memory Map for devices with QE on them. This 57aa1aa6eSZhao Qiang * is the superset of all QE devices (8360, etc.). 67aa1aa6eSZhao Qiang 77aa1aa6eSZhao Qiang * Copyright (C) 2006. Freescale Semiconductor, Inc. All rights reserved. 87aa1aa6eSZhao Qiang * 97aa1aa6eSZhao Qiang * Authors: Shlomi Gridish <gridish@freescale.com> 107aa1aa6eSZhao Qiang * Li Yang <leoli@freescale.com> 117aa1aa6eSZhao Qiang */ 127aa1aa6eSZhao Qiang #ifndef _ASM_POWERPC_IMMAP_QE_H 137aa1aa6eSZhao Qiang #define _ASM_POWERPC_IMMAP_QE_H 147aa1aa6eSZhao Qiang #ifdef __KERNEL__ 157aa1aa6eSZhao Qiang 16*988f0a90SAndy Shevchenko #include <linux/types.h> 17*988f0a90SAndy Shevchenko 187aa1aa6eSZhao Qiang #include <asm/io.h> 197aa1aa6eSZhao Qiang 207aa1aa6eSZhao Qiang #define QE_IMMAP_SIZE (1024 * 1024) /* 1MB from 1MB+IMMR */ 217aa1aa6eSZhao Qiang 227aa1aa6eSZhao Qiang /* QE I-RAM */ 237aa1aa6eSZhao Qiang struct qe_iram { 247aa1aa6eSZhao Qiang __be32 iadd; /* I-RAM Address Register */ 257aa1aa6eSZhao Qiang __be32 idata; /* I-RAM Data Register */ 267aa1aa6eSZhao Qiang u8 res0[0x04]; 277aa1aa6eSZhao Qiang __be32 iready; /* I-RAM Ready Register */ 287aa1aa6eSZhao Qiang u8 res1[0x70]; 297aa1aa6eSZhao Qiang } __attribute__ ((packed)); 307aa1aa6eSZhao Qiang 317aa1aa6eSZhao Qiang /* QE Interrupt Controller */ 327aa1aa6eSZhao Qiang struct qe_ic_regs { 337aa1aa6eSZhao Qiang __be32 qicr; 347aa1aa6eSZhao Qiang __be32 qivec; 357aa1aa6eSZhao Qiang __be32 qripnr; 367aa1aa6eSZhao Qiang __be32 qipnr; 377aa1aa6eSZhao Qiang __be32 qipxcc; 387aa1aa6eSZhao Qiang __be32 qipycc; 397aa1aa6eSZhao Qiang __be32 qipwcc; 407aa1aa6eSZhao Qiang __be32 qipzcc; 417aa1aa6eSZhao Qiang __be32 qimr; 427aa1aa6eSZhao Qiang __be32 qrimr; 437aa1aa6eSZhao Qiang __be32 qicnr; 447aa1aa6eSZhao Qiang u8 res0[0x4]; 457aa1aa6eSZhao Qiang __be32 qiprta; 467aa1aa6eSZhao Qiang __be32 qiprtb; 477aa1aa6eSZhao Qiang u8 res1[0x4]; 487aa1aa6eSZhao Qiang __be32 qricr; 497aa1aa6eSZhao Qiang u8 res2[0x20]; 507aa1aa6eSZhao Qiang __be32 qhivec; 517aa1aa6eSZhao Qiang u8 res3[0x1C]; 527aa1aa6eSZhao Qiang } __attribute__ ((packed)); 537aa1aa6eSZhao Qiang 547aa1aa6eSZhao Qiang /* Communications Processor */ 557aa1aa6eSZhao Qiang struct cp_qe { 567aa1aa6eSZhao Qiang __be32 cecr; /* QE command register */ 577aa1aa6eSZhao Qiang __be32 ceccr; /* QE controller configuration register */ 587aa1aa6eSZhao Qiang __be32 cecdr; /* QE command data register */ 597aa1aa6eSZhao Qiang u8 res0[0xA]; 607aa1aa6eSZhao Qiang __be16 ceter; /* QE timer event register */ 617aa1aa6eSZhao Qiang u8 res1[0x2]; 627aa1aa6eSZhao Qiang __be16 cetmr; /* QE timers mask register */ 637aa1aa6eSZhao Qiang __be32 cetscr; /* QE time-stamp timer control register */ 647aa1aa6eSZhao Qiang __be32 cetsr1; /* QE time-stamp register 1 */ 657aa1aa6eSZhao Qiang __be32 cetsr2; /* QE time-stamp register 2 */ 667aa1aa6eSZhao Qiang u8 res2[0x8]; 677aa1aa6eSZhao Qiang __be32 cevter; /* QE virtual tasks event register */ 687aa1aa6eSZhao Qiang __be32 cevtmr; /* QE virtual tasks mask register */ 697aa1aa6eSZhao Qiang __be16 cercr; /* QE RAM control register */ 707aa1aa6eSZhao Qiang u8 res3[0x2]; 717aa1aa6eSZhao Qiang u8 res4[0x24]; 727aa1aa6eSZhao Qiang __be16 ceexe1; /* QE external request 1 event register */ 737aa1aa6eSZhao Qiang u8 res5[0x2]; 747aa1aa6eSZhao Qiang __be16 ceexm1; /* QE external request 1 mask register */ 757aa1aa6eSZhao Qiang u8 res6[0x2]; 767aa1aa6eSZhao Qiang __be16 ceexe2; /* QE external request 2 event register */ 777aa1aa6eSZhao Qiang u8 res7[0x2]; 787aa1aa6eSZhao Qiang __be16 ceexm2; /* QE external request 2 mask register */ 797aa1aa6eSZhao Qiang u8 res8[0x2]; 807aa1aa6eSZhao Qiang __be16 ceexe3; /* QE external request 3 event register */ 817aa1aa6eSZhao Qiang u8 res9[0x2]; 827aa1aa6eSZhao Qiang __be16 ceexm3; /* QE external request 3 mask register */ 837aa1aa6eSZhao Qiang u8 res10[0x2]; 847aa1aa6eSZhao Qiang __be16 ceexe4; /* QE external request 4 event register */ 857aa1aa6eSZhao Qiang u8 res11[0x2]; 867aa1aa6eSZhao Qiang __be16 ceexm4; /* QE external request 4 mask register */ 877aa1aa6eSZhao Qiang u8 res12[0x3A]; 887aa1aa6eSZhao Qiang __be32 ceurnr; /* QE microcode revision number register */ 897aa1aa6eSZhao Qiang u8 res13[0x244]; 907aa1aa6eSZhao Qiang } __attribute__ ((packed)); 917aa1aa6eSZhao Qiang 927aa1aa6eSZhao Qiang /* QE Multiplexer */ 937aa1aa6eSZhao Qiang struct qe_mux { 947aa1aa6eSZhao Qiang __be32 cmxgcr; /* CMX general clock route register */ 957aa1aa6eSZhao Qiang __be32 cmxsi1cr_l; /* CMX SI1 clock route low register */ 967aa1aa6eSZhao Qiang __be32 cmxsi1cr_h; /* CMX SI1 clock route high register */ 977aa1aa6eSZhao Qiang __be32 cmxsi1syr; /* CMX SI1 SYNC route register */ 987aa1aa6eSZhao Qiang __be32 cmxucr[4]; /* CMX UCCx clock route registers */ 997aa1aa6eSZhao Qiang __be32 cmxupcr; /* CMX UPC clock route register */ 1007aa1aa6eSZhao Qiang u8 res0[0x1C]; 1017aa1aa6eSZhao Qiang } __attribute__ ((packed)); 1027aa1aa6eSZhao Qiang 1037aa1aa6eSZhao Qiang /* QE Timers */ 1047aa1aa6eSZhao Qiang struct qe_timers { 1057aa1aa6eSZhao Qiang u8 gtcfr1; /* Timer 1 and Timer 2 global config register*/ 1067aa1aa6eSZhao Qiang u8 res0[0x3]; 1077aa1aa6eSZhao Qiang u8 gtcfr2; /* Timer 3 and timer 4 global config register*/ 1087aa1aa6eSZhao Qiang u8 res1[0xB]; 1097aa1aa6eSZhao Qiang __be16 gtmdr1; /* Timer 1 mode register */ 1107aa1aa6eSZhao Qiang __be16 gtmdr2; /* Timer 2 mode register */ 1117aa1aa6eSZhao Qiang __be16 gtrfr1; /* Timer 1 reference register */ 1127aa1aa6eSZhao Qiang __be16 gtrfr2; /* Timer 2 reference register */ 1137aa1aa6eSZhao Qiang __be16 gtcpr1; /* Timer 1 capture register */ 1147aa1aa6eSZhao Qiang __be16 gtcpr2; /* Timer 2 capture register */ 1157aa1aa6eSZhao Qiang __be16 gtcnr1; /* Timer 1 counter */ 1167aa1aa6eSZhao Qiang __be16 gtcnr2; /* Timer 2 counter */ 1177aa1aa6eSZhao Qiang __be16 gtmdr3; /* Timer 3 mode register */ 1187aa1aa6eSZhao Qiang __be16 gtmdr4; /* Timer 4 mode register */ 1197aa1aa6eSZhao Qiang __be16 gtrfr3; /* Timer 3 reference register */ 1207aa1aa6eSZhao Qiang __be16 gtrfr4; /* Timer 4 reference register */ 1217aa1aa6eSZhao Qiang __be16 gtcpr3; /* Timer 3 capture register */ 1227aa1aa6eSZhao Qiang __be16 gtcpr4; /* Timer 4 capture register */ 1237aa1aa6eSZhao Qiang __be16 gtcnr3; /* Timer 3 counter */ 1247aa1aa6eSZhao Qiang __be16 gtcnr4; /* Timer 4 counter */ 1257aa1aa6eSZhao Qiang __be16 gtevr1; /* Timer 1 event register */ 1267aa1aa6eSZhao Qiang __be16 gtevr2; /* Timer 2 event register */ 1277aa1aa6eSZhao Qiang __be16 gtevr3; /* Timer 3 event register */ 1287aa1aa6eSZhao Qiang __be16 gtevr4; /* Timer 4 event register */ 1297aa1aa6eSZhao Qiang __be16 gtps; /* Timer 1 prescale register */ 1307aa1aa6eSZhao Qiang u8 res2[0x46]; 1317aa1aa6eSZhao Qiang } __attribute__ ((packed)); 1327aa1aa6eSZhao Qiang 1337aa1aa6eSZhao Qiang /* BRG */ 1347aa1aa6eSZhao Qiang struct qe_brg { 1357aa1aa6eSZhao Qiang __be32 brgc[16]; /* BRG configuration registers */ 1367aa1aa6eSZhao Qiang u8 res0[0x40]; 1377aa1aa6eSZhao Qiang } __attribute__ ((packed)); 1387aa1aa6eSZhao Qiang 1397aa1aa6eSZhao Qiang /* SPI */ 1407aa1aa6eSZhao Qiang struct spi { 1417aa1aa6eSZhao Qiang u8 res0[0x20]; 1427aa1aa6eSZhao Qiang __be32 spmode; /* SPI mode register */ 1437aa1aa6eSZhao Qiang u8 res1[0x2]; 1447aa1aa6eSZhao Qiang u8 spie; /* SPI event register */ 1457aa1aa6eSZhao Qiang u8 res2[0x1]; 1467aa1aa6eSZhao Qiang u8 res3[0x2]; 1477aa1aa6eSZhao Qiang u8 spim; /* SPI mask register */ 1487aa1aa6eSZhao Qiang u8 res4[0x1]; 1497aa1aa6eSZhao Qiang u8 res5[0x1]; 1507aa1aa6eSZhao Qiang u8 spcom; /* SPI command register */ 1517aa1aa6eSZhao Qiang u8 res6[0x2]; 1527aa1aa6eSZhao Qiang __be32 spitd; /* SPI transmit data register (cpu mode) */ 1537aa1aa6eSZhao Qiang __be32 spird; /* SPI receive data register (cpu mode) */ 1547aa1aa6eSZhao Qiang u8 res7[0x8]; 1557aa1aa6eSZhao Qiang } __attribute__ ((packed)); 1567aa1aa6eSZhao Qiang 1577aa1aa6eSZhao Qiang /* SI */ 1587aa1aa6eSZhao Qiang struct si1 { 15935ef1c20SZhao Qiang __be16 sixmr1[4]; /* SI1 TDMx (x = A B C D) mode register */ 1607aa1aa6eSZhao Qiang u8 siglmr1_h; /* SI1 global mode register high */ 1617aa1aa6eSZhao Qiang u8 res0[0x1]; 1627aa1aa6eSZhao Qiang u8 sicmdr1_h; /* SI1 command register high */ 1637aa1aa6eSZhao Qiang u8 res2[0x1]; 1647aa1aa6eSZhao Qiang u8 sistr1_h; /* SI1 status register high */ 1657aa1aa6eSZhao Qiang u8 res3[0x1]; 1667aa1aa6eSZhao Qiang __be16 sirsr1_h; /* SI1 RAM shadow address register high */ 1677aa1aa6eSZhao Qiang u8 sitarc1; /* SI1 RAM counter Tx TDMA */ 1687aa1aa6eSZhao Qiang u8 sitbrc1; /* SI1 RAM counter Tx TDMB */ 1697aa1aa6eSZhao Qiang u8 sitcrc1; /* SI1 RAM counter Tx TDMC */ 1707aa1aa6eSZhao Qiang u8 sitdrc1; /* SI1 RAM counter Tx TDMD */ 1717aa1aa6eSZhao Qiang u8 sirarc1; /* SI1 RAM counter Rx TDMA */ 1727aa1aa6eSZhao Qiang u8 sirbrc1; /* SI1 RAM counter Rx TDMB */ 1737aa1aa6eSZhao Qiang u8 sircrc1; /* SI1 RAM counter Rx TDMC */ 1747aa1aa6eSZhao Qiang u8 sirdrc1; /* SI1 RAM counter Rx TDMD */ 1757aa1aa6eSZhao Qiang u8 res4[0x8]; 1767aa1aa6eSZhao Qiang __be16 siemr1; /* SI1 TDME mode register 16 bits */ 1777aa1aa6eSZhao Qiang __be16 sifmr1; /* SI1 TDMF mode register 16 bits */ 1787aa1aa6eSZhao Qiang __be16 sigmr1; /* SI1 TDMG mode register 16 bits */ 1797aa1aa6eSZhao Qiang __be16 sihmr1; /* SI1 TDMH mode register 16 bits */ 1807aa1aa6eSZhao Qiang u8 siglmg1_l; /* SI1 global mode register low 8 bits */ 1817aa1aa6eSZhao Qiang u8 res5[0x1]; 1827aa1aa6eSZhao Qiang u8 sicmdr1_l; /* SI1 command register low 8 bits */ 1837aa1aa6eSZhao Qiang u8 res6[0x1]; 1847aa1aa6eSZhao Qiang u8 sistr1_l; /* SI1 status register low 8 bits */ 1857aa1aa6eSZhao Qiang u8 res7[0x1]; 1867aa1aa6eSZhao Qiang __be16 sirsr1_l; /* SI1 RAM shadow address register low 16 bits*/ 1877aa1aa6eSZhao Qiang u8 siterc1; /* SI1 RAM counter Tx TDME 8 bits */ 1887aa1aa6eSZhao Qiang u8 sitfrc1; /* SI1 RAM counter Tx TDMF 8 bits */ 1897aa1aa6eSZhao Qiang u8 sitgrc1; /* SI1 RAM counter Tx TDMG 8 bits */ 1907aa1aa6eSZhao Qiang u8 sithrc1; /* SI1 RAM counter Tx TDMH 8 bits */ 1917aa1aa6eSZhao Qiang u8 sirerc1; /* SI1 RAM counter Rx TDME 8 bits */ 1927aa1aa6eSZhao Qiang u8 sirfrc1; /* SI1 RAM counter Rx TDMF 8 bits */ 1937aa1aa6eSZhao Qiang u8 sirgrc1; /* SI1 RAM counter Rx TDMG 8 bits */ 1947aa1aa6eSZhao Qiang u8 sirhrc1; /* SI1 RAM counter Rx TDMH 8 bits */ 1957aa1aa6eSZhao Qiang u8 res8[0x8]; 1967aa1aa6eSZhao Qiang __be32 siml1; /* SI1 multiframe limit register */ 1977aa1aa6eSZhao Qiang u8 siedm1; /* SI1 extended diagnostic mode register */ 1987aa1aa6eSZhao Qiang u8 res9[0xBB]; 1997aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2007aa1aa6eSZhao Qiang 2017aa1aa6eSZhao Qiang /* SI Routing Tables */ 2027aa1aa6eSZhao Qiang struct sir { 2037aa1aa6eSZhao Qiang u8 tx[0x400]; 2047aa1aa6eSZhao Qiang u8 rx[0x400]; 2057aa1aa6eSZhao Qiang u8 res0[0x800]; 2067aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2077aa1aa6eSZhao Qiang 2087aa1aa6eSZhao Qiang /* USB Controller */ 2097aa1aa6eSZhao Qiang struct qe_usb_ctlr { 2107aa1aa6eSZhao Qiang u8 usb_usmod; 2117aa1aa6eSZhao Qiang u8 usb_usadr; 2127aa1aa6eSZhao Qiang u8 usb_uscom; 2137aa1aa6eSZhao Qiang u8 res1[1]; 2147aa1aa6eSZhao Qiang __be16 usb_usep[4]; 2157aa1aa6eSZhao Qiang u8 res2[4]; 2167aa1aa6eSZhao Qiang __be16 usb_usber; 2177aa1aa6eSZhao Qiang u8 res3[2]; 2187aa1aa6eSZhao Qiang __be16 usb_usbmr; 2197aa1aa6eSZhao Qiang u8 res4[1]; 2207aa1aa6eSZhao Qiang u8 usb_usbs; 2217aa1aa6eSZhao Qiang __be16 usb_ussft; 2227aa1aa6eSZhao Qiang u8 res5[2]; 2237aa1aa6eSZhao Qiang __be16 usb_usfrn; 2247aa1aa6eSZhao Qiang u8 res6[0x22]; 2257aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2267aa1aa6eSZhao Qiang 2277aa1aa6eSZhao Qiang /* MCC */ 2287aa1aa6eSZhao Qiang struct qe_mcc { 2297aa1aa6eSZhao Qiang __be32 mcce; /* MCC event register */ 2307aa1aa6eSZhao Qiang __be32 mccm; /* MCC mask register */ 2317aa1aa6eSZhao Qiang __be32 mccf; /* MCC configuration register */ 2327aa1aa6eSZhao Qiang __be32 merl; /* MCC emergency request level register */ 2337aa1aa6eSZhao Qiang u8 res0[0xF0]; 2347aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2357aa1aa6eSZhao Qiang 2367aa1aa6eSZhao Qiang /* QE UCC Slow */ 2377aa1aa6eSZhao Qiang struct ucc_slow { 2387aa1aa6eSZhao Qiang __be32 gumr_l; /* UCCx general mode register (low) */ 2397aa1aa6eSZhao Qiang __be32 gumr_h; /* UCCx general mode register (high) */ 2407aa1aa6eSZhao Qiang __be16 upsmr; /* UCCx protocol-specific mode register */ 2417aa1aa6eSZhao Qiang u8 res0[0x2]; 2427aa1aa6eSZhao Qiang __be16 utodr; /* UCCx transmit on demand register */ 2437aa1aa6eSZhao Qiang __be16 udsr; /* UCCx data synchronization register */ 2447aa1aa6eSZhao Qiang __be16 ucce; /* UCCx event register */ 2457aa1aa6eSZhao Qiang u8 res1[0x2]; 2467aa1aa6eSZhao Qiang __be16 uccm; /* UCCx mask register */ 2477aa1aa6eSZhao Qiang u8 res2[0x1]; 2487aa1aa6eSZhao Qiang u8 uccs; /* UCCx status register */ 2497aa1aa6eSZhao Qiang u8 res3[0x24]; 2507aa1aa6eSZhao Qiang __be16 utpt; 2517aa1aa6eSZhao Qiang u8 res4[0x52]; 2527aa1aa6eSZhao Qiang u8 guemr; /* UCC general extended mode register */ 2537aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2547aa1aa6eSZhao Qiang 2557aa1aa6eSZhao Qiang /* QE UCC Fast */ 2567aa1aa6eSZhao Qiang struct ucc_fast { 2577aa1aa6eSZhao Qiang __be32 gumr; /* UCCx general mode register */ 2587aa1aa6eSZhao Qiang __be32 upsmr; /* UCCx protocol-specific mode register */ 2597aa1aa6eSZhao Qiang __be16 utodr; /* UCCx transmit on demand register */ 2607aa1aa6eSZhao Qiang u8 res0[0x2]; 2617aa1aa6eSZhao Qiang __be16 udsr; /* UCCx data synchronization register */ 2627aa1aa6eSZhao Qiang u8 res1[0x2]; 2637aa1aa6eSZhao Qiang __be32 ucce; /* UCCx event register */ 2647aa1aa6eSZhao Qiang __be32 uccm; /* UCCx mask register */ 2657aa1aa6eSZhao Qiang u8 uccs; /* UCCx status register */ 2667aa1aa6eSZhao Qiang u8 res2[0x7]; 2677aa1aa6eSZhao Qiang __be32 urfb; /* UCC receive FIFO base */ 2687aa1aa6eSZhao Qiang __be16 urfs; /* UCC receive FIFO size */ 2697aa1aa6eSZhao Qiang u8 res3[0x2]; 2707aa1aa6eSZhao Qiang __be16 urfet; /* UCC receive FIFO emergency threshold */ 2717aa1aa6eSZhao Qiang __be16 urfset; /* UCC receive FIFO special emergency 2727aa1aa6eSZhao Qiang threshold */ 2737aa1aa6eSZhao Qiang __be32 utfb; /* UCC transmit FIFO base */ 2747aa1aa6eSZhao Qiang __be16 utfs; /* UCC transmit FIFO size */ 2757aa1aa6eSZhao Qiang u8 res4[0x2]; 2767aa1aa6eSZhao Qiang __be16 utfet; /* UCC transmit FIFO emergency threshold */ 2777aa1aa6eSZhao Qiang u8 res5[0x2]; 2787aa1aa6eSZhao Qiang __be16 utftt; /* UCC transmit FIFO transmit threshold */ 2797aa1aa6eSZhao Qiang u8 res6[0x2]; 2807aa1aa6eSZhao Qiang __be16 utpt; /* UCC transmit polling timer */ 2817aa1aa6eSZhao Qiang u8 res7[0x2]; 2827aa1aa6eSZhao Qiang __be32 urtry; /* UCC retry counter register */ 2837aa1aa6eSZhao Qiang u8 res8[0x4C]; 2847aa1aa6eSZhao Qiang u8 guemr; /* UCC general extended mode register */ 2857aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2867aa1aa6eSZhao Qiang 2877aa1aa6eSZhao Qiang struct ucc { 2887aa1aa6eSZhao Qiang union { 2897aa1aa6eSZhao Qiang struct ucc_slow slow; 2907aa1aa6eSZhao Qiang struct ucc_fast fast; 2917aa1aa6eSZhao Qiang u8 res[0x200]; /* UCC blocks are 512 bytes each */ 2927aa1aa6eSZhao Qiang }; 2937aa1aa6eSZhao Qiang } __attribute__ ((packed)); 2947aa1aa6eSZhao Qiang 2957aa1aa6eSZhao Qiang /* MultiPHY UTOPIA POS Controllers (UPC) */ 2967aa1aa6eSZhao Qiang struct upc { 2977aa1aa6eSZhao Qiang __be32 upgcr; /* UTOPIA/POS general configuration register */ 2987aa1aa6eSZhao Qiang __be32 uplpa; /* UTOPIA/POS last PHY address */ 2997aa1aa6eSZhao Qiang __be32 uphec; /* ATM HEC register */ 3007aa1aa6eSZhao Qiang __be32 upuc; /* UTOPIA/POS UCC configuration */ 3017aa1aa6eSZhao Qiang __be32 updc1; /* UTOPIA/POS device 1 configuration */ 3027aa1aa6eSZhao Qiang __be32 updc2; /* UTOPIA/POS device 2 configuration */ 3037aa1aa6eSZhao Qiang __be32 updc3; /* UTOPIA/POS device 3 configuration */ 3047aa1aa6eSZhao Qiang __be32 updc4; /* UTOPIA/POS device 4 configuration */ 3057aa1aa6eSZhao Qiang __be32 upstpa; /* UTOPIA/POS STPA threshold */ 3067aa1aa6eSZhao Qiang u8 res0[0xC]; 3077aa1aa6eSZhao Qiang __be32 updrs1_h; /* UTOPIA/POS device 1 rate select */ 3087aa1aa6eSZhao Qiang __be32 updrs1_l; /* UTOPIA/POS device 1 rate select */ 3097aa1aa6eSZhao Qiang __be32 updrs2_h; /* UTOPIA/POS device 2 rate select */ 3107aa1aa6eSZhao Qiang __be32 updrs2_l; /* UTOPIA/POS device 2 rate select */ 3117aa1aa6eSZhao Qiang __be32 updrs3_h; /* UTOPIA/POS device 3 rate select */ 3127aa1aa6eSZhao Qiang __be32 updrs3_l; /* UTOPIA/POS device 3 rate select */ 3137aa1aa6eSZhao Qiang __be32 updrs4_h; /* UTOPIA/POS device 4 rate select */ 3147aa1aa6eSZhao Qiang __be32 updrs4_l; /* UTOPIA/POS device 4 rate select */ 3157aa1aa6eSZhao Qiang __be32 updrp1; /* UTOPIA/POS device 1 receive priority low */ 3167aa1aa6eSZhao Qiang __be32 updrp2; /* UTOPIA/POS device 2 receive priority low */ 3177aa1aa6eSZhao Qiang __be32 updrp3; /* UTOPIA/POS device 3 receive priority low */ 3187aa1aa6eSZhao Qiang __be32 updrp4; /* UTOPIA/POS device 4 receive priority low */ 3197aa1aa6eSZhao Qiang __be32 upde1; /* UTOPIA/POS device 1 event */ 3207aa1aa6eSZhao Qiang __be32 upde2; /* UTOPIA/POS device 2 event */ 3217aa1aa6eSZhao Qiang __be32 upde3; /* UTOPIA/POS device 3 event */ 3227aa1aa6eSZhao Qiang __be32 upde4; /* UTOPIA/POS device 4 event */ 3237aa1aa6eSZhao Qiang __be16 uprp1; 3247aa1aa6eSZhao Qiang __be16 uprp2; 3257aa1aa6eSZhao Qiang __be16 uprp3; 3267aa1aa6eSZhao Qiang __be16 uprp4; 3277aa1aa6eSZhao Qiang u8 res1[0x8]; 3287aa1aa6eSZhao Qiang __be16 uptirr1_0; /* Device 1 transmit internal rate 0 */ 3297aa1aa6eSZhao Qiang __be16 uptirr1_1; /* Device 1 transmit internal rate 1 */ 3307aa1aa6eSZhao Qiang __be16 uptirr1_2; /* Device 1 transmit internal rate 2 */ 3317aa1aa6eSZhao Qiang __be16 uptirr1_3; /* Device 1 transmit internal rate 3 */ 3327aa1aa6eSZhao Qiang __be16 uptirr2_0; /* Device 2 transmit internal rate 0 */ 3337aa1aa6eSZhao Qiang __be16 uptirr2_1; /* Device 2 transmit internal rate 1 */ 3347aa1aa6eSZhao Qiang __be16 uptirr2_2; /* Device 2 transmit internal rate 2 */ 3357aa1aa6eSZhao Qiang __be16 uptirr2_3; /* Device 2 transmit internal rate 3 */ 3367aa1aa6eSZhao Qiang __be16 uptirr3_0; /* Device 3 transmit internal rate 0 */ 3377aa1aa6eSZhao Qiang __be16 uptirr3_1; /* Device 3 transmit internal rate 1 */ 3387aa1aa6eSZhao Qiang __be16 uptirr3_2; /* Device 3 transmit internal rate 2 */ 3397aa1aa6eSZhao Qiang __be16 uptirr3_3; /* Device 3 transmit internal rate 3 */ 3407aa1aa6eSZhao Qiang __be16 uptirr4_0; /* Device 4 transmit internal rate 0 */ 3417aa1aa6eSZhao Qiang __be16 uptirr4_1; /* Device 4 transmit internal rate 1 */ 3427aa1aa6eSZhao Qiang __be16 uptirr4_2; /* Device 4 transmit internal rate 2 */ 3437aa1aa6eSZhao Qiang __be16 uptirr4_3; /* Device 4 transmit internal rate 3 */ 3447aa1aa6eSZhao Qiang __be32 uper1; /* Device 1 port enable register */ 3457aa1aa6eSZhao Qiang __be32 uper2; /* Device 2 port enable register */ 3467aa1aa6eSZhao Qiang __be32 uper3; /* Device 3 port enable register */ 3477aa1aa6eSZhao Qiang __be32 uper4; /* Device 4 port enable register */ 3487aa1aa6eSZhao Qiang u8 res2[0x150]; 3497aa1aa6eSZhao Qiang } __attribute__ ((packed)); 3507aa1aa6eSZhao Qiang 3517aa1aa6eSZhao Qiang /* SDMA */ 3527aa1aa6eSZhao Qiang struct sdma { 3537aa1aa6eSZhao Qiang __be32 sdsr; /* Serial DMA status register */ 3547aa1aa6eSZhao Qiang __be32 sdmr; /* Serial DMA mode register */ 3557aa1aa6eSZhao Qiang __be32 sdtr1; /* SDMA system bus threshold register */ 3567aa1aa6eSZhao Qiang __be32 sdtr2; /* SDMA secondary bus threshold register */ 3577aa1aa6eSZhao Qiang __be32 sdhy1; /* SDMA system bus hysteresis register */ 3587aa1aa6eSZhao Qiang __be32 sdhy2; /* SDMA secondary bus hysteresis register */ 3597aa1aa6eSZhao Qiang __be32 sdta1; /* SDMA system bus address register */ 3607aa1aa6eSZhao Qiang __be32 sdta2; /* SDMA secondary bus address register */ 3617aa1aa6eSZhao Qiang __be32 sdtm1; /* SDMA system bus MSNUM register */ 3627aa1aa6eSZhao Qiang __be32 sdtm2; /* SDMA secondary bus MSNUM register */ 3637aa1aa6eSZhao Qiang u8 res0[0x10]; 3647aa1aa6eSZhao Qiang __be32 sdaqr; /* SDMA address bus qualify register */ 3657aa1aa6eSZhao Qiang __be32 sdaqmr; /* SDMA address bus qualify mask register */ 3667aa1aa6eSZhao Qiang u8 res1[0x4]; 3677aa1aa6eSZhao Qiang __be32 sdebcr; /* SDMA CAM entries base register */ 3687aa1aa6eSZhao Qiang u8 res2[0x38]; 3697aa1aa6eSZhao Qiang } __attribute__ ((packed)); 3707aa1aa6eSZhao Qiang 3717aa1aa6eSZhao Qiang /* Debug Space */ 3727aa1aa6eSZhao Qiang struct dbg { 3737aa1aa6eSZhao Qiang __be32 bpdcr; /* Breakpoint debug command register */ 3747aa1aa6eSZhao Qiang __be32 bpdsr; /* Breakpoint debug status register */ 3757aa1aa6eSZhao Qiang __be32 bpdmr; /* Breakpoint debug mask register */ 3767aa1aa6eSZhao Qiang __be32 bprmrr0; /* Breakpoint request mode risc register 0 */ 3777aa1aa6eSZhao Qiang __be32 bprmrr1; /* Breakpoint request mode risc register 1 */ 3787aa1aa6eSZhao Qiang u8 res0[0x8]; 3797aa1aa6eSZhao Qiang __be32 bprmtr0; /* Breakpoint request mode trb register 0 */ 3807aa1aa6eSZhao Qiang __be32 bprmtr1; /* Breakpoint request mode trb register 1 */ 3817aa1aa6eSZhao Qiang u8 res1[0x8]; 3827aa1aa6eSZhao Qiang __be32 bprmir; /* Breakpoint request mode immediate register */ 3837aa1aa6eSZhao Qiang __be32 bprmsr; /* Breakpoint request mode serial register */ 3847aa1aa6eSZhao Qiang __be32 bpemr; /* Breakpoint exit mode register */ 3857aa1aa6eSZhao Qiang u8 res2[0x48]; 3867aa1aa6eSZhao Qiang } __attribute__ ((packed)); 3877aa1aa6eSZhao Qiang 3887aa1aa6eSZhao Qiang /* 3897aa1aa6eSZhao Qiang * RISC Special Registers (Trap and Breakpoint). These are described in 3907aa1aa6eSZhao Qiang * the QE Developer's Handbook. 3917aa1aa6eSZhao Qiang */ 3927aa1aa6eSZhao Qiang struct rsp { 3937aa1aa6eSZhao Qiang __be32 tibcr[16]; /* Trap/instruction breakpoint control regs */ 3947aa1aa6eSZhao Qiang u8 res0[64]; 3957aa1aa6eSZhao Qiang __be32 ibcr0; 3967aa1aa6eSZhao Qiang __be32 ibs0; 3977aa1aa6eSZhao Qiang __be32 ibcnr0; 3987aa1aa6eSZhao Qiang u8 res1[4]; 3997aa1aa6eSZhao Qiang __be32 ibcr1; 4007aa1aa6eSZhao Qiang __be32 ibs1; 4017aa1aa6eSZhao Qiang __be32 ibcnr1; 4027aa1aa6eSZhao Qiang __be32 npcr; 4037aa1aa6eSZhao Qiang __be32 dbcr; 4047aa1aa6eSZhao Qiang __be32 dbar; 4057aa1aa6eSZhao Qiang __be32 dbamr; 4067aa1aa6eSZhao Qiang __be32 dbsr; 4077aa1aa6eSZhao Qiang __be32 dbcnr; 4087aa1aa6eSZhao Qiang u8 res2[12]; 4097aa1aa6eSZhao Qiang __be32 dbdr_h; 4107aa1aa6eSZhao Qiang __be32 dbdr_l; 4117aa1aa6eSZhao Qiang __be32 dbdmr_h; 4127aa1aa6eSZhao Qiang __be32 dbdmr_l; 4137aa1aa6eSZhao Qiang __be32 bsr; 4147aa1aa6eSZhao Qiang __be32 bor; 4157aa1aa6eSZhao Qiang __be32 bior; 4167aa1aa6eSZhao Qiang u8 res3[4]; 4177aa1aa6eSZhao Qiang __be32 iatr[4]; 4187aa1aa6eSZhao Qiang __be32 eccr; /* Exception control configuration register */ 4197aa1aa6eSZhao Qiang __be32 eicr; 4207aa1aa6eSZhao Qiang u8 res4[0x100-0xf8]; 4217aa1aa6eSZhao Qiang } __attribute__ ((packed)); 4227aa1aa6eSZhao Qiang 4237aa1aa6eSZhao Qiang struct qe_immap { 4247aa1aa6eSZhao Qiang struct qe_iram iram; /* I-RAM */ 4257aa1aa6eSZhao Qiang struct qe_ic_regs ic; /* Interrupt Controller */ 4267aa1aa6eSZhao Qiang struct cp_qe cp; /* Communications Processor */ 4277aa1aa6eSZhao Qiang struct qe_mux qmx; /* QE Multiplexer */ 4287aa1aa6eSZhao Qiang struct qe_timers qet; /* QE Timers */ 4297aa1aa6eSZhao Qiang struct spi spi[0x2]; /* spi */ 4307aa1aa6eSZhao Qiang struct qe_mcc mcc; /* mcc */ 4317aa1aa6eSZhao Qiang struct qe_brg brg; /* brg */ 4327aa1aa6eSZhao Qiang struct qe_usb_ctlr usb; /* USB */ 4337aa1aa6eSZhao Qiang struct si1 si1; /* SI */ 4347aa1aa6eSZhao Qiang u8 res11[0x800]; 4357aa1aa6eSZhao Qiang struct sir sir; /* SI Routing Tables */ 4367aa1aa6eSZhao Qiang struct ucc ucc1; /* ucc1 */ 4377aa1aa6eSZhao Qiang struct ucc ucc3; /* ucc3 */ 4387aa1aa6eSZhao Qiang struct ucc ucc5; /* ucc5 */ 4397aa1aa6eSZhao Qiang struct ucc ucc7; /* ucc7 */ 4407aa1aa6eSZhao Qiang u8 res12[0x600]; 4417aa1aa6eSZhao Qiang struct upc upc1; /* MultiPHY UTOPIA POS Ctrlr 1*/ 4427aa1aa6eSZhao Qiang struct ucc ucc2; /* ucc2 */ 4437aa1aa6eSZhao Qiang struct ucc ucc4; /* ucc4 */ 4447aa1aa6eSZhao Qiang struct ucc ucc6; /* ucc6 */ 4457aa1aa6eSZhao Qiang struct ucc ucc8; /* ucc8 */ 4467aa1aa6eSZhao Qiang u8 res13[0x600]; 4477aa1aa6eSZhao Qiang struct upc upc2; /* MultiPHY UTOPIA POS Ctrlr 2*/ 4487aa1aa6eSZhao Qiang struct sdma sdma; /* SDMA */ 4497aa1aa6eSZhao Qiang struct dbg dbg; /* 0x104080 - 0x1040FF 4507aa1aa6eSZhao Qiang Debug Space */ 4517aa1aa6eSZhao Qiang struct rsp rsp[0x2]; /* 0x104100 - 0x1042FF 4527aa1aa6eSZhao Qiang RISC Special Registers 4537aa1aa6eSZhao Qiang (Trap and Breakpoint) */ 4547aa1aa6eSZhao Qiang u8 res14[0x300]; /* 0x104300 - 0x1045FF */ 4557aa1aa6eSZhao Qiang u8 res15[0x3A00]; /* 0x104600 - 0x107FFF */ 4567aa1aa6eSZhao Qiang u8 res16[0x8000]; /* 0x108000 - 0x110000 */ 4577aa1aa6eSZhao Qiang u8 muram[0xC000]; /* 0x110000 - 0x11C000 4587aa1aa6eSZhao Qiang Multi-user RAM */ 4597aa1aa6eSZhao Qiang u8 res17[0x24000]; /* 0x11C000 - 0x140000 */ 4607aa1aa6eSZhao Qiang u8 res18[0xC0000]; /* 0x140000 - 0x200000 */ 4617aa1aa6eSZhao Qiang } __attribute__ ((packed)); 4627aa1aa6eSZhao Qiang 4637aa1aa6eSZhao Qiang extern struct qe_immap __iomem *qe_immr; 4647aa1aa6eSZhao Qiang 4657aa1aa6eSZhao Qiang #endif /* __KERNEL__ */ 4667aa1aa6eSZhao Qiang #endif /* _ASM_POWERPC_IMMAP_QE_H */ 467