ppc: cleanup compiler errors/warnings
authorHeiko Schocher <hs@denx.de>
Thu, 26 Mar 2009 06:33:59 +0000 (07:33 +0100)
committerWolfgang Denk <wd@denx.de>
Fri, 27 Mar 2009 19:23:32 +0000 (20:23 +0100)
Current u-boot top of tree builds with warnings/errors for
the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823
RPXClassic debris PN62

following patch solves this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
board/RPXClassic/RPXClassic.c
board/etin/debris/debris.c
board/mbx8xx/mbx8xx.c
board/nx823/nx823.c
board/pn62/pn62.c
board/siemens/IAD210/IAD210.c
board/sixnet/sixnet.c
board/v38b/v38b.c
common/cmd_elf.c
cpu/mpc512x/cpu.c
include/configs/MBX860T.h

index 5aa713f..c3d5385 100644 (file)
@@ -30,6 +30,7 @@
 #include <i2c.h>
 #include <config.h>
 #include <mpc8xx.h>
+#include <net.h>
 
 /* ------------------------------------------------------------------------- */
 
@@ -151,7 +152,7 @@ int misc_init_r(void)
 
        if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
                board_get_enetaddr(enetaddr);
-               eth_putenv_enetaddr("ethaddr", enetaddr);
+               eth_setenv_enetaddr("ethaddr", enetaddr);
        }
 
        return 0;
index a971af3..33efe16 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <mpc824x.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <netdev.h>
index a3bf1f7..255796b 100644 (file)
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <commproc.h>
 #include <mpc8xx.h>
+#include <net.h>
 #include "dimm.h"
 #include "vpd.h"
 #include "csr.h"
@@ -257,7 +258,7 @@ int misc_init_r(void)
 
        if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
                board_get_enetaddr(enetaddr);
-               eth_putenv_enetaddr("ethaddr", enetaddr);
+               eth_setenv_enetaddr("ethaddr", enetaddr);
        }
 
        return 0;
index 6ec29dc..7867fff 100644 (file)
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <mpc8xx.h>
+#include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -366,7 +367,7 @@ int misc_init_r (void)
        char tmp[50];
        uchar ethaddr[6];
        bd_t *bd = gd->bd;
-       ulong my_sernum = bd->bi_sernum;
+       ulong *my_sernum = (unsigned long *)&bd->bi_sernum;
 
        /* load unique serial number */
        for (i = 0; i < 8; ++i)
index 53d7e57..676f8d3 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <mpc824x.h>
+#include <net.h>
 #include <pci.h>
 #include <netdev.h>
 
index 67e5c8f..7325a93 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <mpc8xx.h>
+#include <net.h>
 #include "atm.h"
 #include <i2c.h>
 
@@ -291,7 +292,7 @@ int misc_init_r(void)
 
        if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
                board_get_enetaddr(enetaddr);
-               eth_putenv_enetaddr("ethaddr", enetaddr);
+               eth_setenv_enetaddr("ethaddr", enetaddr);
        }
 
        return 0;
index 4fcd84b..6e39b01 100644 (file)
@@ -260,9 +260,6 @@ int misc_init_r (void)
 {
        volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immap->im_memctl;
-       char* s;
-       char* e;
-       int reg;
        bd_t *bd = gd->bd;
        uchar enetaddr[6];
 
index 9e7c1d7..978ff8d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <common.h>
 #include <mpc5xxx.h>
+#include <net.h>
 #include <asm/processor.h>
 
 
@@ -230,7 +231,7 @@ int misc_init_r(void)
 
        if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
                board_get_enetaddr(enetaddr);
-               eth_putenv_enetaddr("ethaddr", enetaddr);
+               eth_setenv_enetaddr("ethaddr", enetaddr);
        }
 
        return 0;
index 4a3fff1..83e7589 100644 (file)
@@ -131,11 +131,11 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 #if defined(CONFIG_WALNUT)
        tmp = (char *) CONFIG_SYS_NVRAM_BASE_ADDR + 0x500;
-       eth_getenv_enetaddr("ethaddr", build_buf);
+       eth_getenv_enetaddr("ethaddr", (uchar *)build_buf);
        memcpy(tmp, &build_buf[3], 3);
 #elif defined(CONFIG_SYS_VXWORKS_MAC_PTR)
        tmp = (char *) CONFIG_SYS_VXWORKS_MAC_PTR;
-       eth_getenv_enetaddr("ethaddr", build_buf);
+       eth_getenv_enetaddr("ethaddr", (uchar *)build_buf);
        memcpy(tmp, build_buf, 6);
 #else
        puts ("## Ethernet MAC address not copied to NV RAM\n");
index be532af..8021bc1 100644 (file)
@@ -30,6 +30,7 @@
 #include <common.h>
 #include <command.h>
 #include <mpc512x.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
 
index 0c28710..afe2383 100644 (file)
 */
 #define NR_8259_INTS   0
 
+#define CONFIG_CMD_NET
 /*
  * MPC8xx CPM Options
  */