summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2024-11-22 17:37:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 11:36:01 +0100
commitb5962125d454661bd79d4936d5af10549e09124b (patch)
treeb1b62d6763fa3ebd0cc533d36f1bddc7415031c3 /drivers/mmc/core/sdio.c
parent4d44aa4d03a5600cf15e0d5ebee1f76c6f915e44 (diff)
downloadlinux-b5962125d454661bd79d4936d5af10549e09124b.tar.gz
linux-b5962125d454661bd79d4936d5af10549e09124b.tar.bz2
linux-b5962125d454661bd79d4936d5af10549e09124b.zip
mmc: core: Respect quirk_max_rate for non-UHS SDIO card
[ Upstream commit a2a44f8da29352f76c99c6904ee652911b8dc7dd ] The card-quirk was added to limit the clock-rate for a card with UHS-mode support, although let's respect the quirk for non-UHS mode too, to make the behaviour consistent. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Message-ID: <1732268242-72799-1-git-send-email-shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 9566837c9848..4b19b8a16b09 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -458,6 +458,8 @@ static unsigned mmc_sdio_get_max_clock(struct mmc_card *card)
if (mmc_card_sd_combo(card))
max_dtr = min(max_dtr, mmc_sd_get_max_clock(card));
+ max_dtr = min_not_zero(max_dtr, card->quirk_max_rate);
+
return max_dtr;
}