123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- #ifndef __IMMAP_QE_H__
- #define __IMMAP_QE_H__
- #ifdef CONFIG_MPC83xx
- #if defined(CONFIG_MPC8360)
- #define QE_MURAM_SIZE 0xc000UL
- #define MAX_QE_RISC 2
- #define QE_NUM_OF_SNUM 28
- #elif defined(CONFIG_MPC832x) || defined(CONFIG_MPC8309)
- #define QE_MURAM_SIZE 0x4000UL
- #define MAX_QE_RISC 1
- #define QE_NUM_OF_SNUM 28
- #endif
- #endif
- #ifdef CONFIG_LS102XA
- #define QE_MURAM_SIZE 0x6000UL
- #define MAX_QE_RISC 1
- #define QE_NUM_OF_SNUM 28
- #endif
- #ifdef CONFIG_PPC
- #define QE_IMMR_OFFSET 0x00140000
- #else
- #define QE_IMMR_OFFSET 0x01400000
- #endif
- typedef struct qe_iram {
- u32 iadd;
- u32 idata;
- u8 res0[0x4];
- u32 iready;
- u8 res1[0x70];
- } __attribute__ ((packed)) qe_iram_t;
- typedef struct qe_ic {
- u32 qicr;
- u32 qivec;
- u32 qripnr;
- u32 qipnr;
- u32 qipxcc;
- u32 qipycc;
- u32 qipwcc;
- u32 qipzcc;
- u32 qimr;
- u32 qrimr;
- u32 qicnr;
- u8 res0[0x4];
- u32 qiprta;
- u32 qiprtb;
- u8 res1[0x4];
- u32 qricr;
- u8 res2[0x20];
- u32 qhivec;
- u8 res3[0x1C];
- } __attribute__ ((packed)) qe_ic_t;
- typedef struct cp_qe {
- u32 cecr;
- u32 ceccr;
- u32 cecdr;
- u8 res0[0xA];
- u16 ceter;
- u8 res1[0x2];
- u16 cetmr;
- u32 cetscr;
- u32 cetsr1;
- u32 cetsr2;
- u8 res2[0x8];
- u32 cevter;
- u32 cevtmr;
- u16 cercr;
- u8 res3[0x2];
- u8 res4[0x24];
- u16 ceexe1;
- u8 res5[0x2];
- u16 ceexm1;
- u8 res6[0x2];
- u16 ceexe2;
- u8 res7[0x2];
- u16 ceexm2;
- u8 res8[0x2];
- u16 ceexe3;
- u8 res9[0x2];
- u16 ceexm3;
- u8 res10[0x2];
- u16 ceexe4;
- u8 res11[0x2];
- u16 ceexm4;
- u8 res12[0x2];
- u8 res13[0x280];
- } __attribute__ ((packed)) cp_qe_t;
- typedef struct qe_mux {
- u32 cmxgcr;
- u32 cmxsi1cr_l;
- u32 cmxsi1cr_h;
- u32 cmxsi1syr;
- u32 cmxucr1;
- u32 cmxucr2;
- u32 cmxucr3;
- u32 cmxucr4;
- u32 cmxupcr;
- u8 res0[0x1C];
- } __attribute__ ((packed)) qe_mux_t;
- typedef struct qe_timers {
- u8 gtcfr1;
- u8 res0[0x3];
- u8 gtcfr2;
- u8 res1[0xB];
- u16 gtmdr1;
- u16 gtmdr2;
- u16 gtrfr1;
- u16 gtrfr2;
- u16 gtcpr1;
- u16 gtcpr2;
- u16 gtcnr1;
- u16 gtcnr2;
- u16 gtmdr3;
- u16 gtmdr4;
- u16 gtrfr3;
- u16 gtrfr4;
- u16 gtcpr3;
- u16 gtcpr4;
- u16 gtcnr3;
- u16 gtcnr4;
- u16 gtevr1;
- u16 gtevr2;
- u16 gtevr3;
- u16 gtevr4;
- u16 gtps;
- u8 res2[0x46];
- } __attribute__ ((packed)) qe_timers_t;
- typedef struct qe_brg {
- u32 brgc1;
- u32 brgc2;
- u32 brgc3;
- u32 brgc4;
- u32 brgc5;
- u32 brgc6;
- u32 brgc7;
- u32 brgc8;
- u32 brgc9;
- u32 brgc10;
- u32 brgc11;
- u32 brgc12;
- u32 brgc13;
- u32 brgc14;
- u32 brgc15;
- u32 brgc16;
- u8 res0[0x40];
- } __attribute__ ((packed)) qe_brg_t;
- typedef struct spi {
- u8 res0[0x20];
- u32 spmode;
- u8 res1[0x2];
- u8 spie;
- u8 res2[0x1];
- u8 res3[0x2];
- u8 spim;
- u8 res4[0x1];
- u8 res5[0x1];
- u8 spcom;
- u8 res6[0x2];
- u32 spitd;
- u32 spird;
- u8 res7[0x8];
- } __attribute__ ((packed)) spi_t;
- typedef struct si1 {
- u16 siamr1;
- u16 sibmr1;
- u16 sicmr1;
- u16 sidmr1;
- u8 siglmr1_h;
- u8 res0[0x1];
- u8 sicmdr1_h;
- u8 res2[0x1];
- u8 sistr1_h;
- u8 res3[0x1];
- u16 sirsr1_h;
- u8 sitarc1;
- u8 sitbrc1;
- u8 sitcrc1;
- u8 sitdrc1;
- u8 sirarc1;
- u8 sirbrc1;
- u8 sircrc1;
- u8 sirdrc1;
- u8 res4[0x8];
- u16 siemr1;
- u16 sifmr1;
- u16 sigmr1;
- u16 sihmr1;
- u8 siglmg1_l;
- u8 res5[0x1];
- u8 sicmdr1_l;
- u8 res6[0x1];
- u8 sistr1_l;
- u8 res7[0x1];
- u16 sirsr1_l;
- u8 siterc1;
- u8 sitfrc1;
- u8 sitgrc1;
- u8 sithrc1;
- u8 sirerc1;
- u8 sirfrc1;
- u8 sirgrc1;
- u8 sirhrc1;
- u8 res8[0x8];
- u32 siml1;
- u8 siedm1;
- u8 res9[0xBB];
- } __attribute__ ((packed)) si1_t;
- typedef struct sir {
- u8 tx[0x400];
- u8 rx[0x400];
- u8 res0[0x800];
- } __attribute__ ((packed)) sir_t;
- typedef struct usb_ctlr {
- u8 usb_usmod;
- u8 usb_usadr;
- u8 usb_uscom;
- u8 res1[1];
- u16 usb_usep1;
- u16 usb_usep2;
- u16 usb_usep3;
- u16 usb_usep4;
- u8 res2[4];
- u16 usb_usber;
- u8 res3[2];
- u16 usb_usbmr;
- u8 res4[1];
- u8 usb_usbs;
- u16 usb_ussft;
- u8 res5[2];
- u16 usb_usfrn;
- u8 res6[0x22];
- } __attribute__ ((packed)) usb_t;
- typedef struct mcc {
- u32 mcce;
- u32 mccm;
- u32 mccf;
- u32 merl;
- u8 res0[0xF0];
- } __attribute__ ((packed)) mcc_t;
- typedef struct ucc_slow {
- u32 gumr_l;
- u32 gumr_h;
- u16 upsmr;
- u8 res0[0x2];
- u16 utodr;
- u16 udsr;
- u16 ucce;
- u8 res1[0x2];
- u16 uccm;
- u8 res2[0x1];
- u8 uccs;
- u8 res3[0x24];
- u16 utpt;
- u8 guemr;
- u8 res4[0x200 - 0x091];
- } __attribute__ ((packed)) ucc_slow_t;
- typedef struct ucc_mii_mng {
- u32 miimcfg;
- u32 miimcom;
- u32 miimadd;
- u32 miimcon;
- u32 miimstat;
- u32 miimind;
- u32 ifctl;
- u32 ifstat;
- } __attribute__ ((packed))uec_mii_t;
- typedef struct ucc_ethernet {
- u32 maccfg1;
- u32 maccfg2;
- u32 ipgifg;
- u32 hafdup;
- u8 res1[0x10];
- u32 miimcfg;
- u32 miimcom;
- u32 miimadd;
- u32 miimcon;
- u32 miimstat;
- u32 miimind;
- u32 ifctl;
- u32 ifstat;
- u32 macstnaddr1;
- u32 macstnaddr2;
- u8 res2[0x8];
- u32 uempr;
- u32 utbipar;
- u16 uescr;
- u8 res3[0x180 - 0x15A];
- u32 tx64;
- u32 tx127;
- u32 tx255;
- u32 rx64;
- u32 rx127;
- u32 rx255;
- u32 txok;
- u16 txcf;
- u8 res4[0x2];
- u32 tmca;
- u32 tbca;
- u32 rxfok;
- u32 rxbok;
- u32 rbyt;
- u32 rmca;
- u32 rbca;
- u32 scar;
- u32 scam;
- u8 res5[0x200 - 0x1c4];
- } __attribute__ ((packed)) uec_t;
- typedef struct ucc_fast {
- u32 gumr;
- u32 upsmr;
- u16 utodr;
- u8 res0[0x2];
- u16 udsr;
- u8 res1[0x2];
- u32 ucce;
- u32 uccm;
- u8 uccs;
- u8 res2[0x7];
- u32 urfb;
- u16 urfs;
- u8 res3[0x2];
- u16 urfet;
- u16 urfset;
- u32 utfb;
- u16 utfs;
- u8 res4[0x2];
- u16 utfet;
- u8 res5[0x2];
- u16 utftt;
- u8 res6[0x2];
- u16 utpt;
- u8 res7[0x2];
- u32 urtry;
- u8 res8[0x4C];
- u8 guemr;
- u8 res9[0x100 - 0x091];
- uec_t ucc_eth;
- } __attribute__ ((packed)) ucc_fast_t;
- typedef struct ucc_common {
- u8 res1[0x90];
- u8 guemr;
- u8 res2[0x200 - 0x091];
- } __attribute__ ((packed)) ucc_common_t;
- typedef struct ucc {
- union {
- ucc_slow_t slow;
- ucc_fast_t fast;
- ucc_common_t common;
- };
- } __attribute__ ((packed)) ucc_t;
- typedef struct upc {
- u32 upgcr;
- u32 uplpa;
- u32 uphec;
- u32 upuc;
- u32 updc1;
- u32 updc2;
- u32 updc3;
- u32 updc4;
- u32 upstpa;
- u8 res0[0xC];
- u32 updrs1_h;
- u32 updrs1_l;
- u32 updrs2_h;
- u32 updrs2_l;
- u32 updrs3_h;
- u32 updrs3_l;
- u32 updrs4_h;
- u32 updrs4_l;
- u32 updrp1;
- u32 updrp2;
- u32 updrp3;
- u32 updrp4;
- u32 upde1;
- u32 upde2;
- u32 upde3;
- u32 upde4;
- u16 uprp1;
- u16 uprp2;
- u16 uprp3;
- u16 uprp4;
- u8 res1[0x8];
- u16 uptirr1_0;
- u16 uptirr1_1;
- u16 uptirr1_2;
- u16 uptirr1_3;
- u16 uptirr2_0;
- u16 uptirr2_1;
- u16 uptirr2_2;
- u16 uptirr2_3;
- u16 uptirr3_0;
- u16 uptirr3_1;
- u16 uptirr3_2;
- u16 uptirr3_3;
- u16 uptirr4_0;
- u16 uptirr4_1;
- u16 uptirr4_2;
- u16 uptirr4_3;
- u32 uper1;
- u32 uper2;
- u32 uper3;
- u32 uper4;
- u8 res2[0x150];
- } __attribute__ ((packed)) upc_t;
- typedef struct sdma {
- u32 sdsr;
- u32 sdmr;
- u32 sdtr1;
- u32 sdtr2;
- u32 sdhy1;
- u32 sdhy2;
- u32 sdta1;
- u32 sdta2;
- u32 sdtm1;
- u32 sdtm2;
- u8 res0[0x10];
- u32 sdaqr;
- u32 sdaqmr;
- u8 res1[0x4];
- u32 sdwbcr;
- u8 res2[0x38];
- } __attribute__ ((packed)) sdma_t;
- typedef struct dbg {
- u32 bpdcr;
- u32 bpdsr;
- u32 bpdmr;
- u32 bprmrr0;
- u32 bprmrr1;
- u8 res0[0x8];
- u32 bprmtr0;
- u32 bprmtr1;
- u8 res1[0x8];
- u32 bprmir;
- u32 bprmsr;
- u32 bpemr;
- u8 res2[0x48];
- } __attribute__ ((packed)) dbg_t;
- typedef struct rsp {
- u32 tibcr[16];
- u8 res0[64];
- u32 ibcr0;
- u32 ibs0;
- u32 ibcnr0;
- u8 res1[4];
- u32 ibcr1;
- u32 ibs1;
- u32 ibcnr1;
- u32 npcr;
- u32 dbcr;
- u32 dbar;
- u32 dbamr;
- u32 dbsr;
- u32 dbcnr;
- u8 res2[12];
- u32 dbdr_h;
- u32 dbdr_l;
- u32 dbdmr_h;
- u32 dbdmr_l;
- u32 bsr;
- u32 bor;
- u32 bior;
- u8 res3[4];
- u32 iatr[4];
- u32 eccr;
- u32 eicr;
- u8 res4[0x100-0xf8];
- } __attribute__ ((packed)) rsp_t;
- typedef struct qe_immap {
- qe_iram_t iram;
- qe_ic_t ic;
- cp_qe_t cp;
- qe_mux_t qmx;
- qe_timers_t qet;
- spi_t spi[0x2];
- mcc_t mcc;
- qe_brg_t brg;
- usb_t usb;
- si1_t si1;
- u8 res11[0x800];
- sir_t sir;
- ucc_t ucc1;
- ucc_t ucc3;
- ucc_t ucc5;
- ucc_t ucc7;
- u8 res12[0x600];
- upc_t upc1;
- ucc_t ucc2;
- ucc_t ucc4;
- ucc_t ucc6;
- ucc_t ucc8;
- u8 res13[0x600];
- upc_t upc2;
- sdma_t sdma;
- dbg_t dbg;
- rsp_t rsp[0x2];
- u8 res14[0x300];
- u8 res15[0x3A00];
- u8 res16[0x8000];
- u8 muram[QE_MURAM_SIZE];
- } __attribute__ ((packed)) qe_map_t;
- extern qe_map_t *qe_immr;
- #endif
|