]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/ppc440.h
bootm: Reduce the unnecessary memmove
[karo-tx-uboot.git] / include / ppc440.h
index 5df8eb0d13ff881455339d422157b3750109206d..01f6eaf35e6bfb8f4d757ac481af38610b93e628 100644 (file)
@@ -46,7 +46,7 @@
 #ifndef __PPC440_H__
 #define __PPC440_H__
 
-#define CFG_DCACHE_SIZE                (32 << 10)      /* For AMCC 440 CPUs    */
+#define CONFIG_SYS_DCACHE_SIZE         (32 << 10)      /* For AMCC 440 CPUs    */
 
 /*--------------------------------------------------------------------- */
 /* Special Purpose Registers                                           */
@@ -77,7 +77,6 @@
 #define         tbl    0x11c   /* time base lower (supervisor)*/
 #define         tbu    0x11d   /* time base upper (supervisor)*/
 #define         pir    0x11e   /* processor id register */
-/*#define  pvr 0x11f    processor version register */
 #define         dbsr   0x130   /* debug status register */
 #define         dbcr0  0x134   /* debug control register 0 */
 #define         dbcr1  0x135   /* debug control register 1 */
 #define sdr_ecid1      0x0081
 #define sdr_ecid2      0x0082
 #define sdr_jtag       0x00c0
-#if !defined(CONFIG_440EPX) && !defined(CONFIG_440GRX)
-#define sdr_ddrdl      0x00e0
-#else
-#define sdr_cfg                0x00e0
-#define SDR_CFG_LT2_MASK          0x01000000 /* Leakage test 2*/
-#define SDR_CFG_64_32BITS_MASK    0x01000000 /* Switch DDR 64 bits or 32 bits */
-#define SDR_CFG_32BITS            0x00000000  /* 32 bits */
-#define SDR_CFG_64BITS            0x01000000  /* 64 bits */
-#define SDR_CFG_MC_V2518_MASK     0x02000000 /* Low VDD2518 (2.5 or 1.8V) */
-#define SDR_CFG_MC_V25            0x00000000  /* 2.5 V */
-#define SDR_CFG_MC_V18            0x02000000  /* 1.8 V */
-#endif /* !defined(CONFIG_440EPX) && !defined(CONFIG_440GRX) */
+#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
+#define SDR0_DDRCFG    0x00e0
+#endif /* defined(CONFIG_440EPX) || defined(CONFIG_440GRX) */
 #define sdr_ebc                0x0100
 #define sdr_uart0      0x0120  /* UART0 Config */
 #define sdr_uart1      0x0121  /* UART1 Config */
 #define sdr_sdstp6     0x4005
 #define sdr_sdstp7     0x4007
 
