From 4d8102b4fb205797825c5dc10243da8aca9c07e9 Mon Sep 17 00:00:00 2001 From: Nan Li Date: Tue, 20 Nov 2018 11:43:26 +0800 Subject: [PATCH] emmc: clean emmc reg val for probe [1/1] 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 --- drivers/amlogic/mmc/aml_sd_emmc.c | 2 ++ drivers/amlogic/mmc/aml_sd_emmc_v3.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/amlogic/mmc/aml_sd_emmc.c b/drivers/amlogic/mmc/aml_sd_emmc.c index 365b461..5145c91 100644 --- a/drivers/amlogic/mmc/aml_sd_emmc.c +++ b/drivers/amlogic/mmc/aml_sd_emmc.c @@ -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) diff --git a/drivers/amlogic/mmc/aml_sd_emmc_v3.c b/drivers/amlogic/mmc/aml_sd_emmc_v3.c index 91df39d..4e5112f 100644 --- a/drivers/amlogic/mmc/aml_sd_emmc_v3.c +++ b/drivers/amlogic/mmc/aml_sd_emmc_v3.c @@ -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); -- 2.7.4