OSDN Git Service

mmc: tegra: fix CQE enable and resume sequence
authorSowjanya Komatineni <skomatineni@nvidia.com>
Sun, 24 Mar 2019 04:45:26 +0000 (21:45 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Apr 2019 09:55:54 +0000 (11:55 +0200)
commitb77544280ccf924787af1db8d7b26ce5305becdc
treebcb32be49b0d37e81c1e05ea1cfbce5b0c12df50
parent688956440e80946e164289b23e54309bcbca7144
mmc: tegra: fix CQE enable and resume sequence

Tegra CQHCI/SDHCI design prevents write access to SDHCI block size
register when CQE is enabled and unhalted.

CQHCI driver enables CQE prior to invoking sdhci_cqe_enable which
violates this Tegra specific host requirement.

This patch fixes this by configuring sdhci block registers prior
to CQE unhalt.

This patch also has a fix for retry of unhalt due to known Tegra
specific CQE resume bug where first unhalt might not succeed when
clear all tasks is performed prior to resume and need a second unhalt.

This patch also includes CQE enable fix for CMD CRC errors that
happen with the specific sandisk emmc device when status command
is sent during the transfer of last data block due to marginal timing.

Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-tegra.c