-/******************************************************************************
- * PCI express defines
- ******************************************************************************/
-#define SDR0_PE0UTLSET1                0x00000300      /* PE0 Upper transaction layer conf setting */
-#define SDR0_PE0UTLSET2                0x00000301      /* PE0 Upper transaction layer conf setting 2 */
-#define SDR0_PE0DLPSET         0x00000302      /* PE0 Data link & logical physical configuration */
-#define SDR0_PE0LOOP           0x00000303      /* PE0 Loopback interface status */
-#define SDR0_PE0RCSSET         0x00000304      /* PE0 Reset, clock & shutdown setting */
-#define SDR0_PE0RCSSTS         0x00000305      /* PE0 Reset, clock & shutdown status */
-#define SDR0_PE0HSSSET1L0      0x00000306      /* PE0 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE0HSSSET2L0      0x00000307      /* PE0 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE0HSSSTSL0       0x00000308      /* PE0 HSS Control Status : Lane 0 */
-#define SDR0_PE0HSSSET1L1      0x00000309      /* PE0 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE0HSSSET2L1      0x0000030A      /* PE0 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE0HSSSTSL1       0x0000030B      /* PE0 HSS Control Status : Lane 1 */
-#define SDR0_PE0HSSSET1L2      0x0000030C      /* PE0 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE0HSSSET2L2      0x0000030D      /* PE0 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE0HSSSTSL2       0x0000030E      /* PE0 HSS Control Status : Lane 2 */
-#define SDR0_PE0HSSSET1L3      0x0000030F      /* PE0 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE0HSSSET2L3      0x00000310      /* PE0 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE0HSSSTSL3       0x00000311      /* PE0 HSS Control Status : Lane 3 */
-#define SDR0_PE0HSSSET1L4      0x00000312      /* PE0 HSS Control Setting 1: Lane 4 */
-#define SDR0_PE0HSSSET2L4      0x00000313      /* PE0 HSS Control Setting 2: Lane 4 */
-#define SDR0_PE0HSSSTSL4       0x00000314      /* PE0 HSS Control Status : Lane 4 */
-#define SDR0_PE0HSSSET1L5      0x00000315      /* PE0 HSS Control Setting 1: Lane 5 */
-#define SDR0_PE0HSSSET2L5      0x00000316      /* PE0 HSS Control Setting 2: Lane 5 */
-#define SDR0_PE0HSSSTSL5       0x00000317      /* PE0 HSS Control Status : Lane 5 */
-#define SDR0_PE0HSSSET1L6      0x00000318      /* PE0 HSS Control Setting 1: Lane 6 */
-#define SDR0_PE0HSSSET2L6      0x00000319      /* PE0 HSS Control Setting 2: Lane 6 */
-#define SDR0_PE0HSSSTSL6       0x0000031A      /* PE0 HSS Control Status : Lane 6 */
-#define SDR0_PE0HSSSET1L7      0x0000031B      /* PE0 HSS Control Setting 1: Lane 7 */
-#define SDR0_PE0HSSSET2L7      0x0000031C      /* PE0 HSS Control Setting 2: Lane 7 */
-#define SDR0_PE0HSSSTSL7       0x0000031D      /* PE0 HSS Control Status : Lane 7 */
-#define SDR0_PE0HSSSEREN       0x0000031E      /* PE0 Serdes Transmitter Enable */
-#define SDR0_PE0LANEABCD       0x0000031F      /* PE0 Lanes ABCD affectation */
-#define SDR0_PE0LANEEFGH       0x00000320      /* PE0 Lanes EFGH affectation */
-
-#define SDR0_PE1UTLSET1                0x00000340      /* PE1 Upper transaction layer conf setting */
-#define SDR0_PE1UTLSET2                0x00000341      /* PE1 Upper transaction layer conf setting 2 */
-#define SDR0_PE1DLPSET         0x00000342      /* PE1 Data link & logical physical configuration */
-#define SDR0_PE1LOOP           0x00000343      /* PE1 Loopback interface status */
-#define SDR0_PE1RCSSET         0x00000344      /* PE1 Reset, clock & shutdown setting */
-#define SDR0_PE1RCSSTS         0x00000345      /* PE1 Reset, clock & shutdown status */
-#define SDR0_PE1HSSSET1L0      0x00000346      /* PE1 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE1HSSSET2L0      0x00000347      /* PE1 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE1HSSSTSL0       0x00000348      /* PE1 HSS Control Status : Lane 0 */
-#define SDR0_PE1HSSSET1L1      0x00000349      /* PE1 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE1HSSSET2L1      0x0000034A      /* PE1 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE1HSSSTSL1       0x0000034B      /* PE1 HSS Control Status : Lane 1 */
-#define SDR0_PE1HSSSET1L2      0x0000034C      /* PE1 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE1HSSSET2L2      0x0000034D      /* PE1 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE1HSSSTSL2       0x0000034E      /* PE1 HSS Control Status : Lane 2 */
-#define SDR0_PE1HSSSET1L3      0x0000034F      /* PE1 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE1HSSSET2L3      0x00000350      /* PE1 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE1HSSSTSL3       0x00000351      /* PE1 HSS Control Status : Lane 3 */
-#define SDR0_PE1HSSSEREN       0x00000352      /* PE1 Serdes Transmitter Enable */
-#define SDR0_PE1LANEABCD       0x00000353      /* PE1 Lanes ABCD affectation */
-#define SDR0_PE2UTLSET1                0x00000370      /* PE2 Upper transaction layer conf setting */
-#define SDR0_PE2UTLSET2                0x00000371      /* PE2 Upper transaction layer conf setting 2 */
-#define SDR0_PE2DLPSET         0x00000372      /* PE2 Data link & logical physical configuration */
-#define SDR0_PE2LOOP           0x00000373      /* PE2 Loopback interface status */
-#define SDR0_PE2RCSSET         0x00000374      /* PE2 Reset, clock & shutdown setting */
-#define SDR0_PE2RCSSTS         0x00000375      /* PE2 Reset, clock & shutdown status */
-#define SDR0_PE2HSSSET1L0      0x00000376      /* PE2 HSS Control Setting 1: Lane 0 */
-#define SDR0_PE2HSSSET2L0      0x00000377      /* PE2 HSS Control Setting 2: Lane 0 */
-#define SDR0_PE2HSSSTSL0       0x00000378      /* PE2 HSS Control Status : Lane 0 */
-#define SDR0_PE2HSSSET1L1      0x00000379      /* PE2 HSS Control Setting 1: Lane 1 */
-#define SDR0_PE2HSSSET2L1      0x0000037A      /* PE2 HSS Control Setting 2: Lane 1 */
-#define SDR0_PE2HSSSTSL1       0x0000037B      /* PE2 HSS Control Status : Lane 1 */
-#define SDR0_PE2HSSSET1L2      0x0000037C      /* PE2 HSS Control Setting 1: Lane 2 */
-#define SDR0_PE2HSSSET2L2      0x0000037D      /* PE2 HSS Control Setting 2: Lane 2 */
-#define SDR0_PE2HSSSTSL2       0x0000037E      /* PE2 HSS Control Status : Lane 2 */
-#define SDR0_PE2HSSSET1L3      0x0000037F      /* PE2 HSS Control Setting 1: Lane 3 */
-#define SDR0_PE2HSSSET2L3      0x00000380      /* PE2 HSS Control Setting 2: Lane 3 */
-#define SDR0_PE2HSSSTSL3       0x00000381      /* PE2 HSS Control Status : Lane 3 */
-#define SDR0_PE2HSSSEREN       0x00000382      /* PE2 Serdes Transmitter Enable */
-#define SDR0_PE2LANEABCD       0x00000383      /* PE2 Lanes ABCD affectation */
-#define SDR0_PEGPLLSET1                0x000003A0      /* PE Pll LC Tank Setting1 */
-#define SDR0_PEGPLLSET2                0x000003A1      /* PE Pll LC Tank Setting2 */
-#define SDR0_PEGPLLSTS         0x000003A2      /* PE Pll LC Tank Status */
 #endif /* CONFIG_440SPE */
 
 /*-----------------------------------------------------------------------------
 
 #define PLB4_ACR_WRP           (0x80000000 >> 7)
 
-/* Nebula PLB4 Arbiter - PowerPC440EP */
-#define PLB_ARBITER_BASE   0x80
-
-#define plb0_revid                (PLB_ARBITER_BASE+ 0x00)
-#define plb0_acr                  (PLB_ARBITER_BASE+ 0x01)
-#define   plb0_acr_ppm_mask             0xF0000000
-#define   plb0_acr_ppm_fixed            0x00000000
-#define   plb0_acr_ppm_fair             0xD0000000
-#define   plb0_acr_hbu_mask             0x08000000
-#define   plb0_acr_hbu_disabled         0x00000000
-#define   plb0_acr_hbu_enabled          0x08000000
-#define   plb0_acr_rdp_mask             0x06000000
-#define   plb0_acr_rdp_disabled         0x00000000
-#define   plb0_acr_rdp_2deep            0x02000000
-#define   plb0_acr_rdp_3deep            0x04000000
-#define   plb0_acr_rdp_4deep            0x06000000
-#define   plb0_acr_wrp_mask             0x01000000
-#define   plb0_acr_wrp_disabled         0x00000000
-#define   plb0_acr_wrp_2deep            0x01000000
-
-#define plb0_besrl                (PLB_ARBITER_BASE+ 0x02)
-#define plb0_besrh                (PLB_ARBITER_BASE+ 0x03)
-#define plb0_bearl                (PLB_ARBITER_BASE+ 0x04)
-#define plb0_bearh                (PLB_ARBITER_BASE+ 0x05)
-#define plb0_ccr                  (PLB_ARBITER_BASE+ 0x08)
-
-#define plb1_acr                  (PLB_ARBITER_BASE+ 0x09)
-#define   plb1_acr_ppm_mask             0xF0000000
-#define   plb1_acr_ppm_fixed            0x00000000
-#define   plb1_acr_ppm_fair             0xD0000000
-#define   plb1_acr_hbu_mask             0x08000000
-#define   plb1_acr_hbu_disabled         0x00000000
-#define   plb1_acr_hbu_enabled          0x08000000
-#define   plb1_acr_rdp_mask             0x06000000
-#define   plb1_acr_rdp_disabled         0x00000000
-#define   plb1_acr_rdp_2deep            0x02000000
-#define   plb1_acr_rdp_3deep            0x04000000
-#define   plb1_acr_rdp_4deep            0x06000000
-#define   plb1_acr_wrp_mask             0x01000000
-#define   plb1_acr_wrp_disabled         0x00000000
-#define   plb1_acr_wrp_2deep            0x01000000
-
-#define plb1_besrl                (PLB_ARBITER_BASE+ 0x0A)
-#define plb1_besrh                (PLB_ARBITER_BASE+ 0x0B)
-#define plb1_bearl                (PLB_ARBITER_BASE+ 0x0C)
-#define plb1_bearh                (PLB_ARBITER_BASE+ 0x0D)
-
 /* Pin Function Control Register 1 */
 #define SDR0_PFC1                    0x4101
 #define   SDR0_PFC1_U1ME_MASK         0x02000000    /* UART1 Mode Enable */
 
 #endif /* 440EP || 440GR || 440EPX || 440GRX */
 
