]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc512x/cpu.c
NAND: Correct the "chip_shift" calculation
[u-boot] / cpu / mpc512x / cpu.c
index 9b5973803dbe47bd802f6afdd71f3606e7a83f3c..42ccd81e7699d12f61f2f90a4046a957559db132 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <mpc512x.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
 
@@ -45,7 +45,7 @@ int checkcpu (void)
        ulong clock = gd->cpu_clk;
        u32 pvr = get_pvr ();
        u32 spridr = immr->sysconf.spridr;
-       char buf[32];
+       char buf1[32], buf2[32];
 
        puts ("CPU:   ");
 
@@ -65,8 +65,9 @@ int checkcpu (void)
        default:
                puts ("unknown ");
        }
-       printf ("at %s MHz, CSB at %3d MHz\n", strmhz(buf, clock),
-               gd->csb_clk / 1000000);
+       printf ("at %s MHz, CSB at %s MHz\n",
+               strmhz(buf1, clock),
+               strmhz(buf2, gd->csb_clk) );
        return 0;
 }
 
@@ -147,15 +148,17 @@ static void old_ft_cpu_setup(void *blob, bd_t *bd)
         * avoid fixing up by path because that
         * produces scary error messages
         */
+       uchar enetaddr[6];
 
        /*
         * old device trees have ethernet nodes with
         * device_type = "network"
         */
+       eth_getenv_enetaddr("ethaddr", enetaddr);
        do_fixup_by_prop(blob, "device_type", "network", 8,
-               "local-mac-address", bd->bi_enetaddr, 6, 0);
+               "local-mac-address", enetaddr, 6, 0);
        do_fixup_by_prop(blob, "device_type", "network", 8,
-               "address", bd->bi_enetaddr, 6, 0);
+               "address", enetaddr, 6, 0);
        /*
         * old device trees have soc nodes with
         * device_type = "soc"