platform: msm_shared: Add support for mdm boot config
With MDM platforms the default boot device is NAND because
of this the boot config register values vary between mdm
and msm platforms. Differentiate the boot config values
based on the platform.
Change-Id: Ia9e68435967d0d0242ec76c1d72cda0c6eb6195a
diff --git a/platform/msm_shared/boot_device.c b/platform/msm_shared/boot_device.c
index a5e6131..c120b6c 100644
--- a/platform/msm_shared/boot_device.c
+++ b/platform/msm_shared/boot_device.c
@@ -53,7 +53,12 @@
boot_dev_type = platform_get_boot_dev();
+#if USE_MDM_BOOT_CFG
+ /* For MDM default boot device is NAND */
+ if (boot_dev_type == BOOT_EMMC)
+#else
if (boot_dev_type == BOOT_EMMC || boot_dev_type == BOOT_DEFAULT)
+#endif
boot_dev_type = 1;
else
boot_dev_type = 0;
@@ -71,15 +76,16 @@
val = platform_get_boot_dev();
switch(val)
{
+#if !USE_MDM_BOOT_CFG
case BOOT_DEFAULT:
- case BOOT_EMMC:
sprintf(buf, "%x.sdhci", ((struct mmc_device *)dev)->host.base);
break;
case BOOT_UFS:
sprintf(buf, "%x.ufshc", ((struct ufs_dev *)dev)->base);
break;
- case BOOT_NAND:
- sprintf(buf, "%x.nandc", nand_device_base());
+#endif
+ case BOOT_EMMC:
+ sprintf(buf, "%x.sdhci", ((struct mmc_device *)dev)->host.base);
break;
default:
dprintf(CRITICAL,"ERROR: Unexpected boot_device val=%x",val);