]> git.baikalelectronics.ru Git - kernel.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)
commita05c953b2b1962ce6c4d5e614a3b0202700426df
tree8bdd7ee4ef6ec93cdd0d7a6fca9822692faefee0
parent742a71c1457feff8a8ad26647eee2c8d9c4bd2f2
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