mmc: sdhci-of-arasan: Allow configuring zero tap values
Subsystems (3)
PATCH 1/1 mmc: sdhci-of-arasan: Allow configuring zero tap values
Allow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero.
--- drivers/mmc/host/sdhci-of-arasan.c | 40 ++++++------------------------ 1 file changed, 8 insertions(+), 32 deletions(-)
drivers/mmc/host/sdhci-of-arasan.c +8 -32
@@ -600,14 +600,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)u8 tap_delay, tap_max =0 ;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {
@@ -668,14 +662,8 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)u8 tap_delay, tap_max =0 ;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {
@@ -733,14 +721,8 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {
@@ -804,14 +786,8 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {
Signature · 1 line
2.17.1
+Marek
Quoted 83 lines · Manish Narani
Allow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero.
Signed-off-by Sai Krishna Potthuri <[email protected]>Signed-off-by Manish Narani <[email protected]>--- drivers/mmc/host/sdhci-of-arasan.c | 40 ++++++------------------------ 1 file changed, 8 insertions(+), 32 deletions(-)drivers/mmc/host/sdhci-of-arasan.c +8
-32@@ -600,14 +600,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)u8 tap_delay, tap_max =0 ;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {@@ -668,14 +662,8 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)u8 tap_delay, tap_max =0 ;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {@@ -733,14 +721,8 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {@@ -804,14 +786,8 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;switch (host->timing) {
Quoted 9 lines · Michal Simek
+Marek
Quoted 6 lines · Manish Narani
Allow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero.
Signed-off-by Sai Krishna Potthuri <[email protected]>Signed-off-by Manish Narani <[email protected]>
Please add also fixed tag to get this to LTS kernel.
Thanks,
Michal
Hi,
Quoted 10 lines
-----Original Message-----
From: Manish Narani <[email protected]>
Sent: Tuesday, November 10, 2020 11:12 PM
To: Michal Simek <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; git <[email protected]>; Manish Narani <[email protected]>; Sai Krishna Potthuri <[email protected]>
Subject: [PATCH] mmc: sdhci-of-arasan: Allow configuring zero tap values
Quoted 4 lines
Allow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero.
Quoted 82 lines
Signed-off-by Sai Krishna Potthuri <[email protected]>Signed-off-by Manish Narani <[email protected]>--- drivers/mmc/host/sdhci-of-arasan.c | 40 ++++++------------------------ 1 file changed, 8 insertions(+), 32 deletions(-)drivers/mmc/host/sdhci- renamed from drivers/mmc/host/sdhci-of-arasan.c +0
-0
of-arasan.c
index829ccef87426..100621e55427100644drivers/mmc/host/sdhci-of-arasan.c +2
-8@@ -600,14 +600,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees) u8 tap_delay, tap_max = 0;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;drivers/mmc/host/sdhci-of-arasan.c +2
-8switch (host->timing) {@@ -668,14 +662,8 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees) u8 tap_delay, tap_max = 0;int ret; -/* -* This is applicable for SDHCI_SPEC_300 and above -* ZynqMP does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;drivers/mmc/host/sdhci-of-arasan.c +2
-8switch (host->timing) {@@ -733,14 +721,8 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;drivers/mmc/host/sdhci-of-arasan.c +2
-8switch (host->timing) {@@ -804,14 +786,8 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)struct sdhci_host *host = sdhci_arasan->host;u8 tap_delay, tap_max =0 ; -/* -* This is applicable for SDHCI_SPEC_300 and above -* Versal does not set phase for <=25MHz clock. -* If degrees is zero, no need to do anything. -*/ -if (host->version <SDHCI_SPEC_300 || - host->timing ==MMC_TIMING_LEGACY || - host->timing ==MMC_TIMING_UHS_SDR12 || !degrees) +/* This is applicable for SDHCI_SPEC_300 and above */ +if (host->version <SDHCI_SPEC_300 )return 0 ;
Quoted 3 lines
switch (
host->timing) {
--
2.17.1
Thanks,
Manish
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi,
Quoted 14 lines
-----Original Message-----
From: Manish Narani <[email protected]>
Sent: Tuesday, November 10, 2020 11:12 PM
To: Michal Simek <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; git <[email protected]>; Manish Narani <[email protected]>; Sai Krishna Potthuri <[email protected]>
Subject: [PATCH] mmc: sdhci-of-arasan: Allow configuring zero tap valuesAllow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero.
Quoted 6 lines
Signed-off-by Sai Krishna Potthuri <[email protected]>Signed-off-by Manish Narani <[email protected]>--- drivers/mmc/host/sdhci-of-arasan.c | 40 ++++++------------------------ 1 file changed, 8 insertions(+), 32 deletions(-)
This patch, with "Fixes" tag added in commit, is included along with the v2 patch series for couple of bug fixes in https://lkml.org/lkml/2020/11/16/142 . Please review this patch series.
Thanks,
Manish
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel