]> git.sur5r.net Git - u-boot/blobdiff - board/apollon/apollon.c
Merge branch 'master' of git://git.denx.de/u-boot-i2c
[u-boot] / board / apollon / apollon.c
index 8efa7039512b29fa428a2b7bb95abaf9ad79a73e..4768f589791000cfe21c6b1fe22d539ee9aa0ee3 100644 (file)
@@ -24,6 +24,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <netdev.h>
 #include <asm/arch/omap2420.h>
 #include <asm/io.h>
 #include <asm/arch/bits.h>
@@ -94,7 +95,6 @@ void s_init(void)
  ********************************************************/
 int misc_init_r(void)
 {
-       ether_init();           /* better done here so timers are init'ed */
        return (0);
 }
 
@@ -138,13 +138,14 @@ void wait_for_command_complete(unsigned int wd_base)
 }
 
 /*******************************************************************
- * Routine:ether_init
+ * Routine:board_eth_init
  * Description: take the Ethernet controller out of reset and wait
  *                for the EEPROM load to complete.
  ******************************************************************/
-void ether_init(void)
+int board_eth_init(bd_t *bis)
 {
-#ifdef CONFIG_DRIVER_LAN91C96
+       int rc = 0;
+#ifdef CONFIG_LAN91C96
        int cnt = 20;
 
        __raw_writeb(0x03, OMAP2420_CTRL_BASE + 0x0f2); /*protect->gpio74 */
@@ -171,10 +172,10 @@ void ether_init(void)
 
        mask_config_reg(ETH_CONTROL_REG, 0x01);
        udelay(1000);
-
+       rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
 eth_reset_err_out:
-       return;
 #endif
+       return rc;
 }
 
 /**********************************************
@@ -245,7 +246,7 @@ void peripheral_enable(void)
        __raw_writel(v, CM_CLKSEL2_CORE);
        __raw_writel(0x1, CM_CLKSEL_WKUP);
 
-#ifdef CFG_NS16550
+#ifdef CONFIG_SYS_NS16550
        /* Enable UART1 clock */
        func_clks |= BIT21;
        if_clks |= BIT21;