mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing
authorHaibo Chen <haibo.chen@nxp.com>
Thu, 31 Aug 2023 03:26:47 +0000 (11:26 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 26 Sep 2023 13:12:44 +0000 (15:12 +0200)
commit541a95e64d7606ead18a4e8aa78c753a2494cae0
tree34e8ca89c74f90636896474f38132fed787cfa24
parenta5b5006edc6273c278930f0ee92773c13abd660e
mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing

Current manual tuning logic only get the first pass window, but
this pass window maybe not the best pass window.

Now find all the pass window, and chose the largest pass window,
and use the average value of this largest pass window to get the
best timing.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230831032647.3128702-1-haibo.chen@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c