ppc4xx: Fix problem with ECC ordering for PPC4xx NDFC platforms
[oweals/u-boot.git] / cpu / mcf523x / cpu.c
index f0d954b3fbdfdd04ac7983c3bf04e0f623aa614c..a1a51336c23f765a2e3a3292407a6d1ee922c79d 100644 (file)
@@ -28,6 +28,7 @@
 #include <common.h>
 #include <watchdog.h>
 #include <command.h>
+#include <netdev.h>
 
 #include <asm/immap.h>
 
@@ -59,11 +60,13 @@ int checkcpu(void)
        }
 
        if (id) {
+               char buf1[32], buf2[32];
+
                printf("Freescale MCF%d (Mask:%01x Version:%x)\n", id, msk,
                       ver);
-               printf("       CPU CLK %d Mhz BUS CLK %d Mhz\n",
-                      (int)(gd->cpu_clk / 1000000),
-                      (int)(gd->bus_clk / 1000000));
+               printf("       CPU CLK %s MHz BUS CLK %s MHz\n",
+                      strmhz(buf1, gd->cpu_clk),
+                      strmhz(buf2, gd->bus_clk));
        }
 
        return 0;
@@ -97,7 +100,7 @@ int watchdog_init(void)
        u32 wdog_module = 0;
 
        /* set timeout and enable watchdog */
-       wdog_module = ((CFG_CLK / CFG_HZ) * CONFIG_WATCHDOG_TIMEOUT);
+       wdog_module = ((CONFIG_SYS_CLK / CONFIG_SYS_HZ) * CONFIG_WATCHDOG_TIMEOUT);
        wdog_module |= (wdog_module / 8192);
        wdp->mr = wdog_module;
 
@@ -107,3 +110,15 @@ int watchdog_init(void)
        return (0);
 }
 #endif                         /* CONFIG_WATCHDOG */
+
+#if defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mcffec_initialize(bis);
+}
+#endif