sdhci: tegra: Implement Tegra specific set_timeout callback
authorSowjanya Komatineni <skomatineni@nvidia.com>
Wed, 11 Mar 2020 15:47:54 +0000 (08:47 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 13:39:52 +0000 (14:39 +0100)
commit5e958e4aacf44e1cc98b0d88d8e66e98f03bbf66
treedb36ee2623f9e7e1fcec16ed440ef9fdf48c4c9b
parentee0f309263a69c3860882e41d3e1829c2ffb6479
sdhci: tegra: Implement Tegra specific set_timeout callback

Tegra host supports HW busy detection and timeouts based on the
count programmed in SDHCI_TIMEOUT_CONTROL register and max busy
timeout it supports is 11s in finite busy wait mode.

Some operations like SLEEP_AWAKE, ERASE and flush cache through
SWITCH commands take longer than 11s and Tegra host supports
infinite HW busy wait mode where HW waits forever till the card
is busy without HW timeout.

This patch implements Tegra specific set_timeout sdhci_ops to allow
switching between finite and infinite HW busy detection wait modes
based on the device command expected operation time.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1583941675-9884-1-git-send-email-skomatineni@nvidia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-tegra.c