board: samsung: configure emmc_dev environment rework
authorChanho Park <chanho61.park@samsung.com>
Wed, 2 Dec 2015 05:19:09 +0000 (14:19 +0900)
committerChanho Park <chanho61.park@samsung.com>
Wed, 2 Dec 2015 05:19:09 +0000 (14:19 +0900)
This patch is enhanced and fixed version of previous(895ce33)
patch. Previous patch was reverted due to panic issue because
setenv was failed during board_mmc_init. Thus, I move the
OmPin check and setenv to board_late_init function.

Change-Id: I4194a5669ae53f302229f820dac8159c06de52b3
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
board/samsung/espresso3250/espresso3250.c
board/samsung/smdk5422/smdk5422.c

index 3b9b3b76f584dfe84e7327adda3269c34cacd276..4d413d9dede6acc6ee457ef8352137ee5818f79e 100644 (file)
@@ -530,5 +530,10 @@ int board_late_init(void)
                run_command("fastboot", 0);
        }
 #endif
+
+#ifdef CONFIG_FACTORY_INFO
+       if (readl(&pmu->inform3) == BOOT_MMCSD)
+               setenv("emmc_dev", "1");
+#endif
        return 0;
 }
index ca9dbdd4e9f7e8323eb44943afa8061a56ca1293..e2c39eb113a42b41c4385b642a12139647927b08 100644 (file)
@@ -471,6 +471,12 @@ int board_late_init(void)
                run_command("fastboot", 0);
        }
 #endif
+
+#ifdef CONFIG_FACTORY_INFO
+       if (readl(&pmu->inform3) == BOOT_MMCSD)
+               setenv("emmc_dev", "1");
+#endif
+
        return 0;
 }