Skip to content

Commit 5ae4b0d

Browse files
giuliobenettistorulf
authored andcommitted
mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450
Errata ERR010450 only shows up if voltage is 1.8V, but if the device is supplied by 3v3 the errata can be ignored. So let's check for if quirk SDHCI_QUIRK2_NO_1_8_V is defined or not before limiting the frequency. Cc: Jim Reinhart <[email protected]> Cc: James Autry <[email protected]> Cc: Matthew Maron <[email protected]> Signed-off-by: Giulio Benetti <[email protected]> Acked-by: Haibo Chen <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 899171d commit 5ae4b0d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/mmc/host/sdhci-esdhc-imx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@
171171
#define ESDHC_FLAG_HS400 BIT(9)
172172
/*
173173
* The IP has errata ERR010450
174-
* uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't
175-
* exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
174+
* uSDHC: At 1.8V due to the I/O timing limit, for SDR mode, SD card
175+
* clock can't exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
176176
*/
177177
#define ESDHC_FLAG_ERR010450 BIT(10)
178178
/* The IP supports HS400ES mode */
@@ -961,7 +961,8 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
961961
| ESDHC_CLOCK_MASK);
962962
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
963963

964-
if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) {
964+
if ((imx_data->socdata->flags & ESDHC_FLAG_ERR010450) &&
965+
(!(host->quirks2 & SDHCI_QUIRK2_NO_1_8_V))) {
965966
unsigned int max_clock;
966967

967968
max_clock = imx_data->is_ddr ? 45000000 : 150000000;

0 commit comments

Comments
 (0)