Skip to content
Commit a38c078f authored by Takeshi Saito's avatar Takeshi Saito Committed by Ulf Hansson
Browse files

mmc: renesas_sdhi: Avoid bad TAP in HS400



With R-Car Gen3, CRC error occue at the following TAPs.

H3, M3W 1.3, M3N... TAP=2,3,6,7
M3W 3.0		... TAP=1,3,5,7

(Note: for 4tap SoCs, the numbers get divided by 2)

Do not use these TAPs in HS400, and also don't use auto correction but
manual correction.

We check for bad taps in two places:

1) After tuning HS400: Then, we select a neighbouring TAP. One of them
   must be good, because there are never three bad taps in a row.
   Retuning won't help because we just finished tuning.

2) After a manual correction request: Here, we can't switch to the
   requested TAP. But we can retune (if the HS200 tuning was good)
   because the environment might have changed since the last tuning.
   If not, we stay on the same TAP.

Signed-off-by: default avatarTakeshi Saito <takeshi.saito.xv@renesas.com>
[wsa: refactored to match upstream driver, reworded commit msg]
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20200423130432.9990-3-wsa+renesas@sang-engineering.com
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent f583da40
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment