Net: Clean up LAN91C96 Support
[oweals/u-boot.git] / board / dave / B2 / B2.c
index 64fe948fcce840155976b355922a13c46b9afdab..096ebbd16c84e0b2dd18d0270745bd1ba0c3b485 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include <common.h>
+#include <netdev.h>
 #include <asm/hardware.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -78,16 +79,16 @@ int board_init (void)
        INTCON = 0x05;
 
     /*
-       Configure chip ethernet interrupt as High level
-       Port G EINT 0-7 EINT0 -> CHIP ETHERNET
+       Configure chip ethernet interrupt as High level
+       Port G EINT 0-7 EINT0 -> CHIP ETHERNET
     */
        temp = EXTINT;
-       temp &= ~0x7;
+       temp &= ~0x7;
     temp |= 0x1; /*LEVEL_HIGH*/
        EXTINT = temp;
 
     /*
-       Reset SMSC LAN91C96 chip
+       Reset SMSC LAN91C96 chip
     */
     temp= PCONF;
     temp |= 0x00000040;
@@ -125,3 +126,14 @@ int dram_init (void)
 
        return (0);
 }
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_LAN91C96
+       rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
+#endif
+       return rc;
+}
+#endif