Blackfin: support console-over-JTAG
[oweals/u-boot.git] / cpu / mpc8220 / cpu.c
index 0cfe8089b8a8abb101cce2875f396a369a6f2183..563cfe0536b57f98c9d00b1649d43090921f0aa0 100644 (file)
 #include <watchdog.h>
 #include <command.h>
 #include <mpc8220.h>
+#include <netdev.h>
 #include <asm/processor.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int checkcpu (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong clock = gd->cpu_clk;
        char buf[32];
 
@@ -42,7 +43,7 @@ int checkcpu (void)
 
        printf (CPU_ID_STR);
 
-       printf (" (JTAG ID %08lx)", *(vu_long *) (CFG_MBAR + 0x50));
+       printf (" (JTAG ID %08lx)", *(vu_long *) (CONFIG_SYS_MBAR + 0x50));
 
        printf (" at %s MHz\n", strmhz (buf, clock));
 
@@ -81,8 +82,6 @@ int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
  */
 unsigned long get_tbclk (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong tbclk;
 
        tbclk = (gd->bus_clk + 3L) / 4L;
@@ -91,3 +90,15 @@ unsigned long get_tbclk (void)
 }
 
 /* ------------------------------------------------------------------------- */
+
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+int cpu_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_MPC8220_FEC)
+       mpc8220_fec_initialize(bis);
+#endif
+       return 0;
+}