Patch "mmc: sdhci-esdhc-imx: clear ESDHC_STD_TUNING_EN for manual tuning method" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mmc: sdhci-esdhc-imx: clear ESDHC_STD_TUNING_EN for manual tuning method

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mmc-sdhci-esdhc-imx-clear-esdhc_std_tuning_en-for-ma.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c90a9e41db8d4938aa668da5bddbb4e4469a2d9e
Author: BOUGH CHEN <haibo.chen@xxxxxxx>
Date:   Thu Dec 20 11:57:41 2018 +0000

    mmc: sdhci-esdhc-imx: clear ESDHC_STD_TUNING_EN for manual tuning method
    
    [ Upstream commit a98c557e2af3e12e38dee6019a5cf210156d629e ]
    
    The bit ESDHC_STD_TUNING_EN may be configed by bootloader code if it
    choose to use standard tuning method. So on linux side, if choose to
    use manual tuning method, need to clear the bit ESDHC_STD_TUNING_EN,
    remove the impact of bootloader code.
    
    Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx>
    Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Stable-dep-of: 1e336aa0c025 ("mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index f8a4791e64f8..71ca97c696b1 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1141,6 +1141,15 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
 					<< ESDHC_TUNING_STEP_SHIFT;
 			}
 			writel(tmp, host->ioaddr + ESDHC_TUNING_CTRL);
+		} else if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) {
+			/*
+			 * ESDHC_STD_TUNING_EN may be configed in bootloader
+			 * or ROM code, so clear this bit here to make sure
+			 * the manual tuning can work.
+			 */
+			tmp = readl(host->ioaddr + ESDHC_TUNING_CTRL);
+			tmp &= ~ESDHC_STD_TUNING_EN;
+			writel(tmp, host->ioaddr + ESDHC_TUNING_CTRL);
 		}
 	}
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux