devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] mmc: sdhci-esdhc-imx: remove redundant code for manual tuning
@ 2021-08-16 12:38 haibo.chen
  2021-08-16 12:38 ` [PATCH 2/6] mmc: sdhci-eadhc-imx: select the correct mode for auto tuning haibo.chen
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: haibo.chen @ 2021-08-16 12:38 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, shawnguo, robh+dt, s.hauer
  Cc: kernel, festevam, linux-mmc, linux-imx, haibo.chen, devicetree,
	linux-arm-kernel

From: Haibo Chen <haibo.chen@nxp.com>

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 <haibo.chen@nxp.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 57b19ca1ad6d..a49fac719fca 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -628,17 +628,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
 		else
 			new_val &= ~ESDHC_VENDOR_SPEC_VSELECT;
 		writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
-		if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) {
-			new_val = readl(host->ioaddr + ESDHC_MIX_CTRL);
-			if (val & SDHCI_CTRL_TUNED_CLK) {
-				new_val |= ESDHC_MIX_CTRL_SMPCLK_SEL;
-				new_val |= ESDHC_MIX_CTRL_AUTO_TUNE_EN;
-			} else {
-				new_val &= ~ESDHC_MIX_CTRL_SMPCLK_SEL;
-				new_val &= ~ESDHC_MIX_CTRL_AUTO_TUNE_EN;
-			}
-			writel(new_val , host->ioaddr + ESDHC_MIX_CTRL);
-		} else if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {
+		if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {
 			u32 v = readl(host->ioaddr + SDHCI_AUTO_CMD_STATUS);
 			u32 m = readl(host->ioaddr + ESDHC_MIX_CTRL);
 			if (val & SDHCI_CTRL_TUNED_CLK) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-08-25  9:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 12:38 [PATCH 1/6] mmc: sdhci-esdhc-imx: remove redundant code for manual tuning haibo.chen
2021-08-16 12:38 ` [PATCH 2/6] mmc: sdhci-eadhc-imx: select the correct mode for auto tuning haibo.chen
2021-08-16 12:38 ` [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl,sdio-async-interrupt-enabled binding haibo.chen
2021-08-16 13:43   ` Ulf Hansson
2021-08-17  6:41     ` Bough Chen
2021-08-17  7:37       ` Ulf Hansson
2021-08-16 12:38 ` [PATCH 4/6] mmc: host: sdhci-esdhc-imx.c: correct the auto-tuning setting for sdio device haibo.chen
2021-08-16 13:53   ` Ulf Hansson
2021-08-17  6:57     ` Bough Chen
2021-08-17  8:00       ` Ulf Hansson
2021-08-17 12:29         ` Bough Chen
2021-08-16 12:38 ` [PATCH 5/6] arm64: dts: imx8mm-evk: add sdio wifi support haibo.chen
2021-08-16 12:38 ` [PATCH 6/6] arm64: dts: imx8mn-evk: " haibo.chen
2021-08-24 13:52 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: remove redundant code for manual tuning Ulf Hansson
2021-08-25  2:16   ` Bough Chen
2021-08-25  9:22     ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).