]> git.sur5r.net Git - u-boot/blobdiff - board/pn62/pn62.c
Change initdram() return type to phys_size_t
[u-boot] / board / pn62 / pn62.c
index c0111dcd921dd748226bd074540ae47fbe1d9cb2..d905b2965cc7fa0a23ccd52090664ca43e564563 100644 (file)
@@ -26,6 +26,7 @@
 
 #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 +75,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;
@@ -122,8 +123,6 @@ void pci_init_board (void)
 
 int misc_init_r (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        char str[20];
        u8 mac[6];
 
@@ -145,11 +144,13 @@ int misc_init_r (void)
        }
        show_startup_phase (10);
 
+#ifdef CONFIG_HAS_ETH1
        if (getenv ("eth1addr") == NULL &&
                get_mac_address (1, mac, str, sizeof (str)) > 0) {
                setenv ("eth1addr", str);
                memcpy (gd->bd->bi_enet1addr, mac, 6);
        }
+#endif /* CONFIG_HAS_ETH1 */
        show_startup_phase (11);
 
        /* Tell everybody that U-Boot is up and runnig */
@@ -165,7 +166,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;