emmc: Clear the value of txdelay in legacy mode on the resume process [1/1]
authorLong Yu <long.yu@amlogic.com>
Mon, 15 Apr 2019 08:40:25 +0000 (16:40 +0800)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:06:29 +0000 (14:06 +0800)
PD#SWPL-7181

Problem:
switch to high-speed from hs200 failed for resume process.

Solution:
set tx_delay as 0 for legacy mode.
clear cfg_cmd_setup

Verify:
verify by TL1

Change-Id: I5dbb1bbc391da864464bf137837a2b0f54ccda42
Signed-off-by: Long Yu <long.yu@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
drivers/amlogic/mmc/aml_sd_emmc_v3.c

index 297e784..e1183f2 100644 (file)
@@ -395,6 +395,11 @@ static void aml_sd_emmc_set_timing_v3(struct amlsd_platform *pdata,
                clkc->tx_phase = para->sdr104.tx_phase;
        } else {
                ctrl->ddr = 0;
+               clkc->tx_delay = 0;
+               clkc->core_phase = para->init.core_phase;
+               clkc->tx_phase = para->init.tx_phase;
+               irq_en &= ~(1<<17);
+               writel(irq_en, host->base + SD_EMMC_IRQ_EN);
                /* timing == MMC_TIMING_LEGACY */
                if (pdata->calc_f) {
                        clkc->core_phase = para->calc.core_phase;