Skip to content

Commit ac5a41b

Browse files
Josua-SRstorulf
authored andcommitted
Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch"
This reverts commit 941a7ab. This commit uses presence of device-tree properties vmmc-supply and vqmmc-supply for deciding whether to enable a quirk affecting timing of clock and data. The intention was to address issues observed with eMMC and SD on AM62 platforms. This new quirk is however also enabled for AM64 breaking microSD access on the SolidRun HimmingBoard-T which is supported in-tree since v6.11, causing a regression. During boot microSD initialization now fails with the error below: [ 2.008520] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit [ 2.115348] mmc1: error -110 whilst initialising SD card The heuristics for enabling the quirk are clearly not correct as they break at least one but potentially many existing boards. Revert the change and restore original behaviour until a more appropriate method of selecting the quirk is derived. Fixes: 941a7ab ("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch") Closes: https://lore.kernel.org/linux-mmc/[email protected]/ Cc: [email protected] Signed-off-by: Josua Mayer <[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 2014c95 commit ac5a41b

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

drivers/mmc/host/sdhci_am654.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ struct sdhci_am654_data {
155155
u32 tuning_loop;
156156

157157
#define SDHCI_AM654_QUIRK_FORCE_CDTEST BIT(0)
158-
#define SDHCI_AM654_QUIRK_SUPPRESS_V1P8_ENA BIT(1)
159158
};
160159

161160
struct window {
@@ -357,29 +356,6 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host,
357356
sdhci_set_clock(host, clock);
358357
}
359358

360-
static int sdhci_am654_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
361-
{
362-
struct sdhci_host *host = mmc_priv(mmc);
363-
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
364-
struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host);
365-
int ret;
366-
367-
if ((sdhci_am654->quirks & SDHCI_AM654_QUIRK_SUPPRESS_V1P8_ENA) &&
368-
ios->signal_voltage == MMC_SIGNAL_VOLTAGE_180) {
369-
if (!IS_ERR(mmc->supply.vqmmc)) {
370-
ret = mmc_regulator_set_vqmmc(mmc, ios);
371-
if (ret < 0) {
372-
pr_err("%s: Switching to 1.8V signalling voltage failed,\n",
373-
mmc_hostname(mmc));
374-
return -EIO;
375-
}
376-
}
377-
return 0;
378-
}
379-
380-
return sdhci_start_signal_voltage_switch(mmc, ios);
381-
}
382-
383359
static u8 sdhci_am654_write_power_on(struct sdhci_host *host, u8 val, int reg)
384360
{
385361
writeb(val, host->ioaddr + reg);
@@ -868,11 +844,6 @@ static int sdhci_am654_get_of_property(struct platform_device *pdev,
868844
if (device_property_read_bool(dev, "ti,fails-without-test-cd"))
869845
sdhci_am654->quirks |= SDHCI_AM654_QUIRK_FORCE_CDTEST;
870846

871-
/* Suppress v1p8 ena for eMMC and SD with vqmmc supply */
872-
if (!!of_parse_phandle(dev->of_node, "vmmc-supply", 0) ==
873-
!!of_parse_phandle(dev->of_node, "vqmmc-supply", 0))
874-
sdhci_am654->quirks |= SDHCI_AM654_QUIRK_SUPPRESS_V1P8_ENA;
875-
876847
sdhci_get_of_property(pdev);
877848

878849
return 0;
@@ -969,7 +940,6 @@ static int sdhci_am654_probe(struct platform_device *pdev)
969940
goto err_pltfm_free;
970941
}
971942

972-
host->mmc_host_ops.start_signal_voltage_switch = sdhci_am654_start_signal_voltage_switch;
973943
host->mmc_host_ops.execute_tuning = sdhci_am654_execute_tuning;
974944

975945
pm_runtime_get_noresume(dev);

0 commit comments

Comments
 (0)