162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * MPC8xx Internal Memory Map 362306a36Sopenharmony_ci * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * The I/O on the MPC860 is comprised of blocks of special registers 662306a36Sopenharmony_ci * and the dual port ram for the Communication Processor Module. 762306a36Sopenharmony_ci * Within this space are functional units such as the SIU, memory 862306a36Sopenharmony_ci * controller, system timers, and other control functions. It is 962306a36Sopenharmony_ci * a combination that I found difficult to separate into logical 1062306a36Sopenharmony_ci * functional files.....but anyone else is welcome to try. -- Dan 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci#ifdef __KERNEL__ 1362306a36Sopenharmony_ci#ifndef __IMMAP_8XX__ 1462306a36Sopenharmony_ci#define __IMMAP_8XX__ 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci/* System configuration registers. 1762306a36Sopenharmony_ci*/ 1862306a36Sopenharmony_citypedef struct sys_conf { 1962306a36Sopenharmony_ci uint sc_siumcr; 2062306a36Sopenharmony_ci uint sc_sypcr; 2162306a36Sopenharmony_ci uint sc_swt; 2262306a36Sopenharmony_ci char res1[2]; 2362306a36Sopenharmony_ci ushort sc_swsr; 2462306a36Sopenharmony_ci uint sc_sipend; 2562306a36Sopenharmony_ci uint sc_simask; 2662306a36Sopenharmony_ci uint sc_siel; 2762306a36Sopenharmony_ci uint sc_sivec; 2862306a36Sopenharmony_ci uint sc_tesr; 2962306a36Sopenharmony_ci char res2[0xc]; 3062306a36Sopenharmony_ci uint sc_sdcr; 3162306a36Sopenharmony_ci char res3[0x4c]; 3262306a36Sopenharmony_ci} sysconf8xx_t; 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* PCMCIA configuration registers. 3562306a36Sopenharmony_ci*/ 3662306a36Sopenharmony_citypedef struct pcmcia_conf { 3762306a36Sopenharmony_ci uint pcmc_pbr0; 3862306a36Sopenharmony_ci uint pcmc_por0; 3962306a36Sopenharmony_ci uint pcmc_pbr1; 4062306a36Sopenharmony_ci uint pcmc_por1; 4162306a36Sopenharmony_ci uint pcmc_pbr2; 4262306a36Sopenharmony_ci uint pcmc_por2; 4362306a36Sopenharmony_ci uint pcmc_pbr3; 4462306a36Sopenharmony_ci uint pcmc_por3; 4562306a36Sopenharmony_ci uint pcmc_pbr4; 4662306a36Sopenharmony_ci uint pcmc_por4; 4762306a36Sopenharmony_ci uint pcmc_pbr5; 4862306a36Sopenharmony_ci uint pcmc_por5; 4962306a36Sopenharmony_ci uint pcmc_pbr6; 5062306a36Sopenharmony_ci uint pcmc_por6; 5162306a36Sopenharmony_ci uint pcmc_pbr7; 5262306a36Sopenharmony_ci uint pcmc_por7; 5362306a36Sopenharmony_ci char res1[0x20]; 5462306a36Sopenharmony_ci uint pcmc_pgcra; 5562306a36Sopenharmony_ci uint pcmc_pgcrb; 5662306a36Sopenharmony_ci uint pcmc_pscr; 5762306a36Sopenharmony_ci char res2[4]; 5862306a36Sopenharmony_ci uint pcmc_pipr; 5962306a36Sopenharmony_ci char res3[4]; 6062306a36Sopenharmony_ci uint pcmc_per; 6162306a36Sopenharmony_ci char res4[4]; 6262306a36Sopenharmony_ci} pcmconf8xx_t; 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci/* Memory controller registers. 6562306a36Sopenharmony_ci*/ 6662306a36Sopenharmony_citypedef struct mem_ctlr { 6762306a36Sopenharmony_ci uint memc_br0; 6862306a36Sopenharmony_ci uint memc_or0; 6962306a36Sopenharmony_ci uint memc_br1; 7062306a36Sopenharmony_ci uint memc_or1; 7162306a36Sopenharmony_ci uint memc_br2; 7262306a36Sopenharmony_ci uint memc_or2; 7362306a36Sopenharmony_ci uint memc_br3; 7462306a36Sopenharmony_ci uint memc_or3; 7562306a36Sopenharmony_ci uint memc_br4; 7662306a36Sopenharmony_ci uint memc_or4; 7762306a36Sopenharmony_ci uint memc_br5; 7862306a36Sopenharmony_ci uint memc_or5; 7962306a36Sopenharmony_ci uint memc_br6; 8062306a36Sopenharmony_ci uint memc_or6; 8162306a36Sopenharmony_ci uint memc_br7; 8262306a36Sopenharmony_ci uint memc_or7; 8362306a36Sopenharmony_ci char res1[0x24]; 8462306a36Sopenharmony_ci uint memc_mar; 8562306a36Sopenharmony_ci uint memc_mcr; 8662306a36Sopenharmony_ci char res2[4]; 8762306a36Sopenharmony_ci uint memc_mamr; 8862306a36Sopenharmony_ci uint memc_mbmr; 8962306a36Sopenharmony_ci ushort memc_mstat; 9062306a36Sopenharmony_ci ushort memc_mptpr; 9162306a36Sopenharmony_ci uint memc_mdr; 9262306a36Sopenharmony_ci char res3[0x80]; 9362306a36Sopenharmony_ci} memctl8xx_t; 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci/*----------------------------------------------------------------------- 9662306a36Sopenharmony_ci * BR - Memory Controller: Base Register 16-9 9762306a36Sopenharmony_ci */ 9862306a36Sopenharmony_ci#define BR_BA_MSK 0xffff8000 /* Base Address Mask */ 9962306a36Sopenharmony_ci#define BR_AT_MSK 0x00007000 /* Address Type Mask */ 10062306a36Sopenharmony_ci#define BR_PS_MSK 0x00000c00 /* Port Size Mask */ 10162306a36Sopenharmony_ci#define BR_PS_32 0x00000000 /* 32 bit port size */ 10262306a36Sopenharmony_ci#define BR_PS_16 0x00000800 /* 16 bit port size */ 10362306a36Sopenharmony_ci#define BR_PS_8 0x00000400 /* 8 bit port size */ 10462306a36Sopenharmony_ci#define BR_PARE 0x00000200 /* Parity Enable */ 10562306a36Sopenharmony_ci#define BR_WP 0x00000100 /* Write Protect */ 10662306a36Sopenharmony_ci#define BR_MS_MSK 0x000000c0 /* Machine Select Mask */ 10762306a36Sopenharmony_ci#define BR_MS_GPCM 0x00000000 /* G.P.C.M. Machine Select */ 10862306a36Sopenharmony_ci#define BR_MS_UPMA 0x00000080 /* U.P.M.A Machine Select */ 10962306a36Sopenharmony_ci#define BR_MS_UPMB 0x000000c0 /* U.P.M.B Machine Select */ 11062306a36Sopenharmony_ci#define BR_V 0x00000001 /* Bank Valid */ 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci/*----------------------------------------------------------------------- 11362306a36Sopenharmony_ci * OR - Memory Controller: Option Register 16-11 11462306a36Sopenharmony_ci */ 11562306a36Sopenharmony_ci#define OR_AM_MSK 0xffff8000 /* Address Mask Mask */ 11662306a36Sopenharmony_ci#define OR_ATM_MSK 0x00007000 /* Address Type Mask Mask */ 11762306a36Sopenharmony_ci#define OR_CSNT_SAM 0x00000800 /* Chip Select Negation Time/ Start */ 11862306a36Sopenharmony_ci /* Address Multiplex */ 11962306a36Sopenharmony_ci#define OR_ACS_MSK 0x00000600 /* Address to Chip Select Setup mask */ 12062306a36Sopenharmony_ci#define OR_ACS_DIV1 0x00000000 /* CS is output at the same time */ 12162306a36Sopenharmony_ci#define OR_ACS_DIV4 0x00000400 /* CS is output 1/4 a clock later */ 12262306a36Sopenharmony_ci#define OR_ACS_DIV2 0x00000600 /* CS is output 1/2 a clock later */ 12362306a36Sopenharmony_ci#define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */ 12462306a36Sopenharmony_ci#define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/ 12562306a36Sopenharmony_ci#define OR_BI 0x00000100 /* Burst inhibit */ 12662306a36Sopenharmony_ci#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */ 12762306a36Sopenharmony_ci#define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */ 12862306a36Sopenharmony_ci#define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */ 12962306a36Sopenharmony_ci#define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */ 13062306a36Sopenharmony_ci#define OR_SCY_3_CLK 0x00000030 /* 3 clock cycles wait states */ 13162306a36Sopenharmony_ci#define OR_SCY_4_CLK 0x00000040 /* 4 clock cycles wait states */ 13262306a36Sopenharmony_ci#define OR_SCY_5_CLK 0x00000050 /* 5 clock cycles wait states */ 13362306a36Sopenharmony_ci#define OR_SCY_6_CLK 0x00000060 /* 6 clock cycles wait states */ 13462306a36Sopenharmony_ci#define OR_SCY_7_CLK 0x00000070 /* 7 clock cycles wait states */ 13562306a36Sopenharmony_ci#define OR_SCY_8_CLK 0x00000080 /* 8 clock cycles wait states */ 13662306a36Sopenharmony_ci#define OR_SCY_9_CLK 0x00000090 /* 9 clock cycles wait states */ 13762306a36Sopenharmony_ci#define OR_SCY_10_CLK 0x000000a0 /* 10 clock cycles wait states */ 13862306a36Sopenharmony_ci#define OR_SCY_11_CLK 0x000000b0 /* 11 clock cycles wait states */ 13962306a36Sopenharmony_ci#define OR_SCY_12_CLK 0x000000c0 /* 12 clock cycles wait states */ 14062306a36Sopenharmony_ci#define OR_SCY_13_CLK 0x000000d0 /* 13 clock cycles wait states */ 14162306a36Sopenharmony_ci#define OR_SCY_14_CLK 0x000000e0 /* 14 clock cycles wait states */ 14262306a36Sopenharmony_ci#define OR_SCY_15_CLK 0x000000f0 /* 15 clock cycles wait states */ 14362306a36Sopenharmony_ci#define OR_SETA 0x00000008 /* External Transfer Acknowledge */ 14462306a36Sopenharmony_ci#define OR_TRLX 0x00000004 /* Timing Relaxed */ 14562306a36Sopenharmony_ci#define OR_EHTR 0x00000002 /* Extended Hold Time on Read */ 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci/* System Integration Timers. 14862306a36Sopenharmony_ci*/ 14962306a36Sopenharmony_citypedef struct sys_int_timers { 15062306a36Sopenharmony_ci ushort sit_tbscr; 15162306a36Sopenharmony_ci char res0[0x02]; 15262306a36Sopenharmony_ci uint sit_tbreff0; 15362306a36Sopenharmony_ci uint sit_tbreff1; 15462306a36Sopenharmony_ci char res1[0x14]; 15562306a36Sopenharmony_ci ushort sit_rtcsc; 15662306a36Sopenharmony_ci char res2[0x02]; 15762306a36Sopenharmony_ci uint sit_rtc; 15862306a36Sopenharmony_ci uint sit_rtsec; 15962306a36Sopenharmony_ci uint sit_rtcal; 16062306a36Sopenharmony_ci char res3[0x10]; 16162306a36Sopenharmony_ci ushort sit_piscr; 16262306a36Sopenharmony_ci char res4[2]; 16362306a36Sopenharmony_ci uint sit_pitc; 16462306a36Sopenharmony_ci uint sit_pitr; 16562306a36Sopenharmony_ci char res5[0x34]; 16662306a36Sopenharmony_ci} sit8xx_t; 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci#define TBSCR_TBIRQ_MASK ((ushort)0xff00) 16962306a36Sopenharmony_ci#define TBSCR_REFA ((ushort)0x0080) 17062306a36Sopenharmony_ci#define TBSCR_REFB ((ushort)0x0040) 17162306a36Sopenharmony_ci#define TBSCR_REFAE ((ushort)0x0008) 17262306a36Sopenharmony_ci#define TBSCR_REFBE ((ushort)0x0004) 17362306a36Sopenharmony_ci#define TBSCR_TBF ((ushort)0x0002) 17462306a36Sopenharmony_ci#define TBSCR_TBE ((ushort)0x0001) 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci#define RTCSC_RTCIRQ_MASK ((ushort)0xff00) 17762306a36Sopenharmony_ci#define RTCSC_SEC ((ushort)0x0080) 17862306a36Sopenharmony_ci#define RTCSC_ALR ((ushort)0x0040) 17962306a36Sopenharmony_ci#define RTCSC_38K ((ushort)0x0010) 18062306a36Sopenharmony_ci#define RTCSC_SIE ((ushort)0x0008) 18162306a36Sopenharmony_ci#define RTCSC_ALE ((ushort)0x0004) 18262306a36Sopenharmony_ci#define RTCSC_RTF ((ushort)0x0002) 18362306a36Sopenharmony_ci#define RTCSC_RTE ((ushort)0x0001) 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci#define PISCR_PIRQ_MASK ((ushort)0xff00) 18662306a36Sopenharmony_ci#define PISCR_PS ((ushort)0x0080) 18762306a36Sopenharmony_ci#define PISCR_PIE ((ushort)0x0004) 18862306a36Sopenharmony_ci#define PISCR_PTF ((ushort)0x0002) 18962306a36Sopenharmony_ci#define PISCR_PTE ((ushort)0x0001) 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci/* Clocks and Reset. 19262306a36Sopenharmony_ci*/ 19362306a36Sopenharmony_citypedef struct clk_and_reset { 19462306a36Sopenharmony_ci uint car_sccr; 19562306a36Sopenharmony_ci uint car_plprcr; 19662306a36Sopenharmony_ci uint car_rsr; 19762306a36Sopenharmony_ci char res[0x74]; /* Reserved area */ 19862306a36Sopenharmony_ci} car8xx_t; 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* System Integration Timers keys. 20162306a36Sopenharmony_ci*/ 20262306a36Sopenharmony_citypedef struct sitk { 20362306a36Sopenharmony_ci uint sitk_tbscrk; 20462306a36Sopenharmony_ci uint sitk_tbreff0k; 20562306a36Sopenharmony_ci uint sitk_tbreff1k; 20662306a36Sopenharmony_ci uint sitk_tbk; 20762306a36Sopenharmony_ci char res1[0x10]; 20862306a36Sopenharmony_ci uint sitk_rtcsck; 20962306a36Sopenharmony_ci uint sitk_rtck; 21062306a36Sopenharmony_ci uint sitk_rtseck; 21162306a36Sopenharmony_ci uint sitk_rtcalk; 21262306a36Sopenharmony_ci char res2[0x10]; 21362306a36Sopenharmony_ci uint sitk_piscrk; 21462306a36Sopenharmony_ci uint sitk_pitck; 21562306a36Sopenharmony_ci char res3[0x38]; 21662306a36Sopenharmony_ci} sitk8xx_t; 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ci/* Clocks and reset keys. 21962306a36Sopenharmony_ci*/ 22062306a36Sopenharmony_citypedef struct cark { 22162306a36Sopenharmony_ci uint cark_sccrk; 22262306a36Sopenharmony_ci uint cark_plprcrk; 22362306a36Sopenharmony_ci uint cark_rsrk; 22462306a36Sopenharmony_ci char res[0x474]; 22562306a36Sopenharmony_ci} cark8xx_t; 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci/* The key to unlock registers maintained by keep-alive power. 22862306a36Sopenharmony_ci*/ 22962306a36Sopenharmony_ci#define KAPWR_KEY ((unsigned int)0x55ccaa33) 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci/* Video interface. MPC823 Only. 23262306a36Sopenharmony_ci*/ 23362306a36Sopenharmony_citypedef struct vid823 { 23462306a36Sopenharmony_ci ushort vid_vccr; 23562306a36Sopenharmony_ci ushort res1; 23662306a36Sopenharmony_ci u_char vid_vsr; 23762306a36Sopenharmony_ci u_char res2; 23862306a36Sopenharmony_ci u_char vid_vcmr; 23962306a36Sopenharmony_ci u_char res3; 24062306a36Sopenharmony_ci uint vid_vbcb; 24162306a36Sopenharmony_ci uint res4; 24262306a36Sopenharmony_ci uint vid_vfcr0; 24362306a36Sopenharmony_ci uint vid_vfaa0; 24462306a36Sopenharmony_ci uint vid_vfba0; 24562306a36Sopenharmony_ci uint vid_vfcr1; 24662306a36Sopenharmony_ci uint vid_vfaa1; 24762306a36Sopenharmony_ci uint vid_vfba1; 24862306a36Sopenharmony_ci u_char res5[0x18]; 24962306a36Sopenharmony_ci} vid823_t; 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci/* LCD interface. 823 Only. 25262306a36Sopenharmony_ci*/ 25362306a36Sopenharmony_citypedef struct lcd { 25462306a36Sopenharmony_ci uint lcd_lccr; 25562306a36Sopenharmony_ci uint lcd_lchcr; 25662306a36Sopenharmony_ci uint lcd_lcvcr; 25762306a36Sopenharmony_ci char res1[4]; 25862306a36Sopenharmony_ci uint lcd_lcfaa; 25962306a36Sopenharmony_ci uint lcd_lcfba; 26062306a36Sopenharmony_ci char lcd_lcsr; 26162306a36Sopenharmony_ci char res2[0x7]; 26262306a36Sopenharmony_ci} lcd823_t; 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci/* I2C 26562306a36Sopenharmony_ci*/ 26662306a36Sopenharmony_citypedef struct i2c { 26762306a36Sopenharmony_ci u_char i2c_i2mod; 26862306a36Sopenharmony_ci char res1[3]; 26962306a36Sopenharmony_ci u_char i2c_i2add; 27062306a36Sopenharmony_ci char res2[3]; 27162306a36Sopenharmony_ci u_char i2c_i2brg; 27262306a36Sopenharmony_ci char res3[3]; 27362306a36Sopenharmony_ci u_char i2c_i2com; 27462306a36Sopenharmony_ci char res4[3]; 27562306a36Sopenharmony_ci u_char i2c_i2cer; 27662306a36Sopenharmony_ci char res5[3]; 27762306a36Sopenharmony_ci u_char i2c_i2cmr; 27862306a36Sopenharmony_ci char res6[0x8b]; 27962306a36Sopenharmony_ci} i2c8xx_t; 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci/* DMA control/status registers. 28262306a36Sopenharmony_ci*/ 28362306a36Sopenharmony_citypedef struct sdma_csr { 28462306a36Sopenharmony_ci char res1[4]; 28562306a36Sopenharmony_ci uint sdma_sdar; 28662306a36Sopenharmony_ci u_char sdma_sdsr; 28762306a36Sopenharmony_ci char res3[3]; 28862306a36Sopenharmony_ci u_char sdma_sdmr; 28962306a36Sopenharmony_ci char res4[3]; 29062306a36Sopenharmony_ci u_char sdma_idsr1; 29162306a36Sopenharmony_ci char res5[3]; 29262306a36Sopenharmony_ci u_char sdma_idmr1; 29362306a36Sopenharmony_ci char res6[3]; 29462306a36Sopenharmony_ci u_char sdma_idsr2; 29562306a36Sopenharmony_ci char res7[3]; 29662306a36Sopenharmony_ci u_char sdma_idmr2; 29762306a36Sopenharmony_ci char res8[0x13]; 29862306a36Sopenharmony_ci} sdma8xx_t; 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci/* Communication Processor Module Interrupt Controller. 30162306a36Sopenharmony_ci*/ 30262306a36Sopenharmony_citypedef struct cpm_ic { 30362306a36Sopenharmony_ci ushort cpic_civr; 30462306a36Sopenharmony_ci char res[0xe]; 30562306a36Sopenharmony_ci uint cpic_cicr; 30662306a36Sopenharmony_ci uint cpic_cipr; 30762306a36Sopenharmony_ci uint cpic_cimr; 30862306a36Sopenharmony_ci uint cpic_cisr; 30962306a36Sopenharmony_ci} cpic8xx_t; 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci/* Input/Output Port control/status registers. 31262306a36Sopenharmony_ci*/ 31362306a36Sopenharmony_citypedef struct io_port { 31462306a36Sopenharmony_ci ushort iop_padir; 31562306a36Sopenharmony_ci ushort iop_papar; 31662306a36Sopenharmony_ci ushort iop_paodr; 31762306a36Sopenharmony_ci ushort iop_padat; 31862306a36Sopenharmony_ci char res1[8]; 31962306a36Sopenharmony_ci ushort iop_pcdir; 32062306a36Sopenharmony_ci ushort iop_pcpar; 32162306a36Sopenharmony_ci ushort iop_pcso; 32262306a36Sopenharmony_ci ushort iop_pcdat; 32362306a36Sopenharmony_ci ushort iop_pcint; 32462306a36Sopenharmony_ci char res2[6]; 32562306a36Sopenharmony_ci ushort iop_pddir; 32662306a36Sopenharmony_ci ushort iop_pdpar; 32762306a36Sopenharmony_ci char res3[2]; 32862306a36Sopenharmony_ci ushort iop_pddat; 32962306a36Sopenharmony_ci uint utmode; 33062306a36Sopenharmony_ci char res4[4]; 33162306a36Sopenharmony_ci} iop8xx_t; 33262306a36Sopenharmony_ci 33362306a36Sopenharmony_ci/* Communication Processor Module Timers 33462306a36Sopenharmony_ci*/ 33562306a36Sopenharmony_citypedef struct cpm_timers { 33662306a36Sopenharmony_ci ushort cpmt_tgcr; 33762306a36Sopenharmony_ci char res1[0xe]; 33862306a36Sopenharmony_ci ushort cpmt_tmr1; 33962306a36Sopenharmony_ci ushort cpmt_tmr2; 34062306a36Sopenharmony_ci ushort cpmt_trr1; 34162306a36Sopenharmony_ci ushort cpmt_trr2; 34262306a36Sopenharmony_ci ushort cpmt_tcr1; 34362306a36Sopenharmony_ci ushort cpmt_tcr2; 34462306a36Sopenharmony_ci ushort cpmt_tcn1; 34562306a36Sopenharmony_ci ushort cpmt_tcn2; 34662306a36Sopenharmony_ci ushort cpmt_tmr3; 34762306a36Sopenharmony_ci ushort cpmt_tmr4; 34862306a36Sopenharmony_ci ushort cpmt_trr3; 34962306a36Sopenharmony_ci ushort cpmt_trr4; 35062306a36Sopenharmony_ci ushort cpmt_tcr3; 35162306a36Sopenharmony_ci ushort cpmt_tcr4; 35262306a36Sopenharmony_ci ushort cpmt_tcn3; 35362306a36Sopenharmony_ci ushort cpmt_tcn4; 35462306a36Sopenharmony_ci ushort cpmt_ter1; 35562306a36Sopenharmony_ci ushort cpmt_ter2; 35662306a36Sopenharmony_ci ushort cpmt_ter3; 35762306a36Sopenharmony_ci ushort cpmt_ter4; 35862306a36Sopenharmony_ci char res2[8]; 35962306a36Sopenharmony_ci} cpmtimer8xx_t; 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci/* Finally, the Communication Processor stuff..... 36262306a36Sopenharmony_ci*/ 36362306a36Sopenharmony_citypedef struct scc { /* Serial communication channels */ 36462306a36Sopenharmony_ci uint scc_gsmrl; 36562306a36Sopenharmony_ci uint scc_gsmrh; 36662306a36Sopenharmony_ci ushort scc_psmr; 36762306a36Sopenharmony_ci char res1[2]; 36862306a36Sopenharmony_ci ushort scc_todr; 36962306a36Sopenharmony_ci ushort scc_dsr; 37062306a36Sopenharmony_ci ushort scc_scce; 37162306a36Sopenharmony_ci char res2[2]; 37262306a36Sopenharmony_ci ushort scc_sccm; 37362306a36Sopenharmony_ci char res3; 37462306a36Sopenharmony_ci u_char scc_sccs; 37562306a36Sopenharmony_ci char res4[8]; 37662306a36Sopenharmony_ci} scc_t; 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_citypedef struct smc { /* Serial management channels */ 37962306a36Sopenharmony_ci char res1[2]; 38062306a36Sopenharmony_ci ushort smc_smcmr; 38162306a36Sopenharmony_ci char res2[2]; 38262306a36Sopenharmony_ci u_char smc_smce; 38362306a36Sopenharmony_ci char res3[3]; 38462306a36Sopenharmony_ci u_char smc_smcm; 38562306a36Sopenharmony_ci char res4[5]; 38662306a36Sopenharmony_ci} smc_t; 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_ci/* MPC860T Fast Ethernet Controller. It isn't part of the CPM, but 38962306a36Sopenharmony_ci * it fits within the address space. 39062306a36Sopenharmony_ci */ 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_citypedef struct fec { 39362306a36Sopenharmony_ci uint fec_addr_low; /* lower 32 bits of station address */ 39462306a36Sopenharmony_ci ushort fec_addr_high; /* upper 16 bits of station address */ 39562306a36Sopenharmony_ci ushort res1; /* reserved */ 39662306a36Sopenharmony_ci uint fec_grp_hash_table_high; /* upper 32-bits of hash table */ 39762306a36Sopenharmony_ci uint fec_grp_hash_table_low; /* lower 32-bits of hash table */ 39862306a36Sopenharmony_ci uint fec_r_des_start; /* beginning of Rx descriptor ring */ 39962306a36Sopenharmony_ci uint fec_x_des_start; /* beginning of Tx descriptor ring */ 40062306a36Sopenharmony_ci uint fec_r_buff_size; /* Rx buffer size */ 40162306a36Sopenharmony_ci uint res2[9]; /* reserved */ 40262306a36Sopenharmony_ci uint fec_ecntrl; /* ethernet control register */ 40362306a36Sopenharmony_ci uint fec_ievent; /* interrupt event register */ 40462306a36Sopenharmony_ci uint fec_imask; /* interrupt mask register */ 40562306a36Sopenharmony_ci uint fec_ivec; /* interrupt level and vector status */ 40662306a36Sopenharmony_ci uint fec_r_des_active; /* Rx ring updated flag */ 40762306a36Sopenharmony_ci uint fec_x_des_active; /* Tx ring updated flag */ 40862306a36Sopenharmony_ci uint res3[10]; /* reserved */ 40962306a36Sopenharmony_ci uint fec_mii_data; /* MII data register */ 41062306a36Sopenharmony_ci uint fec_mii_speed; /* MII speed control register */ 41162306a36Sopenharmony_ci uint res4[17]; /* reserved */ 41262306a36Sopenharmony_ci uint fec_r_bound; /* end of RAM (read-only) */ 41362306a36Sopenharmony_ci uint fec_r_fstart; /* Rx FIFO start address */ 41462306a36Sopenharmony_ci uint res5[6]; /* reserved */ 41562306a36Sopenharmony_ci uint fec_x_fstart; /* Tx FIFO start address */ 41662306a36Sopenharmony_ci uint res6[17]; /* reserved */ 41762306a36Sopenharmony_ci uint fec_fun_code; /* fec SDMA function code */ 41862306a36Sopenharmony_ci uint res7[3]; /* reserved */ 41962306a36Sopenharmony_ci uint fec_r_cntrl; /* Rx control register */ 42062306a36Sopenharmony_ci uint fec_r_hash; /* Rx hash register */ 42162306a36Sopenharmony_ci uint res8[14]; /* reserved */ 42262306a36Sopenharmony_ci uint fec_x_cntrl; /* Tx control register */ 42362306a36Sopenharmony_ci uint res9[0x1e]; /* reserved */ 42462306a36Sopenharmony_ci} fec_t; 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_ci/* The FEC and LCD color map share the same address space.... 42762306a36Sopenharmony_ci * I guess we will never see an 823T :-). 42862306a36Sopenharmony_ci */ 42962306a36Sopenharmony_ciunion fec_lcd { 43062306a36Sopenharmony_ci fec_t fl_un_fec; 43162306a36Sopenharmony_ci u_char fl_un_cmap[0x200]; 43262306a36Sopenharmony_ci}; 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_citypedef struct comm_proc { 43562306a36Sopenharmony_ci /* General control and status registers. 43662306a36Sopenharmony_ci */ 43762306a36Sopenharmony_ci ushort cp_cpcr; 43862306a36Sopenharmony_ci u_char res1[2]; 43962306a36Sopenharmony_ci ushort cp_rccr; 44062306a36Sopenharmony_ci u_char res2; 44162306a36Sopenharmony_ci u_char cp_rmds; 44262306a36Sopenharmony_ci u_char res3[4]; 44362306a36Sopenharmony_ci ushort cp_cpmcr1; 44462306a36Sopenharmony_ci ushort cp_cpmcr2; 44562306a36Sopenharmony_ci ushort cp_cpmcr3; 44662306a36Sopenharmony_ci ushort cp_cpmcr4; 44762306a36Sopenharmony_ci u_char res4[2]; 44862306a36Sopenharmony_ci ushort cp_rter; 44962306a36Sopenharmony_ci u_char res5[2]; 45062306a36Sopenharmony_ci ushort cp_rtmr; 45162306a36Sopenharmony_ci u_char res6[0x14]; 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci /* Baud rate generators. 45462306a36Sopenharmony_ci */ 45562306a36Sopenharmony_ci uint cp_brgc1; 45662306a36Sopenharmony_ci uint cp_brgc2; 45762306a36Sopenharmony_ci uint cp_brgc3; 45862306a36Sopenharmony_ci uint cp_brgc4; 45962306a36Sopenharmony_ci 46062306a36Sopenharmony_ci /* Serial Communication Channels. 46162306a36Sopenharmony_ci */ 46262306a36Sopenharmony_ci scc_t cp_scc[4]; 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ci /* Serial Management Channels. 46562306a36Sopenharmony_ci */ 46662306a36Sopenharmony_ci smc_t cp_smc[2]; 46762306a36Sopenharmony_ci 46862306a36Sopenharmony_ci /* Serial Peripheral Interface. 46962306a36Sopenharmony_ci */ 47062306a36Sopenharmony_ci ushort cp_spmode; 47162306a36Sopenharmony_ci u_char res7[4]; 47262306a36Sopenharmony_ci u_char cp_spie; 47362306a36Sopenharmony_ci u_char res8[3]; 47462306a36Sopenharmony_ci u_char cp_spim; 47562306a36Sopenharmony_ci u_char res9[2]; 47662306a36Sopenharmony_ci u_char cp_spcom; 47762306a36Sopenharmony_ci u_char res10[2]; 47862306a36Sopenharmony_ci 47962306a36Sopenharmony_ci /* Parallel Interface Port. 48062306a36Sopenharmony_ci */ 48162306a36Sopenharmony_ci u_char res11[2]; 48262306a36Sopenharmony_ci ushort cp_pipc; 48362306a36Sopenharmony_ci u_char res12[2]; 48462306a36Sopenharmony_ci ushort cp_ptpr; 48562306a36Sopenharmony_ci uint cp_pbdir; 48662306a36Sopenharmony_ci uint cp_pbpar; 48762306a36Sopenharmony_ci u_char res13[2]; 48862306a36Sopenharmony_ci ushort cp_pbodr; 48962306a36Sopenharmony_ci uint cp_pbdat; 49062306a36Sopenharmony_ci 49162306a36Sopenharmony_ci /* Port E - MPC87x/88x only. 49262306a36Sopenharmony_ci */ 49362306a36Sopenharmony_ci uint cp_pedir; 49462306a36Sopenharmony_ci uint cp_pepar; 49562306a36Sopenharmony_ci uint cp_peso; 49662306a36Sopenharmony_ci uint cp_peodr; 49762306a36Sopenharmony_ci uint cp_pedat; 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci /* Communications Processor Timing Register - 50062306a36Sopenharmony_ci Contains RMII Timing for the FECs on MPC87x/88x only. 50162306a36Sopenharmony_ci */ 50262306a36Sopenharmony_ci uint cp_cptr; 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_ci /* Serial Interface and Time Slot Assignment. 50562306a36Sopenharmony_ci */ 50662306a36Sopenharmony_ci uint cp_simode; 50762306a36Sopenharmony_ci u_char cp_sigmr; 50862306a36Sopenharmony_ci u_char res15; 50962306a36Sopenharmony_ci u_char cp_sistr; 51062306a36Sopenharmony_ci u_char cp_sicmr; 51162306a36Sopenharmony_ci u_char res16[4]; 51262306a36Sopenharmony_ci uint cp_sicr; 51362306a36Sopenharmony_ci uint cp_sirp; 51462306a36Sopenharmony_ci u_char res17[0xc]; 51562306a36Sopenharmony_ci 51662306a36Sopenharmony_ci /* 256 bytes of MPC823 video controller RAM array. 51762306a36Sopenharmony_ci */ 51862306a36Sopenharmony_ci u_char cp_vcram[0x100]; 51962306a36Sopenharmony_ci u_char cp_siram[0x200]; 52062306a36Sopenharmony_ci 52162306a36Sopenharmony_ci /* The fast ethernet controller is not really part of the CPM, 52262306a36Sopenharmony_ci * but it resides in the address space. 52362306a36Sopenharmony_ci * The LCD color map is also here. 52462306a36Sopenharmony_ci */ 52562306a36Sopenharmony_ci union fec_lcd fl_un; 52662306a36Sopenharmony_ci#define cp_fec fl_un.fl_un_fec 52762306a36Sopenharmony_ci#define lcd_cmap fl_un.fl_un_cmap 52862306a36Sopenharmony_ci char res18[0xE00]; 52962306a36Sopenharmony_ci 53062306a36Sopenharmony_ci /* The DUET family has a second FEC here */ 53162306a36Sopenharmony_ci fec_t cp_fec2; 53262306a36Sopenharmony_ci#define cp_fec1 cp_fec /* consistency macro */ 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci /* Dual Ported RAM follows. 53562306a36Sopenharmony_ci * There are many different formats for this memory area 53662306a36Sopenharmony_ci * depending upon the devices used and options chosen. 53762306a36Sopenharmony_ci * Some processors don't have all of it populated. 53862306a36Sopenharmony_ci */ 53962306a36Sopenharmony_ci u_char cp_dpmem[0x1C00]; /* BD / Data / ucode */ 54062306a36Sopenharmony_ci u_char cp_dparam[0x400]; /* Parameter RAM */ 54162306a36Sopenharmony_ci} cpm8xx_t; 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci/* Internal memory map. 54462306a36Sopenharmony_ci*/ 54562306a36Sopenharmony_citypedef struct immap { 54662306a36Sopenharmony_ci sysconf8xx_t im_siu_conf; /* SIU Configuration */ 54762306a36Sopenharmony_ci pcmconf8xx_t im_pcmcia; /* PCMCIA Configuration */ 54862306a36Sopenharmony_ci memctl8xx_t im_memctl; /* Memory Controller */ 54962306a36Sopenharmony_ci sit8xx_t im_sit; /* System integration timers */ 55062306a36Sopenharmony_ci car8xx_t im_clkrst; /* Clocks and reset */ 55162306a36Sopenharmony_ci sitk8xx_t im_sitk; /* Sys int timer keys */ 55262306a36Sopenharmony_ci cark8xx_t im_clkrstk; /* Clocks and reset keys */ 55362306a36Sopenharmony_ci vid823_t im_vid; /* Video (823 only) */ 55462306a36Sopenharmony_ci lcd823_t im_lcd; /* LCD (823 only) */ 55562306a36Sopenharmony_ci i2c8xx_t im_i2c; /* I2C control/status */ 55662306a36Sopenharmony_ci sdma8xx_t im_sdma; /* SDMA control/status */ 55762306a36Sopenharmony_ci cpic8xx_t im_cpic; /* CPM Interrupt Controller */ 55862306a36Sopenharmony_ci iop8xx_t im_ioport; /* IO Port control/status */ 55962306a36Sopenharmony_ci cpmtimer8xx_t im_cpmtimer; /* CPM timers */ 56062306a36Sopenharmony_ci cpm8xx_t im_cpm; /* Communication processor */ 56162306a36Sopenharmony_ci} immap_t; 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ciextern immap_t __iomem *mpc8xx_immr; 56462306a36Sopenharmony_ci 56562306a36Sopenharmony_ci#endif /* __IMMAP_8XX__ */ 56662306a36Sopenharmony_ci#endif /* __KERNEL__ */ 567