]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/pn62/pn62.c
rename CFG_ macros to CONFIG_SYS
[karo-tx-uboot.git] / board / pn62 / pn62.c
index 025224027e8edc2fc997c076230dd13ecd1bfe05..1b545bfa9d5e9aed0730cf37c2006545df4fc855 100644 (file)
 #include <common.h>
 #include <mpc824x.h>
 #include <pci.h>
+#include <netdev.h>
 
 #include "pn62.h"
 
+DECLARE_GLOBAL_DATA_PTR;
 
 static int get_serial_number (char *string, int size);
 static int get_mac_address (int id, u8 * mac, char *string, int size);
@@ -74,7 +76,7 @@ int checkboard (void)
        return 0;
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        long size;
        long new_bank0_end;
@@ -83,7 +85,7 @@ long int initdram (int board_type)
 
        show_startup_phase (2);
 
-       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);
@@ -122,8 +124,6 @@ void pci_init_board (void)
 
 int misc_init_r (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        char str[20];
        u8 mac[6];
 
@@ -167,7 +167,7 @@ static int get_serial_number (char *string, int size)
        if (size < I2155X_VPD_SN_SIZE)
                size = I2155X_VPD_SN_SIZE;
        for (i = 0; i < (size - 1); i++) {
-               i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, &c);
+               i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, (uchar *)&c);
                if (c == '\0')
                        break;
                string[i] = c;
@@ -187,3 +187,8 @@ static int get_mac_address (int id, u8 * mac, char *string, int size)
                                mac[0], mac[1], mac[2],
                                mac[3], mac[4], mac[5]);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}