From d9b4611dea430aecc8cdae55da1155dcb18cd706 Mon Sep 17 00:00:00 2001 From: Sujit Reddy Thumma Date: Tue, 24 Jan 2012 10:46:33 +0530 Subject: [PATCH] mmc: core: Remove BROKEN_CLK_GATING quirk for WCN1314 cards MMC_CLKGATE feature can be enabled for Volans cards as the host supports asynchronous acitivity notification when the clocks are off. Change-Id: Ic6cfa7fb2e713dcf1d2c6b2ae9df9cf0394f8c4a Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/core/core.c | 4 +++- drivers/mmc/core/quirks.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 73ef3b449af..362bdbe7c77 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -862,6 +862,8 @@ void mmc_gate_clock(struct mmc_host *host) { unsigned long flags; + WARN_ON(!host->ios.clock); + spin_lock_irqsave(&host->clk_lock, flags); host->clk_old = host->ios.clock; host->ios.clock = 0; @@ -884,7 +886,7 @@ void mmc_ungate_clock(struct mmc_host *host) * we just ignore the call. */ if (host->clk_old) { - BUG_ON(host->ios.clock); + WARN_ON(host->ios.clock); /* This call will also set host->clk_gated to false */ __mmc_set_clock(host, host->clk_old); } diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c index 3a596217029..92990b9e32a 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -21,6 +21,14 @@ #define SDIO_DEVICE_ID_TI_WL1271 0x4076 #endif +#ifndef SDIO_VENDOR_ID_MSM +#define SDIO_VENDOR_ID_MSM 0x0070 +#endif + +#ifndef SDIO_DEVICE_ID_MSM_WCN1314 +#define SDIO_DEVICE_ID_MSM_WCN1314 0x2881 +#endif + /* * This hook just adds a quirk for all sdio devices */ @@ -40,6 +48,9 @@ static const struct mmc_fixup mmc_fixup_methods[] = { SDIO_FIXUP(SDIO_VENDOR_ID_TI, SDIO_DEVICE_ID_TI_WL1271, remove_quirk, MMC_QUIRK_BROKEN_CLK_GATING), + SDIO_FIXUP(SDIO_VENDOR_ID_MSM, SDIO_DEVICE_ID_MSM_WCN1314, + remove_quirk, MMC_QUIRK_BROKEN_CLK_GATING), + SDIO_FIXUP(SDIO_VENDOR_ID_TI, SDIO_DEVICE_ID_TI_WL1271, add_quirk, MMC_QUIRK_NONSTD_FUNC_IF),