]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci-pci: Fix card detect race for Intel BXT/APL
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 9 Feb 2016 14:12:37 +0000 (16:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 11 Feb 2016 10:39:56 +0000 (11:39 +0100)
commit59211ad7dd0f57d1906004b6e9e75bbb74fa648c
tree35f00899cd4dbc2e5e01879ecc6901e5538f0dff
parent3e0d6eca0f34fd8a95aada21a6be741c29a5e522
mmc: sdhci-pci: Fix card detect race for Intel BXT/APL

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: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-core.c