diff options
author | Andreas Dannenberg <dannenberg@ti.com> | 2019-06-04 17:55:44 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-07-17 11:12:54 -0400 |
commit | 70942db4dd1c5f177ea750df301d5b80c1fc15dc (patch) | |
tree | 7669fc73419188421ce05f874d20f46ab820d7a4 | |
parent | c7d7e556f2612062e9ccc1e536f3526fef51806b (diff) |
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>
-rw-r--r-- | drivers/mmc/am654_sdhci.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c index fe633aa39a..fb0fb58070 100644 --- a/drivers/mmc/am654_sdhci.c +++ b/drivers/mmc/am654_sdhci.c @@ -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; } |