]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: zynq_sdhci: Wait till sd card detect state is stable
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>
Tue, 3 Aug 2021 05:20:45 +0000 (23:20 -0600)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 26 Aug 2021 06:08:11 +0000 (08:08 +0200)
commitf00404e62f86a4147a2b6cae8aff1bcbcf311839
tree9e143d1ca529cf61e6108f8d23f0fc357878b46a
parent8e8b4992ba087413a23905bc51ee4e1497960536
mmc: zynq_sdhci: Wait till sd card detect state is stable

As per SD spec when SD host controller is reset, it takes 1000msec
to detect the card state. In case, if we enable the sd bus voltage &
card detect state is not stable, then host controller will disable
the sd bus voltage.

In case of warm/subsystem reboot, due to unstable card detect state
host controller is disabling the sd bus voltage to sd card causing
sd card timeout error. So we wait for a maximum of 1000msec to get
the card detect state stable before we enable the sd bus voltage.

This current fix is workaround for now, this needs to be analysed
further. Zynqmp platform should behave the same as Versal, but we
did not encounter this issue as of now. So we are fixing it for
Versal only.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/zynq_sdhci.c