• Jon Hunter's avatar
    mmc: sdhci: Request regulators before reading capabilities · efba142b
    Jon Hunter authored
    The capabilities of the SDHCI host controller are read early during the
    SDHCI host initialisation in sdhci_setup_host() and before any
    regulators for the host have been requested. This means that if the host
    supports some high-speed modes (according to its capabilities register),
    but the board cannot because the appropriate voltage regulator is not
    available, then the host cannot easily override the capabilities that
    are supported.
    
    To allow a SDHCI host controller to determine if it can support UHS high
    speed modes via the presence of the MMC regulators, request the
    regulators before reading the capabilities of the host controller. This
    will allow the SDHCI host to use the 'reset' callback to take the
    appropriate action (set flags, configure registers, etc) before the
    capabilities register(s) are read.
    
    Please note that some SDHCI hosts, such as the Tegra SDHCI host, has
    the ability to mask bits in the capabilities register to prevent
    certain capabilities from being advertised.
    Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
    Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    efba142b
sdhci.c 95.9 KB