-/*-----------------------------------------------------------------------------
- | L2 Cache
- +----------------------------------------------------------------------------*/
-#if defined (CONFIG_440GX) || \
-    defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
-    defined(CONFIG_460SX)
-#define L2_CACHE_BASE  0x030
-#define l2_cache_cfg   (L2_CACHE_BASE+0x00)    /* L2 Cache Config      */
-#define l2_cache_cmd   (L2_CACHE_BASE+0x01)    /* L2 Cache Command     */
-#define l2_cache_addr  (L2_CACHE_BASE+0x02)    /* L2 Cache Address     */
-#define l2_cache_data  (L2_CACHE_BASE+0x03)    /* L2 Cache Data        */
-#define l2_cache_stat  (L2_CACHE_BASE+0x04)    /* L2 Cache Status      */
-#define l2_cache_cver  (L2_CACHE_BASE+0x05)    /* L2 Cache Revision ID */
-#define l2_cache_snp0  (L2_CACHE_BASE+0x06)    /* L2 Cache Snoop reg 0 */
-#define l2_cache_snp1  (L2_CACHE_BASE+0x07)    /* L2 Cache Snoop reg 1 */
-
-#endif /* CONFIG_440GX */
-
-/*-----------------------------------------------------------------------------
- | Internal SRAM
- +----------------------------------------------------------------------------*/
-#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-#define ISRAM0_DCR_BASE 0x380
-#else
-#define ISRAM0_DCR_BASE 0x020
-#endif
-#define isram0_sb0cr   (ISRAM0_DCR_BASE+0x00)  /* SRAM bank config 0*/
-#define isram0_sb1cr   (ISRAM0_DCR_BASE+0x01)  /* SRAM bank config 1*/
-#define isram0_sb2cr   (ISRAM0_DCR_BASE+0x02)  /* SRAM bank config 2*/
-#define isram0_sb3cr   (ISRAM0_DCR_BASE+0x03)  /* SRAM bank config 3*/
-#define isram0_bear    (ISRAM0_DCR_BASE+0x04)  /* SRAM bus error addr reg */
-#define isram0_besr0   (ISRAM0_DCR_BASE+0x05)  /* SRAM bus error status reg 0 */
-#define isram0_besr1   (ISRAM0_DCR_BASE+0x06)  /* SRAM bus error status reg 1 */
-#define isram0_pmeg    (ISRAM0_DCR_BASE+0x07)  /* SRAM power management */
-#define isram0_cid     (ISRAM0_DCR_BASE+0x08)  /* SRAM bus core id reg */
-#define isram0_revid   (ISRAM0_DCR_BASE+0x09)  /* SRAM bus revision id reg */
-#define isram0_dpc     (ISRAM0_DCR_BASE+0x0a)  /* SRAM data parity check reg */
-
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT)
 #define cntrl0         (CNTRL_DCR_BASE+0x3b)   /* Control 0 register           */
 #define cntrl1         (CNTRL_DCR_BASE+0x3a)   /* Control 1 register           */
 
