summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJeremy Linton <jeremy.linton@arm.com>2020-11-20 17:38:31 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-17 17:06:26 +0100
commit69f8455268335274dc11e52bbe8f30608fb103c2 (patch)
treee863875ef333fb55789dc2f23f0bc4db92a93603 /drivers/mmc
parent73d1a11a198af55f64f908286dde95f6fb9e1650 (diff)
mmc: sdhci: Update firmware interface API
[ Upstream commit c5b1c6dc13daec60405ecd31eaa5379a9f798fa8 ] The device_* calls were added a few years ago to abstract DT/ACPI/fwnode firmware interfaces. Lets convert the two sdhci caps fields to use the generic calls rather than the OF specific ones. This has the side effect of allowing ACPI based devices to quirk themselves when the caps field is broken. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Link: https://lore.kernel.org/r/20201120233831.447365-1-jeremy.linton@arm.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3561ae8a481a..6edf9fffd934 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3994,10 +3994,10 @@ void __sdhci_read_caps(struct sdhci_host *host, const u16 *ver,
if (host->v4_mode)
sdhci_do_enable_v4_mode(host);
- of_property_read_u64(mmc_dev(host->mmc)->of_node,
- "sdhci-caps-mask", &dt_caps_mask);
- of_property_read_u64(mmc_dev(host->mmc)->of_node,
- "sdhci-caps", &dt_caps);
+ device_property_read_u64_array(mmc_dev(host->mmc),
+ "sdhci-caps-mask", &dt_caps_mask, 1);
+ device_property_read_u64_array(mmc_dev(host->mmc),
+ "sdhci-caps", &dt_caps, 1);
v = ver ? *ver : sdhci_readw(host, SDHCI_HOST_VERSION);
host->version = (v & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT;