]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci: Test cd-gpio instead of SDHCI presence when probing
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 17 Sep 2012 08:45:10 +0000 (16:45 +0800)
committerChris Ball <cjb@laptop.org>
Wed, 19 Sep 2012 08:29:45 +0000 (16:29 +0800)
commitdf9ab34891c0501c5291e90c53d00d64c3b84b10
treee5a018e18cc34cebe2248c4b169988ebaaa33890
parentd86567b88239e5f7d753999f04b8a6a0fc5f8ccb
mmc: sdhci: Test cd-gpio instead of SDHCI presence when probing

Previously to this patch, an SDHCI platform that uses a GPIO for
card detection instead of the internal SDHCI_CARD_PRESENT bit on
the presence register would fail to detect a new card.

Some drivers worked around this in various ways: esdhc-imx defines
an IO accessor to fake the presence bit being true, s3c turns on
polling (which stops the SDHCI driver from checking the bit) after
a card's inserted.  But none of this should be necessary; the real
fix is to check whether we're using a GPIO and avoid relying on
the presence bit if so, as this patch implements.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c