-#if defined(CONFIG_440SPE) || defined(CONFIG_440EPX)
-/*----------------------------------------------------------------------------+
-| Clock / Power-on-reset DCR's.
-+----------------------------------------------------------------------------*/
-#define CPR0_CLKUPD                    0x20
-#define CPR0_CLKUPD_BSY_MASK           0x80000000
-#define CPR0_CLKUPD_BSY_COMPLETED      0x00000000
-#define CPR0_CLKUPD_BSY_BUSY           0x80000000
-#define CPR0_CLKUPD_CUI_MASK           0x80000000
-#define CPR0_CLKUPD_CUI_DISABLE                0x00000000
-#define CPR0_CLKUPD_CUI_ENABLE         0x80000000
-#define CPR0_CLKUPD_CUD_MASK           0x40000000
-#define CPR0_CLKUPD_CUD_DISABLE                0x00000000
-#define CPR0_CLKUPD_CUD_ENABLE         0x40000000
-
-#define CPR0_PLLC                      0x40
-#define CPR0_PLLC_RST_MASK             0x80000000
-#define CPR0_PLLC_RST_PLLLOCKED                0x00000000
-#define CPR0_PLLC_RST_PLLRESET         0x80000000
-#define CPR0_PLLC_ENG_MASK             0x40000000
-#define CPR0_PLLC_ENG_DISABLE          0x00000000
-#define CPR0_PLLC_ENG_ENABLE           0x40000000
-#define CPR0_PLLC_ENG_ENCODE(n)                ((((unsigned long)(n))&0x01)<<30)
-#define CPR0_PLLC_ENG_DECODE(n)                ((((unsigned long)(n))>>30)&0x01)
-#define CPR0_PLLC_SRC_MASK             0x20000000
-#define CPR0_PLLC_SRC_PLLOUTA          0x00000000
-#define CPR0_PLLC_SRC_PLLOUTB          0x20000000
-#define CPR0_PLLC_SRC_ENCODE(n)                ((((unsigned long)(n))&0x01)<<29)
-#define CPR0_PLLC_SRC_DECODE(n)                ((((unsigned long)(n))>>29)&0x01)
-#define CPR0_PLLC_SEL_MASK             0x07000000
-#define CPR0_PLLC_SEL_PLLOUT           0x00000000
-#define CPR0_PLLC_SEL_CPU              0x01000000
-#define CPR0_PLLC_SEL_EBC              0x05000000
-#define CPR0_PLLC_SEL_ENCODE(n)                ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PLLC_SEL_DECODE(n)                ((((unsigned long)(n))>>24)&0x07)
-#define CPR0_PLLC_TUNE_MASK            0x000003FF
-#define CPR0_PLLC_TUNE_ENCODE(n)       ((((unsigned long)(n))&0x3FF)<<0)
-#define CPR0_PLLC_TUNE_DECODE(n)       ((((unsigned long)(n))>>0)&0x3FF)
-
-#define CPR0_PLLD                      0x60
-#define CPR0_PLLD_FBDV_MASK            0x1F000000
-#define CPR0_PLLD_FBDV_ENCODE(n)       ((((unsigned long)(n))&0x1F)<<24)
-#define CPR0_PLLD_FBDV_DECODE(n)       ((((((unsigned long)(n))>>24)-1)&0x1F)+1)
-#define CPR0_PLLD_FWDVA_MASK           0x000F0000
-#define CPR0_PLLD_FWDVA_ENCODE(n)      ((((unsigned long)(n))&0x0F)<<16)
-#define CPR0_PLLD_FWDVA_DECODE(n)      ((((((unsigned long)(n))>>16)-1)&0x0F)+1)
-#define CPR0_PLLD_FWDVB_MASK           0x00000700
-#define CPR0_PLLD_FWDVB_ENCODE(n)      ((((unsigned long)(n))&0x07)<<8)
-#define CPR0_PLLD_FWDVB_DECODE(n)      ((((((unsigned long)(n))>>8)-1)&0x07)+1)
-#define CPR0_PLLD_LFBDV_MASK           0x0000003F
-#define CPR0_PLLD_LFBDV_ENCODE(n)      ((((unsigned long)(n))&0x3F)<<0)
-#define CPR0_PLLD_LFBDV_DECODE(n)      ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-
-#define CPR0_PRIMAD                    0x80
-#define CPR0_PRIMAD_PRADV0_MASK                0x07000000
-#define CPR0_PRIMAD_PRADV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PRIMAD_PRADV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-
-#define CPR0_PRIMBD                    0xA0
-#define CPR0_PRIMBD_PRBDV0_MASK                0x07000000
-#define CPR0_PRIMBD_PRBDV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define CPR0_PRIMBD_PRBDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-
-#define CPR0_OPBD                      0xC0
-#define CPR0_OPBD_OPBDV0_MASK          0x03000000
-#define CPR0_OPBD_OPBDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_OPBD_OPBDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-
-#define CPR0_PERD                      0xE0
-#if !defined(CONFIG_440EPX)
-#define CPR0_PERD_PERDV0_MASK          0x03000000
-#define CPR0_PERD_PERDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_PERD_PERDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-#endif
-
-#define CPR0_MALD                      0x100
-#define CPR0_MALD_MALDV0_MASK          0x03000000
-#define CPR0_MALD_MALDV0_ENCODE(n)     ((((unsigned long)(n))&0x03)<<24)
-#define CPR0_MALD_MALDV0_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-
-#define CPR0_ICFG                      0x140
-#define CPR0_ICFG_RLI_MASK             0x80000000
-#define CPR0_ICFG_RLI_RESETCPR         0x00000000
-#define CPR0_ICFG_RLI_PRESERVECPR      0x80000000
-#define CPR0_ICFG_ICS_MASK             0x00000007
-#define CPR0_ICFG_ICS_ENCODE(n)                ((((unsigned long)(n))&0x3F)<<0)
-#define CPR0_ICFG_ICS_DECODE(n)                ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-
-/************************/
-/* IIC defines          */
-/************************/
-#define IIC0_MMIO_BASE 0xA0000400
-#define IIC1_MMIO_BASE 0xA0000500
-
-#endif /* CONFIG_440SP */
-
 /*-----------------------------------------------------------------------------
  | DMA
  +----------------------------------------------------------------------------*/
 #define SDR0_ETH_CFG_ZMII_RMII_MODE_10M                0x10
 #define SDR0_ETH_CFG_ZMII_RMII_MODE_100M       0x11
 
