ppc4xx: Big cleanup of PPC4xx defines
[platform/kernel/u-boot.git] / board / amcc / taihu / taihu.c
index 254e3eb..4e5796e 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <spi.h>
+#include <netdev.h>
 #include <asm/gpio.h>
 
 extern int lcd_init(void);
@@ -47,14 +48,14 @@ int board_early_init_f(void)
        mtdcr(uicsr, 0xFFFFFFFF);       /* clear all ints */
        mtdcr(uicvcr, 0x00000001);      /* set vect base=0,INT0 highest priority */
 
-       mtebc(pb3ap, CFG_EBC_PB3AP);    /* memory bank 3 (CPLD_LCM) initialization */
-       mtebc(pb3cr, CFG_EBC_PB3CR);
+       mtebc(PB3AP, CONFIG_SYS_EBC_PB3AP);     /* memory bank 3 (CPLD_LCM) initialization */
+       mtebc(PB3CR, CONFIG_SYS_EBC_PB3CR);
 
        /*
         * Configure CPC0_PCI to enable PerWE as output
         * and enable the internal PCI arbiter
         */
-       mtdcr(cpc0_pci, CPC0_PCI_SPE | CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN);
+       mtdcr(CPC0_PCI, CPC0_PCI_SPE | CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN);
 
        return 0;
 }
@@ -77,15 +78,6 @@ int checkboard(void)
        return 0;
 }
 
-/*************************************************************************
- *  phys_size_t initdram
- *
- ************************************************************************/
-phys_size_t initdram(int board)
-{
-       return CFG_SDRAM_SIZE_PER_BANK * CFG_SDRAM_BANKS; /* 128Mbytes */
-}
-
 static int do_sw_stat(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
 {
        char stat;
@@ -101,22 +93,22 @@ static int do_sw_stat(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
 
 U_BOOT_CMD (
        sw2_stat, 1, 1, do_sw_stat,
-       "sw2_stat - show status of switch 2\n",
-       NULL
-       );
+       "show status of switch 2",
+       ""
+);
 
 static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
 {
        int led_no;
 
        if (argc != 3) {
-               printf("%s", cmd_tp->usage);
+               cmd_usage(cmd_tp);
                return -1;
        }
 
        led_no = simple_strtoul(argv[1], NULL, 16);
        if (led_no != 1 && led_no != 2) {
-               printf("%s", cmd_tp->usage);
+               cmd_usage(cmd_tp);
                return -1;
        }
 
@@ -131,7 +123,7 @@ static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
                else
                        gpio_write_bit(31, 0);
        } else {
-               printf("%s", cmd_tp->usage);
+               cmd_usage(cmd_tp);
                return -1;
        }
 
@@ -140,10 +132,10 @@ static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
 
 U_BOOT_CMD (
        led_ctl, 3, 1, do_led_ctl,
-       "led_ctl        - make led 1 or 2  on or off\n",
+       "make led 1 or 2  on or off",
        "<led_no> <on/off>      -  make led <led_no> on/off,\n"
-       "\tled_no is 1 or 2\t"
-       );
+       "\tled_no is 1 or 2"
+);
 
 #define SPI_CS_GPIO0   0
 #define SPI_SCLK_GPIO14        14
@@ -200,3 +192,9 @@ int pci_pre_init(struct pci_controller *hose)
        return 1;
 }
 #endif /* CONFIG_PCI */
+
+int board_eth_init(bd_t *bis)
+{
+       cpu_eth_init(bis);
+       return pci_eth_init(bis);
+}