From 8ba4becb1eb37726a9eeb39f0238dbaac9cfbd86 Mon Sep 17 00:00:00 2001 From: Long Yu Date: Fri, 23 Mar 2018 11:31:39 +0800 Subject: [PATCH] sdio: Adjust the location of the GXL best sampling point PD#160789: sdio: optimizing the selection of sdio tuning sampling points [problem] When all sampling points can be sampled correctly, select 0 points as the best sampling point.M8 platform is normal, but some S905 platform is not suitable. [resolved] The GXL platfoarm selects the intermediate point of all sampling points as the best sampling point Change-Id: I59097daa8fe3d99f2f11a3e1347945c8eea4e1c9 Signed-off-by: Long Yu --- drivers/amlogic/mmc/aml_sd_emmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/mmc/aml_sd_emmc.c b/drivers/amlogic/mmc/aml_sd_emmc.c index cd9752c..8ba695f 100644 --- a/drivers/amlogic/mmc/aml_sd_emmc.c +++ b/drivers/amlogic/mmc/aml_sd_emmc.c @@ -747,7 +747,8 @@ tunning: if ((best_win_size != clk_div) || (aml_card_type_sdio(pdata) - && (host->data->chip_type == MMC_CHIP_GXM))) { + && ((host->data->chip_type == MMC_CHIP_GXM) + || (host->data->chip_type == MMC_CHIP_GXL)))) { adj_delay_find = best_win_start + (best_win_size - 1) / 2 + (best_win_size - 1) % 2; adj_delay_find = adj_delay_find % clk_div; -- 2.7.4