]> git.sur5r.net Git - u-boot/blobdiff - board/ti/sdp3430/sdp.c
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx
[u-boot] / board / ti / sdp3430 / sdp.c
index 40cf26f42ae17e03e6a62187c4693b4555490f28..957940d53fe9789ed6c237f200a71a2124530802 100644 (file)
@@ -3,33 +3,21 @@
  * Texas Instruments Incorporated, <www.ti.com>
  * Richard Woodruff <r-woodruff2@ti.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <netdev.h>
 #include <twl4030.h>
 #include <asm/io.h>
+#include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-types.h>
 #include "sdp.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 const omap3_sysinfo sysinfo = {
        DDR_DISCRETE,
        "OMAP3 SDP3430 board",
@@ -100,8 +88,6 @@ extern struct gpmc *gpmc_cfg;
  */
 int board_init(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
        /* TODO: Dynamically pop out CS mapping and program accordingly */
        /* Configure devices for default ON ON ON settings */
@@ -125,12 +111,13 @@ int board_init(void)
 #define ETH_CONTROL_REG                (CONFIG_LAN91C96_BASE + 0x30b)
 
 /**
- * @brief ether_init Take the Ethernet controller out of reset and wait
+ * @brief board_eth_init Take the Ethernet controller out of reset and wait
  * for the EEPROM load to complete.
  */
-static void ether_init(void)
+int board_eth_init(bd_t *bis)
 {
-#ifdef CONFIG_DRIVER_LAN91C96
+       int rc = 0;
+#ifdef CONFIG_LAN91C96
        int cnt = 20;
 
        writew(0x0, LAN_RESET_REGISTER);
@@ -155,10 +142,11 @@ static void ether_init(void)
 
        writeb(readb(ETH_CONTROL_REG) & ~0x1, ETH_CONTROL_REG);
        udelay(1000);
+       rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
 reset_err_out:
-       return;
 
 #endif
+       return rc;
 }
 
 /**
@@ -187,7 +175,6 @@ int misc_init_r(void)
         *   VSIM  - off (init, variable) for MMC1.DAT[3..7], SIM
         *   VPLL2 - 1.8V
         */
-       ether_init();
 
        return 0;
 }
@@ -202,3 +189,10 @@ void set_muxconf_regs(void)
        /* platform specific muxes */
        MUX_SDP3430();
 }
+
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+       return omap_mmc_init(0, 0, 0, -1, -1);
+}
+#endif