mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-27 14:14:37 +08:00
mmc: am654_sdhci: Allow driver to probe without PDs specified
We would like to use the driver even without power domains being specified for cases such as during early boot when the required power domains have already gotten enabled by the SoC's boot ROM and such explicit initialization is not needed and possible. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
c7d7e556f2
commit
70942db4dd
@ -215,14 +215,14 @@ static int am654_sdhci_probe(struct udevice *dev)
|
||||
int ret;
|
||||
|
||||
ret = power_domain_get_by_index(dev, &sdhci_pwrdmn, 0);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to get power domain\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = power_domain_on(&sdhci_pwrdmn);
|
||||
if (ret) {
|
||||
dev_err(dev, "Power domain on failed\n");
|
||||
if (!ret) {
|
||||
ret = power_domain_on(&sdhci_pwrdmn);
|
||||
if (ret) {
|
||||
dev_err(dev, "Power domain on failed (%d)\n", ret);
|
||||
return ret;
|
||||
}
|
||||
} else if (ret != -ENOENT && ret != -ENODEV && ret != -ENOSYS) {
|
||||
dev_err(dev, "failed to get power domain (%d)\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user