Skip to content

Commit

Permalink
mmc: sdhci-sprd: Fix minimum clock limit
Browse files Browse the repository at this point in the history
The Spreadtrum controller supports 100KHz minimal clock rate, which means
that the current value 400KHz is wrong.

Unfortunately this has also lead to fail to initialize some cards, which
are allowed to require 100KHz to work. So, let's fix the problem by
changing the minimal supported clock rate to 100KHz.

Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: fb8bd90 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221011104935.10980-1-wenchao.chen666@gmail.com
[Ulf: Clarified to commit-message]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Wenchao Chen authored and storulf committed Oct 11, 2022
1 parent b78870e commit 6e14177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/sdhci-sprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static unsigned int sdhci_sprd_get_max_clock(struct sdhci_host *host)

static unsigned int sdhci_sprd_get_min_clock(struct sdhci_host *host)
{
return 400000;
return 100000;
}

static void sdhci_sprd_set_uhs_signaling(struct sdhci_host *host,
Expand Down

0 comments on commit 6e14177

Please sign in to comment.