• Adrian Hunter's avatar
    mmc: sdhci-acpi: Fix card detect race for Intel BXT/APL · 6a645dd8
    Adrian Hunter authored
    Intel BXT/APL use a card detect GPIO however the host controller
    will not enable bus power unless it's card detect also reflects
    the presence of a card.  Unfortunately those 2 things race which
    can result in commands not starting, after which the controller
    does nothing and there is a 10 second wait for the driver's
    10-second timer to timeout.
    
    That is fixed by having the driver look also at the present state
    register to determine if the card is present.  Consequently, provide
    a 'get_cd' mmc host operation for BXT/APL that does that.
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Cc: stable@vger.kernel.org # v4.4+
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    6a645dd8
sdhci-acpi.c 12.6 KB