emmc: clean emmc reg val for probe [1/1]
authorNan Li <nan.li@amlogic.com>
Tue, 20 Nov 2018 03:43:26 +0000 (11:43 +0800)
committerNan Li <nan.li@amlogic.com>
Tue, 20 Nov 2018 03:43:26 +0000 (11:43 +0800)
PD#SWPL-2286

Problem:
emmc response crc error in emmc init.

Solution:
clean emmc reg val from uboot to kernel.

Verify:
w400

Change-Id: I6a4763187f18e9e284c887c5c788f3a88c8548ff
Signed-off-by: Nan Li <nan.li@amlogic.com>
drivers/amlogic/mmc/aml_sd_emmc.c
drivers/amlogic/mmc/aml_sd_emmc_v3.c

index 365b461..5145c91 100644 (file)
@@ -1381,6 +1381,8 @@ static int meson_mmc_clk_init(struct amlsd_host *host)
        u32 vconf = 0;
        struct sd_emmc_config *pconf = (struct sd_emmc_config *)&vconf;
 
+       writel(0, host->base + SD_EMMC_ADJUST);
+       writel(0, host->base + SD_EMMC_DELAY);
        writel(0, host->base + SD_EMMC_CLOCK);
        ret = aml_emmc_clktree_init(host);
        if (ret)
index 91df39d..4e5112f 100644 (file)
@@ -117,6 +117,9 @@ int meson_mmc_clk_init_v3(struct amlsd_host *host)
        struct sd_emmc_config *pconf = (struct sd_emmc_config *)&vconf;
        struct mmc_phase *init = &(host->data->sdmmc.init);
 
+       writel(0, host->base + SD_EMMC_ADJUST_V3);
+       writel(0, host->base + SD_EMMC_DELAY1_V3);
+       writel(0, host->base + SD_EMMC_DELAY2_V3);
        writel(0, host->base + SD_EMMC_CLOCK_V3);
 #ifndef SD_EMMC_CLK_CTRL
        ret = aml_emmc_clktree_init(host);