diff mbox series

mmc: core: sdio: Respect quirk_max_rate for non-UHS mode

Message ID 1732268242-72799-1-git-send-email-shawn.lin@rock-chips.com
State New
Headers show
Series mmc: core: sdio: Respect quirk_max_rate for non-UHS mode | expand

Commit Message

Shawn Lin Nov. 22, 2024, 9:37 a.m. UTC
The same limitation was done in UHS mode, so fix it in
non-UHS mode.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/mmc/core/sdio.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ulf Hansson Dec. 2, 2024, 3:23 p.m. UTC | #1
On Fri, 22 Nov 2024 at 10:37, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>
> The same limitation was done in UHS mode, so fix it in
> non-UHS mode.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Applied for next, thanks!

I took the liberty of clarifying the commit message a bit, please let
me know if my change doesn't make sense to you!

Kind regards
Uffe


> ---
>
>  drivers/mmc/core/sdio.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> index 4fb247f..b31ca2b 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;
>  }
>
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 4fb247f..b31ca2b 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;
 }