+/* Ethernet Status Register */
+#define SDR0_ETH_STS           0x4104
+
 /* Miscealleneaous Function Reg. (SDR0_MFR) */
 #define SDR0_MFR               0x4300
 #define SDR0_MFR_T0TxFL                0x00800000      /* force parity error TAHOE0 Tx FIFO bits 0:63 */
 #endif /* CONFIG_440GX */
 
 #if defined (CONFIG_440EPX) || defined (CONFIG_440GRX)
-/*--------------------------------------*/
-#define CPR0_PLLC                   0x40
-#define   CPR0_PLLC_RST_MASK           0x80000000
-#define   CPR0_PLLC_RST_PLLLOCKED      0x00000000
-#define   CPR0_PLLC_RST_PLLRESET       0x80000000
-#define   CPR0_PLLC_ENG_MASK           0x40000000
-#define   CPR0_PLLC_ENG_DISABLE        0x00000000
-#define   CPR0_PLLC_ENG_ENABLE         0x40000000
-#define   CPR0_PLLC_ENG_ENCODE(n)      ((((unsigned long)(n))&0x01)<<30)
-#define   CPR0_PLLC_ENG_DECODE(n)      ((((unsigned long)(n))>>30)&0x01)
-#define   CPR0_PLLC_SRC_MASK           0x20000000
-#define   CPR0_PLLC_SRC_PLLOUTA        0x00000000
-#define   CPR0_PLLC_SRC_PLLOUTB        0x20000000
-#define   CPR0_PLLC_SRC_ENCODE(n)      ((((unsigned long)(n))&0x01)<<29)
-#define   CPR0_PLLC_SRC_DECODE(n)      ((((unsigned long)(n))>>29)&0x01)
-#define   CPR0_PLLC_SEL_MASK           0x07000000
-#define   CPR0_PLLC_SEL_PLL            0x00000000
-#define   CPR0_PLLC_SEL_CPU            0x01000000
-#define   CPR0_PLLC_SEL_PER            0x05000000
-#define   CPR0_PLLC_SEL_ENCODE(n)      ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PLLC_SEL_DECODE(n)      ((((unsigned long)(n))>>24)&0x07)
-#define   CPR0_PLLC_TUNE_MASK          0x000003FF
-#define   CPR0_PLLC_TUNE_ENCODE(n)     ((((unsigned long)(n))&0x3FF)<<0)
-#define   CPR0_PLLC_TUNE_DECODE(n)     ((((unsigned long)(n))>>0)&0x3FF)
-/*--------------------------------------*/
-#define CPR0_PLLD                   0x60
-#define   CPR0_PLLD_FBDV_MASK          0x1F000000
-#define   CPR0_PLLD_FBDV_ENCODE(n)     ((((unsigned long)(n))&0x1F)<<24)
-#define   CPR0_PLLD_FBDV_DECODE(n)     ((((((unsigned long)(n))>>24)-1)&0x1F)+1)
-#define   CPR0_PLLD_FWDVA_MASK         0x000F0000
-#define   CPR0_PLLD_FWDVA_ENCODE(n)    ((((unsigned long)(n))&0x0F)<<16)
-#define   CPR0_PLLD_FWDVA_DECODE(n)    ((((((unsigned long)(n))>>16)-1)&0x0F)+1)
-#define   CPR0_PLLD_FWDVB_MASK         0x00000700
-#define   CPR0_PLLD_FWDVB_ENCODE(n)    ((((unsigned long)(n))&0x07)<<8)
-#define   CPR0_PLLD_FWDVB_DECODE(n)    ((((((unsigned long)(n))>>8)-1)&0x07)+1)
-#define   CPR0_PLLD_LFBDV_MASK         0x0000003F
-#define   CPR0_PLLD_LFBDV_ENCODE(n)    ((((unsigned long)(n))&0x3F)<<0)
-#define   CPR0_PLLD_LFBDV_DECODE(n)    ((((((unsigned long)(n))>>0)-1)&0x3F)+1)
-/*--------------------------------------*/
-#define CPR0_PRIMAD                 0x80
-#define   CPR0_PRIMAD_PRADV0_MASK      0x07000000
-#define   CPR0_PRIMAD_PRADV0_ENCODE(n) ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PRIMAD_PRADV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#define CPR0_PRIMBD                 0xA0
-#define   CPR0_PRIMBD_PRBDV0_MASK      0x07000000
-#define   CPR0_PRIMBD_PRBDV0_ENCODE(n) ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PRIMBD_PRBDV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#if 0
-#define CPR0_CPM0_ER                0xB0    /* CPM Enable Register */
-#define CPR0_CPM0_FR                0xB1    /* CPM Force Register */
-#define CPR0_CPM0_SR                0xB2    /* CPM Status Register */
-#define CPR0_CPM0_IIC0               0x80000000    /* Inter-Intergrated Circuit0 */
-#define CPR0_CPM0_IIC1               0x40000000    /* Inter-Intergrated Circuit1 */
-#define CPR0_CPM0_PCI                0x20000000    /* Peripheral Component Interconnect */
-#define CPR0_CPM0_USB1H              0x08000000    /* USB1.1 Host */
-#define CPR0_CPM0_FPU                0x04000000    /* PPC440 FPU */
-#define CPR0_CPM0_CPU                0x02000000    /* PPC440x5 Processor Core */
-#define CPR0_CPM0_DMA                0x01000000    /* Direct Memory Access Controller */
-#define CPR0_CPM0_BGO                0x00800000    /* PLB to OPB Bridge */
-#define CPR0_CPM0_BGI                0x00400000    /* OPB to PLB Bridge */
-#define CPR0_CPM0_EBC                0x00200000    /* External Bus Controller */
-#define CPR0_CPM0_NDFC               0x00100000    /* Nand Flash Controller */
-#define CPR0_CPM0_MADMAL             0x00080000    /* DDR SDRAM Controller or MADMAL ??? */
-#define CPR0_CPM0_DMC                0x00080000    /* DDR SDRAM Controller or MADMAL ??? */
-#define CPR0_CPM0_PLB4               0x00040000    /* PLB4 Arbiter */
-#define CPR0_CPM0_PLB4x3x            0x00020000    /* PLB4 to PLB3 */
-#define CPR0_CPM0_PLB3x4x            0x00010000    /* PLB3 to PLB4 */
-#define CPR0_CPM0_PLB3               0x00008000    /* PLB3 Arbiter */
-#define CPR0_CPM0_PPM                0x00002000    /* PLB Performance Monitor */
-#define CPR0_CPM0_UIC1               0x00001000    /* Universal Interrupt Controller 1 */
-#define CPR0_CPM0_GPIO               0x00000800    /* General Purpose IO */
-#define CPR0_CPM0_GPT                0x00000400    /* General Purpose Timer */
-#define CPR0_CPM0_UART0              0x00000200    /* Universal Asynchronous Rcver/Xmitter 0 */
-#define CPR0_CPM0_UART1              0x00000100    /* Universal Asynchronous Rcver/Xmitter 1 */
-#define CPR0_CPM0_UIC0               0x00000080    /* Universal Interrupt Controller 0 */
-#define CPR0_CPM0_TMRCLK             0x00000040    /* CPU Timer */
-#define CPR0_CPM0_EMC0               0x00000020    /* Ethernet 0 */
-#define CPR0_CPM0_EMC1               0x00000010    /* Ethernet 1 */
-#define CPR0_CPM0_UART2              0x00000008    /* Universal Asynchronous Rcver/Xmitter 2 */
-#define CPR0_CPM0_UART3              0x00000004    /* Universal Asynchronous Rcver/Xmitter 3 */
-#define CPR0_CPM0_USB2D              0x00000002    /* USB2.0 Device */
-#define CPR0_CPM0_USB2H              0x00000001    /* USB2.0 Host */
+#define CPR0_ICFG_RLI_MASK     0x80000000
+#define CPR0_SPCID_SPCIDV0_MASK        0x03000000
+#define CPR0_PERD_PERDV0_MASK  0x07000000
 #endif
