/* ppc5200.h - Motorola MPC5200 CPU control registers */ /* * Copyright (c) 2003, 2005-2006, 2009 Wind River Systems, Inc. * * The right to copy, distribute, modify or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. */ /* modification history --------------------, 01h,21aug09,e_d change __INCm5200h to __INCppc5200h. (WIND00115449) 01g,01mar06,pch SPR 117925: move SPRG4-7 definitions to shared file 01f,11aug05,j_b added PCI reg macros 01e,05dec03,hkh error correction: arithmetic expressions in macros has to be put between "(" and ")" wrong shifts for EENA2, EENA3 01d,01dec03,e_c add register definition for fast boot 01c,18nov03,pdr merge from IceCube. 01b,15sep03,pdr added register definition 01a,25Jun03,pkr written */ /* This file contains I/O addresses and related constants for the MPC5200 */ #ifndef __INCppc5200h #define __INCppc5200h #include #ifdef __cplusplus extern "C" { #endif #define PVR 287 /* processor version register */ #define HID2 1011 /* Hardware Implmentation-Dependent Register 2 */ #define MBAR 311 /* Memory Base Address Register */ #define MBAR_SIZE 0x40000 /* 256 KB */ #define MBAR_RESET_VALUE 0x80000000 #define MPC5200_PCI_DEVICE_ID 0x5803 #define MPC5200_PCI_VENDOR_ID 0x1057 #define MPC5200_PCI_ID ((MPC5200_PCI_DEVICE_ID << 16) | MPC5200_PCI_VENDOR_ID) /*-----------------------------------------------------------*/ /* IPBI Peripheral registers 0x0000 */ /*-----------------------------------------------------------*/ /* MBAR to IPBI */ #define MBAR_IPBI 0x0000 #define IPBI_CS0_START_OFF 0x0004 #define IPBI_CS0_STOP_OFF 0x0008 #define IPBI_CTRL_OFF 0x0054 #define IPBI_SDRAM_CONF0_OFF 0x0034 #define IPBI_SDRAM_CONF1_OFF 0x0038 #define IPBI_CTRL_CSBOOT 0x02000000 #define IPBI_CTRL_CS0 0x00010000 #define IPBI_CTRL_WSE 0x00000001 /*-----------------------------------------------------------*/ /* SDRAM 0x0100 */ /*-----------------------------------------------------------*/ /* MBAR to LPC */ #define MBAR_SDRAM 0x0100 #define SDRAM_MODE_OFF 0x0000 #define SDRAM_CTRL_OFF 0x0004 #define SDRAM_CONF1_OFF 0x0008 #define SDRAM_CONF2_OFF 0x000C /*-----------------------------------------------------------*/ /* Clock Distribution Module (CDM) 0x0200 */ /*-----------------------------------------------------------*/ /* MBAR to CDM */ #define MBAR_CDM 0x0200 #define CDM_PORSTCFG_OFF 0x0004 /* CDM Power On Reset Configuration Register */ #define CDM_BREAD_CRUM_OFF 0x0008 /* CDM Bread Crumb Register */ #define CDM_CFG_OFF 0x000C /* CDM Configuration Register */ #define CDM_DIVIDER_OFF 0x0010 /* CDM 48MHz Fractional Divider Configuration Register */ #define CDM_CLK_ENABLE_OFF 0x0014 /* CDM Clock Enable Register */ #define CDM_OSC_CONFIG_OFF 0x0018 /* CDM System Oscillator Configuration Register */ #define CDM_PSC1_MCLOCK_OFF 0x0028 /* CDM PSC1 Mclock Config */ #define CDM_PSC2_MCLOCK_OFF 0x002C /* CDM PSC2 Mclock Config */ #define CDM_PSC3_MCLOCK_OFF 0x0030 /* CDM PSC3 Mclock Config */ #define CDM_PSC6_MCLOCK_OFF 0x0034 /* CDM PSC6 Mclock Config */ #define CDM_BASE_ADRS (MBAR_VALUE + MBAR_CDM) #define CDM_PORSTCFG ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_PORSTCFG_OFF )) #define CDM_BREAD_CRUM ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_BREAD_CRUM_OFF )) #define CDM_CFG ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_CFG_OFF )) #define CDM_DIVIDER ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_DIVIDER_OFF )) #define CDM_CLK_ENABLE ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_CLK_ENABLE_OFF )) #define CDM_OSC_CONFIG ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_OSC_CONFIG_OFF )) #define CDM_PSC1_MCLOCK ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_PSC1_MCLOCK_OFF)) #define CDM_PSC2_MCLOCK ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_PSC2_MCLOCK_OFF)) #define CDM_PSC3_MCLOCK ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_PSC3_MCLOCK_OFF)) #define CDM_PSC6_MCLOCK ((volatile UINT32 *)(CDM_BASE_ADRS + CDM_PSC6_MCLOCK_OFF)) /*-----------------------------------------------------------*/ /* LPC 0x0300 */ /*-----------------------------------------------------------*/ /* MBAR to LPC */ #define MBAR_LPC 0x0300 #define LPC_CS0_BOOT_CFG_OFF 0x0000 #define LPC_CS_CTRL_OFF 0x0018 #define LPC_CS_BURST_CTRL_OFF 0x0028 #define LPC_CS_DEAD_CTRL_OFF 0x002C #define LPC_CS_CTRL_EBEE 0x8000 #define LPC_CS_CTRL_ME 0x0100 /*----------------------------------------------------------- */ /* Interrupt Controller (ICTL) 0x0500 */ /*----------------------------------------------------------- */ #define MBAR_ICTL 0x0500 #define ICTL_PIMR_OFF 0x0 /* ICTL Peripheral Interrupt Mask Register */ #define ICTL_PPR_OFF 0x4 /* ICTL Peripheral Priority and HI/LO Select [3] Register */ #define ICTL_EEETR_OFF 0x10 /* ICTL External Enable and Externals Types Register */ #define ICTL_CPMIMR_OFF 0x14 /* ICTL Critical Priority and Main Interrupt Mask Register */ #define ICTL_MIPR_OFF 0x18 /* ICTL Main Interrupt Priority and INT/SMI Select [2] Register */ #define ICTL_ISR_OFF 0x24 /* ICTL PerStat, MainStat, CritStat Encoded Register */ #define CTL_CISAR_OFF 0x28 /* ICTL Critical Interrupt Status All Register */ #define ICTL_MISAR_OFF 0x2C /* ICTL Main Interrupt Status All Register */ #define ICTL_PISAR_OFF 0x30 /* ICTL Peripheral Interrupt Status All Register */ #define ICTL_BISAR_OFF 0x38 /* ICTL Bus Error Status Register */ #define ICTL_BASE_ADRS (MBAR_VALUE + MBAR_ICTL) #define ICTL_PIMR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_PIMR_OFF)) #define ICTL_PPR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_PPR_OFF)) /* [3] */ #define ICTL_EEETR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_EEETR_OFF)) #define ICTL_CPMIMR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_CPMIMR_OFF)) #define ICTL_MIPR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_MIPR_OFF)) /* [2] */ #define ICTL_ISR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_ISR_OFF)) #define ICTL_CISAR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_CISAR_OFF)) #define ICTL_MISAR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_MISAR_OFF)) #define ICTL_PISAR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_PISAR_OFF)) #define ICTL_BISAR ((volatile UINT32 *)(ICTL_BASE_ADRS + ICTL_BISAR_OFF)) /* External Enable and External Types Register */ #define ICTL_EEETR_ECLR0_MASK (1<<27) #define ICTL_EEETR_ECLR1_MASK (1<<26) #define ICTL_EEETR_ECLR2_MASK (1<<25) #define ICTL_EEETR_ECLR3_MASK (1<<24) #define ICTL_EEETR_ETYPE0_MASK (3<<22) #define ICTL_EEETR_ETYPE0_LEVEL_HI (0<<22) #define ICTL_EEETR_ETYPE0_RISING_EDGE (1<<22) #define ICTL_EEETR_ETYPE0_FALLING_EDGE (2<<22) #define ICTL_EEETR_ETYPE0_LEVEL_LO (3<<22) #define ICTL_EEETR_ETYPE1_MASK (3<<20) #define ICTL_EEETR_ETYPE1_LEVEL_HI (0<<20) #define ICTL_EEETR_ETYPE1_RISING_EDGE (1<<20) #define ICTL_EEETR_ETYPE1_FALLING_EDGE (2<<20) #define ICTL_EEETR_ETYPE1_LEVEL_LO (3<<20) #define ICTL_EEETR_ETYPE2_MASK (3<<18) #define ICTL_EEETR_ETYPE2_LEVEL_HI (0<<18) #define ICTL_EEETR_ETYPE2_RISING_EDGE (1<<18) #define ICTL_EEETR_ETYPE2_FALLING_EDGE (2<<18) #define ICTL_EEETR_ETYPE2_LEVEL_LO (3<<18) #define ICTL_EEETR_ETYPE3_MASK (3<<16) #define ICTL_EEETR_ETYPE3_LEVEL_HI (0<<16) #define ICTL_EEETR_ETYPE3_RISING_EDGE (1<<16) #define ICTL_EEETR_ETYPE3_FALLING_EDGE (2<<16) #define ICTL_EEETR_ETYPE3_LEVEL_LO (3<<16) #define ICTL_EEETR_MEE (1<<12) #define ICTL_EEETR_EENA0_MASK (1<<11) #define ICTL_EEETR_EENA1_MASK (1<<10) #define ICTL_EEETR_EENA2_MASK (1<<9) #define ICTL_EEETR_EENA3_MASK (1<<8) #define ICTL_EEETR_CEb (1<<0) /* Critical Priority and Main Interrupt Mask Register */ #define ICTL_CPMIMR_MAIN_MASK0 (1<<16) #define ICTL_CPMIMR_MAIN_MASK1 (1<<15) #define ICTL_CPMIMR_MAIN_MASK2 (1<<14) #define ICTL_CPMIMR_MAIN_MASK3 (1<<13) #define ICTL_CPMIMR_MAIN_MASK4 (1<<12) #define ICTL_CPMIMR_MAIN_MASK5 (1<<11) #define ICTL_CPMIMR_MAIN_MASK6 (1<<10) #define ICTL_CPMIMR_MAIN_MASK7 (1<<9) #define ICTL_CPMIMR_MAIN_MASK8 (1<<8) #define ICTL_CPMIMR_MAIN_MASK9 (1<<7) #define ICTL_CPMIMR_MAIN_MASK10 (1<<6) #define ICTL_CPMIMR_MAIN_MASK11 (1<<5) #define ICTL_CPMIMR_MAIN_MASK12 (1<<4) #define ICTL_CPMIMR_MAIN_MASK13 (1<<3) #define ICTL_CPMIMR_MAIN_MASK14 (1<<2) #define ICTL_CPMIMR_MAIN_MASK15 (1<<1) #define ICTL_CPMIMR_MAIN_MASK16 (1<<0) #define ICTL_CPMIMR_MASK_ALL 0x0001FFFF /* Interrupt Status Register */ #define ICTL_CEbSh (1<<0) #define ICTL_ISR_CSe_SHIFT 8 #define ICTL_ISR_CSe_MASK (7<