summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/quirks.c
diff options
context:
space:
mode:
authorPierre Tardy <tardyp@gmail.com>2011-02-06 19:03:47 +0100
committerChris Ball <cjb@laptop.org>2011-03-15 13:48:35 -0400
commitdb9935000d95ae3f9702b7ff6ac0eef2319d8772 (patch)
tree86f75ca6ec0b73c728f19b0dd43e8702bef448bc /drivers/mmc/core/quirks.c
parent57f0adc7eaaf4315d568e72069dbe48aa7e20995 (diff)
downloadop-kernel-dev-db9935000d95ae3f9702b7ff6ac0eef2319d8772.zip
op-kernel-dev-db9935000d95ae3f9702b7ff6ac0eef2319d8772.tar.gz
mmc: add MMC_QUIRK_BROKEN_CLK_GATING
Some sdio card are not following sdio standard, and do not work when the sdio bus's clock is gated. To keep functionnality for all legacy driver, we turn this quirk on for every sdio card. Drivers needs to disable the quirk manually when someone verifies that their supported card works with clock gating. Signed-off-by: Pierre Tardy <tardyp@gmail.com> Acked-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/quirks.c')
-rw-r--r--drivers/mmc/core/quirks.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c
index e18cb49..8908431 100644
--- a/drivers/mmc/core/quirks.c
+++ b/drivers/mmc/core/quirks.c
@@ -40,7 +40,20 @@ static void __maybe_unused remove_quirk(struct mmc_card *card, int data)
card->quirks &= ~data;
}
+/*
+ * This hook just adds a quirk for all sdio devices
+ */
+static void add_quirk_for_sdio_devices(struct mmc_card *card, int data)
+{
+ if (mmc_card_sdio(card))
+ card->quirks |= data;
+}
+
static const struct mmc_fixup mmc_fixup_methods[] = {
+ /* by default sdio devices are considered CLK_GATING broken */
+ /* good cards will be whitelisted as they are tested */
+ { SDIO_ANY_ID, SDIO_ANY_ID,
+ add_quirk_for_sdio_devices, MMC_QUIRK_BROKEN_CLK_GATING }
{ 0 }
};
OpenPOWER on IntegriCloud