summaryrefslogtreecommitdiff
authorNan Li <nan.li@amlogic.com>2018-04-18 09:04:15 (GMT)
committer Xindong Xu <xindong.xu@amlogic.com>2018-04-19 06:01:20 (GMT)
commit3af79f8d8c38acfe174b444d41caca6adb6734d6 (patch)
treec5bea80ace2c5c965826dc641a20eb4eec550ee3
parente92b11d3fdbd4d3da30097465f0559b0074f1ada (diff)
downloadcommon-3af79f8d8c38acfe174b444d41caca6adb6734d6.zip
common-3af79f8d8c38acfe174b444d41caca6adb6734d6.tar.gz
common-3af79f8d8c38acfe174b444d41caca6adb6734d6.tar.bz2
emmc: optimize sd & wifi TDMA.
PD#164677: optimize sd & wifi TDMA patch to bring errors to v2 controller. Change-Id: I2859af721953ab4bd8ad34a1f6722321dd6b1d00 Signed-off-by: Nan Li <nan.li@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/mmc/aml_sd_emmc.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/amlogic/mmc/aml_sd_emmc.c b/drivers/amlogic/mmc/aml_sd_emmc.c
index 8c3bddc..43d5e03 100644
--- a/drivers/amlogic/mmc/aml_sd_emmc.c
+++ b/drivers/amlogic/mmc/aml_sd_emmc.c
@@ -3072,8 +3072,21 @@ static int meson_mmc_probe(struct platform_device *pdev)
memset(pdata, 0, sizeof(struct amlsd_platform));
if (amlsd_get_platform_data(pdev, pdata, mmc, i)) {
mmc_free_host(mmc);
+#ifdef AML_MMC_TDMA
break;
+#endif
}
+ dev_set_name(&mmc->class_dev, "%s", pdata->pinname);
+
+ /* save def clk & cfg */
+ pdata->clkc = clk;
+ pdata->ctrl = cfg;
+
+ if (pdata->caps & MMC_CAP_NONREMOVABLE)
+ pdata->is_in = 1;
+
+ if (pdata->caps & MMC_PM_KEEP_POWER)
+ mmc->pm_caps |= MMC_PM_KEEP_POWER;
/* data desc buffer */
#ifdef CFG_SDEMMC_PIO
@@ -3111,23 +3124,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
}
#endif
- if (aml_card_type_mmc(pdata)
- && (host->ctrl_ver < 3))
- /**set emmc tx_phase regs here base on dts**/
- aml_sd_emmc_tx_phase_set(pdata);
-
- dev_set_name(&mmc->class_dev, "%s", pdata->pinname);
-
- /* save def clk & cfg */
- pdata->clkc = clk;
- pdata->ctrl = cfg;
-
- if (pdata->caps & MMC_CAP_NONREMOVABLE)
- pdata->is_in = 1;
-
- if (pdata->caps & MMC_PM_KEEP_POWER)
- mmc->pm_caps |= MMC_PM_KEEP_POWER;
-
pdata->host = host;
pdata->mmc = mmc;
mmc->ios.clock = 400000;
@@ -3179,6 +3175,11 @@ static int meson_mmc_probe(struct platform_device *pdev)
+ (host->data->ds_pin_poll_en << 2));
}
+ if (aml_card_type_mmc(pdata)
+ && (host->ctrl_ver < 3))
+ /**set emmc tx_phase regs here base on dts**/
+ aml_sd_emmc_tx_phase_set(pdata);
+
if (pdata->port_init)
pdata->port_init(pdata);
if (host->ctrl_ver >= 3)