aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2021-11-24 18:45:59 +0000
committerUlf Hansson <ulf.hansson@linaro.org>2021-12-14 21:35:25 +0100
commit0dc7a3ec30769aedb32036b785e69ee73d6b653f (patch)
tree2259606a88466cf77cc96ec321e98389375e4b9d /drivers/mmc/host/dw_mmc.c
parentmmc: sdhci-pci: Add PCI ID for Intel ADL (diff)
downloadlinux-dev-0dc7a3ec30769aedb32036b785e69ee73d6b653f.tar.xz
linux-dev-0dc7a3ec30769aedb32036b785e69ee73d6b653f.zip
mmc: dw_mmc: add common capabilities to replace caps
The caps field depends on the mshcN alias ID but for some devices this is unnecessary as the capabilities are the same for all instances sharing the same compatible. Add a common_caps field for this case which updates the host's capabilities without needing the mshcN alias ID. Signed-off-by: John Keeping <john@metanate.com> Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Link: https://lore.kernel.org/r/20211124184603.3897245-2-john@metanate.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 195f2b2434b0..f2a14a434bef 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2856,6 +2856,9 @@ static int dw_mci_init_slot_caps(struct dw_mci_slot *slot)
if (host->pdata->pm_caps)
mmc->pm_caps = host->pdata->pm_caps;
+ if (drv_data)
+ mmc->caps |= drv_data->common_caps;
+
if (host->dev->of_node) {
ctrl_id = of_alias_get_id(host->dev->of_node, "mshc");
if (ctrl_id < 0)