-/*--------------------------------------*/
-#define CPR0_OPBD                   0xC0
-#define   CPR0_OPBD_OPBDV0_MASK        0x03000000
-#define   CPR0_OPBD_OPBDV0_ENCODE(n)   ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_OPBD_OPBDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_PERD                   0xE0
-#define   CPR0_PERD_PERDV0_MASK        0x07000000
-#define   CPR0_PERD_PERDV0_ENCODE(n)   ((((unsigned long)(n))&0x07)<<24)
-#define   CPR0_PERD_PERDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x07)+1)
-/*--------------------------------------*/
-#define CPR0_MALD                  0x100
-#define   CPR0_MALD_MALDV0_MASK        0x03000000
-#define   CPR0_MALD_MALDV0_ENCODE(n)   ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_MALD_MALDV0_DECODE(n)   ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_SPCID                 0x120
-#define   CPR0_SPCID_SPCIDV0_MASK      0x03000000
-#define   CPR0_SPCID_SPCIDV0_ENCODE(n) ((((unsigned long)(n))&0x03)<<24)
-#define   CPR0_SPCID_SPCIDV0_DECODE(n) ((((((unsigned long)(n))>>24)-1)&0x03)+1)
-/*--------------------------------------*/
-#define CPR0_ICFG                  0x140
-#define   CPR0_ICFG_RLI_MASK           0x80000000
-#define   CPR0_ICFG_RLI_RESETCPR       0x00000000
-#define   CPR0_ICFG_RLI_PRESERVECPR    0x80000000
-#define   CPR0_ICFG_ICS_MASK           0x00000007
-#endif /* defined (CONFIG_440EPX) || defined (CONFIG_440GRX) */
 
 /*-----------------------------------------------------------------------------
 | IIC Register Offsets
 #define IICXTCNTLSS            0x0F
 #define IICDIRECTCNTL          0x10
 
-/*-----------------------------------------------------------------------------
-| UART Register Offsets
-'----------------------------------------------------------------------------*/
-#define DATA_REG               0x00
-#define DL_LSB                 0x00
-#define DL_MSB                 0x01
-#define INT_ENABLE             0x01
-#define FIFO_CONTROL           0x02
-#define LINE_CONTROL           0x03
-#define MODEM_CONTROL          0x04
-#define LINE_STATUS            0x05
-#define MODEM_STATUS           0x06
-#define SCRATCH                        0x07
-
 /*-----------------------------------------------------------------------------
 | PCI Internal Registers et. al. (accessed via plb)
 +----------------------------------------------------------------------------*/
