Skip to content

Commit a0dbbdc

Browse files
Haibo Chenstorulf
authored andcommitted
mmc: sdhci-esdhc-imx: Remove redundant code for manual tuning
For manual tuning method, already call esdhc_prepare_tuning() config the necessary registers, so remove the redundant code in esdhc_writew_le() for SDHCI_HOST_CONTROL2. Signed-off-by: Haibo Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent fe72d08 commit a0dbbdc

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -628,17 +628,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
628628
else
629629
new_val &= ~ESDHC_VENDOR_SPEC_VSELECT;
630630
writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
631-
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) {
632-
new_val = readl(host->ioaddr + ESDHC_MIX_CTRL);
633-
if (val & SDHCI_CTRL_TUNED_CLK) {
634-
new_val |= ESDHC_MIX_CTRL_SMPCLK_SEL;
635-
new_val |= ESDHC_MIX_CTRL_AUTO_TUNE_EN;
636-
} else {
637-
new_val &= ~ESDHC_MIX_CTRL_SMPCLK_SEL;
638-
new_val &= ~ESDHC_MIX_CTRL_AUTO_TUNE_EN;
639-
}
640-
writel(new_val , host->ioaddr + ESDHC_MIX_CTRL);
641-
} else if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {
631+
if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {
642632
u32 v = readl(host->ioaddr + SDHCI_AUTO_CMD_STATUS);
643633
u32 m = readl(host->ioaddr + ESDHC_MIX_CTRL);
644634
if (val & SDHCI_CTRL_TUNED_CLK) {

0 commit comments

Comments
 (0)