]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/mvblue/mvblue.c
bd_info: remove bi_barudrate member from struct bd_info
[karo-tx-uboot.git] / board / mvblue / mvblue.c
index 20a551dfa5a3e8d64dc30eca40fa97183415330b..63503e89da1abe46a49175f95fee61718803d82f 100644 (file)
@@ -9,11 +9,14 @@
 #include <mpc824x.h>
 #include <asm/io.h>
 #include <ns16550.h>
+#include <netdev.h>
 
 #ifdef CONFIG_PCI
 #include <pci.h>
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 u32 get_BoardType (void);
 
 #define PCI_CONFIG(b,d,f,r)    cpu_to_le32(0x80000000 | ((b&0xff)<<16) \
@@ -35,8 +38,8 @@ u32 get_BoardType ()
 
 void init_2nd_DUART (void)
 {
-       NS16550_t console = (NS16550_t) CFG_NS16550_COM2;
-       int clock_divisor = CFG_NS16550_CLK / 16 / CONFIG_BAUDRATE;
+       NS16550_t console = (NS16550_t) CONFIG_SYS_NS16550_COM2;
+       int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE;
 
        *(u8 *) (0xfc004511) = 0x1;
        NS16550_init (console, clock_divisor);
@@ -50,13 +53,11 @@ void hw_watchdog_reset (void)
 }
 int checkboard (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        ulong busfreq = get_bus_freq (0);
        char buf[32];
        u32 BoardType = get_BoardType ();
        char *BoardName[2] = { "mvBlueBOX", "mvBlueLYNX" };
        char *p;
-       bd_t *bd = gd->bd;
 
        hw_watchdog_reset ();
 
@@ -69,20 +70,20 @@ int checkboard (void)
        if ((p = getenv ("console_nr")) != NULL) {
                unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
 
-               bd->bi_baudrate &= ~3;
-               bd->bi_baudrate |= con_nr & 3;
+               gd->baudrate &= ~3;
+               gd->baudrate |= con_nr & 3;
        }
        return 0;
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        long size;
        long new_bank0_end;
        long mear1;
        long emear1;
 
-       size = get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE);
+       size = get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_MAX_RAM_SIZE);
 
        new_bank0_end = size - 1;
        mear1 = mpc824x_mpc107_getreg(MEAR1);
@@ -145,12 +146,12 @@ void pci_mvblue_clear_base (struct pci_controller *hose, pci_dev_t dev)
 void duart_setup (u32 base, u16 divisor)
 {
        printf ("duart setup ...");
-       out_8 ((u8 *) (CFG_ISA_IO + base + 3), 0x80);
-       out_8 ((u8 *) (CFG_ISA_IO + base + 0), divisor & 0xff);
-       out_8 ((u8 *) (CFG_ISA_IO + base + 1), divisor >> 8);
-       out_8 ((u8 *) (CFG_ISA_IO + base + 3), 0x03);
-       out_8 ((u8 *) (CFG_ISA_IO + base + 4), 0x03);
-       out_8 ((u8 *) (CFG_ISA_IO + base + 2), 0x07);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 3), 0x80);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 0), divisor & 0xff);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 1), divisor >> 8);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 3), 0x03);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 4), 0x03);
+       out_8 ((u8 *) (CONFIG_SYS_ISA_IO + base + 2), 0x07);
        printf ("done\n");
 }
 
@@ -244,4 +245,9 @@ void pci_init_board (void)
 {
        pci_mpc824x_init (&hose);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
 #endif