]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/BuR/common/common.c
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot
[people/ms/u-boot.git] / board / BuR / common / common.c
index 441465c005ec4cba07cb0e2783fcfd928df3c28a..876150402c8f5fe5d3500555464074d329063c63 100644 (file)
@@ -12,7 +12,6 @@
 #include <version.h>
 #include <common.h>
 #include <errno.h>
-#include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/omap.h>
@@ -260,7 +259,7 @@ static int load_devicetree(void)
        }
 #ifdef CONFIG_NAND
        dtbsize = 0x20000;
-       rc = nand_read_skip_bad(&nand_info[0], 0x40000, (size_t *)&dtbsize,
+       rc = nand_read_skip_bad(nand_info[0], 0x40000, (size_t *)&dtbsize,
                                NULL, 0x20000, (u_char *)dtbaddr);
 #else
        char *dtbname = getenv("dtb");
@@ -640,8 +639,7 @@ static struct cpsw_platform_data cpsw_data = {
 };
 #endif /* CONFIG_DRIVER_TI_CPSW, ... */
 
-#if defined(CONFIG_DRIVER_TI_CPSW)
-
+#if defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)
 int board_eth_init(bd_t *bis)
 {
        int rv = 0;
@@ -658,8 +656,6 @@ int board_eth_init(bd_t *bis)
        mac_addr[4] = mac_lo & 0xFF;
        mac_addr[5] = (mac_lo & 0xFF00) >> 8;
 
-#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
-       (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
        if (!getenv("ethaddr")) {
                #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_FDT)
                printf("<ethaddr> not set. trying DTB ... ");
@@ -685,11 +681,10 @@ int board_eth_init(bd_t *bis)
                printf("Error %d registering CPSW switch\n", rv);
                return 0;
        }
-#endif /* CONFIG_DRIVER_TI_CPSW, ... */
        return rv;
 }
-#endif /* CONFIG_DRIVER_TI_CPSW */
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#endif /* defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD) */
+#if defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(1, 0, 0, -1, -1);