aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInderpal Singh <inderpal.singh@linaro.org>2012-12-18 15:22:14 +0530
committerTushar Behera <tushar.behera@linaro.org>2013-02-05 10:39:12 +0530
commit616ce94ce413a5122f8ffa26318a36226c9231e7 (patch)
treefc7461c1cab46e41069c2d929ab16d22f693ff15
parentb8c475ce0be7ea15ce6eef930d01dad7c57da03f (diff)
downloadu-boot-linaro-stable-616ce94ce413a5122f8ffa26318a36226c9231e7.tar.gz
EXYNOS5250: ARNDALE: Check booting mode and initialize mmc/emmc accordingly
Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
-rw-r--r--board/samsung/smdk5250/smdk5250.c39
1 files changed, 29 insertions, 10 deletions
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 698bc70fb..d70976db1 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -32,6 +32,7 @@
#include "setup.h"
+unsigned int OmPin;
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SMC911X
@@ -65,6 +66,18 @@ static int smc9115_pre_init(void)
int board_init(void)
{
gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
+
+ OmPin = readl(EXYNOS5_POWER_BASE + INFORM3_OFFSET);
+
+ printf("\nChecking Boot Mode ...");
+ if (OmPin == BOOT_MMCSD) {
+ printf(" SDMMC\n");
+ } else if (OmPin == BOOT_EMMC_4_4) {
+ printf(" EMMC4.41\n");
+ } else {
+ printf(" Please check OM_pin\n");
+ }
+
return 0;
}
@@ -132,22 +145,28 @@ int checkboard(void)
int board_mmc_init(bd_t *bis)
{
int err;
-
+
+ err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE);
+ if (err) {
+ debug("SDMMC0 not configured\n");
+ return err;
+ }
+
err = exynos_pinmux_config(PERIPH_ID_SDMMC2, PINMUX_FLAG_NONE);
if (err) {
debug("SDMMC2 not configured\n");
return err;
}
- err = exynos_dwmmc_init(2, 4);
-
- err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE);
- if (err) {
- debug("SDMMC0 not configured\n");
- return err;
- }
-
- err = exynos_dwmmc_init(0, 8);
+ if (OmPin == BOOT_EMMC_4_4) {
+ err = exynos_dwmmc_init(0, 8);
+ err = exynos_dwmmc_init(2, 4);
+ } else {
+ err = exynos_dwmmc_init(2, 4);
+ err = exynos_dwmmc_init(0, 8);
+ }
+
+ err = exynos_dwmmc_init(0, 8);
return err;
}