summaryrefslogtreecommitdiff
path: root/board/ti
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2017-02-01 13:39:14 +0300
committerTom Rini <trini@konsulko.com>2017-03-20 05:17:14 +0300
commitd5abcf94c7123167725fc22ace342f0d455093c1 (patch)
treeca1d964a4d7d798c498a3b6b409c3d68dad4a7da /board/ti
parent02ccab1908c405fe1449457d4a0d343784a30acb (diff)
downloadu-boot-d5abcf94c7123167725fc22ace342f0d455093c1.tar.xz
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot
To keep a consistent MMC device mapping in SPL and in u-boot, let's register the MMC controllers the same way in u-boot and in the SPL. In terms of boot time, it doesn't hurt to register more controllers than needed because the MMC device is initialized only prior being accessed for the first time. Having the same device mapping in SPL and u-boot allows us to use the environment in SPL whatever the MMC boot device. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/am3517crane/am3517crane.c2
-rw-r--r--board/ti/am57xx/board.c2
-rw-r--r--board/ti/beagle/beagle.c2
-rw-r--r--board/ti/dra7xx/evm.c2
-rw-r--r--board/ti/evm/evm.c2
-rw-r--r--board/ti/ks2_evm/board_k2g.c2
-rw-r--r--board/ti/omap5_uevm/evm.c2
-rw-r--r--board/ti/panda/panda.c4
-rw-r--r--board/ti/sdp4430/sdp.c4
-rw-r--r--board/ti/ti814x/evm.c2
10 files changed, 14 insertions, 10 deletions
diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c
index 8d1c390e5d..faa95d7da8 100644
--- a/board/ti/am3517crane/am3517crane.c
+++ b/board/ti/am3517crane/am3517crane.c
@@ -63,7 +63,7 @@ void set_muxconf_regs(void)
MUX_AM3517CRANE();
}
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
return omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 1611514417..df9039c769 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -559,7 +559,7 @@ err:
}
#endif
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index a6908d4bed..e90fe1aba8 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -524,7 +524,7 @@ void set_muxconf_regs(void)
MUX_BEAGLE();
}
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
return omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index bd1c80942e..de6fc19cb0 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -679,7 +679,7 @@ err:
}
#endif
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index ff3971dda8..4f132e5107 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -259,7 +259,7 @@ int board_eth_init(bd_t *bis)
}
#endif /* CONFIG_CMD_NET */
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
return omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 40edbaa33f..372fc35a5c 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -102,7 +102,7 @@ s16 divn_val[16] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
if (psc_enable_module(KS2_LPSC_MMC)) {
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index b5d5ba9bdf..64d772ca6e 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -211,7 +211,7 @@ void set_muxconf_regs(void)
sizeof(struct pad_conf_entry));
}
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index 13b5dafe82..187ff3cff4 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -287,17 +287,19 @@ void set_muxconf_regs(void)
sizeof(struct pad_conf_entry));
}
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
return omap_mmc_init(0, 0, 0, -1, -1);
}
+#if !defined(CONFIG_SPL_BUILD)
void board_mmc_power_init(void)
{
twl6030_power_mmc_init(0);
}
#endif
+#endif
#ifdef CONFIG_USB_EHCI
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index 6037cdd6c1..0eb60e4271 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -73,7 +73,7 @@ void set_muxconf_regs(void)
sizeof(struct pad_conf_entry));
}
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);
@@ -81,12 +81,14 @@ int board_mmc_init(bd_t *bis)
return 0;
}
+#if !defined(CONFIG_SPL_BUILD)
void board_mmc_power_init(void)
{
twl6030_power_mmc_init(0);
twl6030_power_mmc_init(1);
}
#endif
+#endif
/*
* get_board_rev() - get board revision
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index e406dabfc0..e85794c60e 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -111,7 +111,7 @@ int board_init(void)
return 0;
}
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_GENERIC_MMC)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(1, 0, 0, -1, -1);