-#define PCIX0_CFGADR           (CFG_PCI_BASE + 0x0ec00000)
-#define PCIX0_CFGDATA          (CFG_PCI_BASE + 0x0ec00004)
-#define PCIX0_CFGBASE          (CFG_PCI_BASE + 0x0ec80000)
-#define PCIX0_IOBASE           (CFG_PCI_BASE + 0x08000000)
+#define PCIX0_CFGADR           (CONFIG_SYS_PCI_BASE + 0x0ec00000)
+#define PCIX0_CFGDATA          (CONFIG_SYS_PCI_BASE + 0x0ec00004)
+#define PCIX0_CFGBASE          (CONFIG_SYS_PCI_BASE + 0x0ec80000)
+#define PCIX0_IOBASE           (CONFIG_SYS_PCI_BASE + 0x08000000)
 
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
 
 /* PCI Local Configuration Registers
    --------------------------------- */
-#define PCI_MMIO_LCR_BASE (CFG_PCI_BASE + 0x0f400000)    /* Real => 0x0EF400000 */
+#define PCI_MMIO_LCR_BASE (CONFIG_SYS_PCI_BASE + 0x0f400000)    /* Real => 0x0EF400000 */
 
 /* PCI Master Local Configuration Registers */
 #define PCIX0_PMM0LA         (PCI_MMIO_LCR_BASE + 0x00) /* PMM0 Local Address */
 #if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
 
 /* USB2.0 Device */
