mmc: sdhci-msm: skip eMMC slot probe if eMMC isn't a bootdevice
If eMMC is not a primary bootdevice, there isn't any point of probing eMMC device hence disable the probing in such case. Change-Id: I67a025606b03bb3cc21e818c2b4b519aa2b53888 Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
This commit is contained in:
parent
e288b5efd1
commit
5827a3e53d
@ -436,6 +436,18 @@ struct sdhci_msm_host {
|
||||
u32 pm_qos_delay;
|
||||
};
|
||||
|
||||
#define ANDROID_BOOT_DEV_MAX 30
|
||||
static char android_boot_dev[ANDROID_BOOT_DEV_MAX];
|
||||
|
||||
#ifndef MODULE
|
||||
static int __init get_android_boot_dev(char *str)
|
||||
{
|
||||
strlcpy(android_boot_dev, str, ANDROID_BOOT_DEV_MAX);
|
||||
return 1;
|
||||
}
|
||||
__setup("androidboot.bootdevice=", get_android_boot_dev);
|
||||
#endif
|
||||
|
||||
static struct sdhci_msm_host *sdhci_slot[2];
|
||||
|
||||
static int sdhci_msm_update_qos_constraints(struct qos_cpu_group *qcg,
|
||||
@ -3552,6 +3564,13 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
||||
dev_err(&pdev->dev, "get slot index failed %d\n", ret);
|
||||
else if (ret <= 2)
|
||||
sdhci_slot[ret-1] = msm_host;
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "non-removable") &&
|
||||
strlen(android_boot_dev) &&
|
||||
strcmp(android_boot_dev, dev_name(dev))) {
|
||||
ret = -ENODEV;
|
||||
goto pltfm_free;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user