X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fpn62%2Fpn62.c;h=d905b2965cc7fa0a23ccd52090664ca43e564563;hb=9973e3c614721bbf169882ffc3be266a6611cd60;hp=c0111dcd921dd748226bd074540ae47fbe1d9cb2;hpb=c83bf6a2d00ef846c1fb2b0c60540f03ef203125;p=u-boot diff --git a/board/pn62/pn62.c b/board/pn62/pn62.c index c0111dcd92..d905b2965c 100644 --- a/board/pn62/pn62.c +++ b/board/pn62/pn62.c @@ -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;