提交 9e953432 编写于 作者: M Manish Narani 提交者: Ulf Hansson

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.

Fixes: a5c8b2ae ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
Signed-off-by: NSai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
Signed-off-by: NManish Narani <manish.narani@xilinx.com>
Acked-by: NMichal Simek <michal.simek@xilinx.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1605515565-117562-2-git-send-email-manish.narani@xilinx.comSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 60d53566
...@@ -600,14 +600,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -600,14 +600,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
int ret; int ret;
/* /* This is applicable for SDHCI_SPEC_300 and above */
* This is applicable for SDHCI_SPEC_300 and above if (host->version < SDHCI_SPEC_300)
* 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)
return 0; return 0;
switch (host->timing) { switch (host->timing) {
...@@ -668,14 +662,8 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -668,14 +662,8 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
int ret; int ret;
/* /* This is applicable for SDHCI_SPEC_300 and above */
* This is applicable for SDHCI_SPEC_300 and above if (host->version < SDHCI_SPEC_300)
* 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)
return 0; return 0;
switch (host->timing) { switch (host->timing) {
...@@ -733,14 +721,8 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -733,14 +721,8 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
struct sdhci_host *host = sdhci_arasan->host; struct sdhci_host *host = sdhci_arasan->host;
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
/* /* This is applicable for SDHCI_SPEC_300 and above */
* This is applicable for SDHCI_SPEC_300 and above if (host->version < SDHCI_SPEC_300)
* 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)
return 0; return 0;
switch (host->timing) { switch (host->timing) {
...@@ -804,14 +786,8 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -804,14 +786,8 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
struct sdhci_host *host = sdhci_arasan->host; struct sdhci_host *host = sdhci_arasan->host;
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
/* /* This is applicable for SDHCI_SPEC_300 and above */
* This is applicable for SDHCI_SPEC_300 and above if (host->version < SDHCI_SPEC_300)
* 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)
return 0; return 0;
switch (host->timing) { switch (host->timing) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册