• Thierry Reding's avatar
    mmc: tegra: Support module reset · 20567be9
    Thierry Reding authored
    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: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    20567be9
sdhci-tegra.c 16.3 KB