-#define USB2D0_BASE         CFG_USB2D0_BASE
+#define USB2D0_BASE         CONFIG_SYS_USB2D0_BASE
 
 #define USB2D0_INTRIN       (USB2D0_BASE + 0x00000000)
 
 #if defined(CONFIG_440GP) || defined(CONFIG_440GX) || \
     defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
     defined(CONFIG_460SX)
-#define GPIO0_BASE             (CFG_PERIPHERAL_BASE+0x00000700)
+#define GPIO0_BASE             (CONFIG_SYS_PERIPHERAL_BASE+0x00000700)
 
 #define GPIO0_OR               (GPIO0_BASE+0x0)
 #define GPIO0_TCR              (GPIO0_BASE+0x4)
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT)
-#define GPIO0_BASE             (CFG_PERIPHERAL_BASE+0x00000B00)
-#define GPIO1_BASE             (CFG_PERIPHERAL_BASE+0x00000C00)
+#define GPIO0_BASE             (CONFIG_SYS_PERIPHERAL_BASE+0x00000B00)
+#define GPIO1_BASE             (CONFIG_SYS_PERIPHERAL_BASE+0x00000C00)
 
 #define GPIO0_OR               (GPIO0_BASE+0x0)
 #define GPIO0_TCR              (GPIO0_BASE+0x4)
 
 #ifndef __ASSEMBLY__
 
-static inline u32 get_mcsr(void)
-{
-       u32 val;
-
-       asm volatile("mfspr %0, 0x23c" : "=r" (val) :);
-       return val;
-}
-
-static inline void set_mcsr(u32 val)
-{
-       asm volatile("mtspr 0x23c, %0" : "=r" (val) :);
-}
-
 #endif /* _ASMLANGUAGE */
 
 #endif /* __PPC440_H__ */