]> asedeno.scripts.mit.edu Git - linux.git/commit
mmc: tegra: Support module reset
authorThierry Reding <treding@nvidia.com>
Wed, 8 Mar 2017 19:00:39 +0000 (20:00 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:17 +0000 (21:41 +0200)
commit20567be9d2e64c3f8302ae66d9ca69899d1c5e8a
tree8bdd7ee4ef6ec93cdd0d7a6fca9822692faefee0
parenta01fc2a295af6418d665d8f9c18af6017a929065
mmc: tegra: Support module reset

The device tree binding for the SDHCI controller found on Tegra SoCs
specifies that a reset control can be provided by the device tree. No
code was ever added to support the module reset, which can cause the
driver to try and access registers from a module that's in reset. On
most Tegra SoC generations doing so would cause a hang.

Note that it's unlikely to see this happen because on most platforms
these resets will have been deasserted by the bootloader. However the
portability can be improved by making sure the driver deasserts the
reset before accessing any registers.

Since resets are synchronous on Tegra SoCs, the platform driver needs
to implement a custom ->remove() callback now to make sure the clock
is disabled after the reset is asserted.

Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-tegra.c