PKGBUILDs/core/linux-armv5/0004-Revert-mmc-mxs-use-standard-flag-for-broken-card-det.patch
2014-06-12 00:49:17 +00:00

46 lines
1.5 KiB
Diff

From 7b0869c692c6b76084db9e6de96b63252041987b Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 1 Apr 2014 16:56:05 -0500
Subject: [PATCH 4/9] Revert "mmc: mxs: use standard flag for broken card
detection"
This reverts commit a91fe279ae750d67d65039bb4ac2cc6ef51e7a2a.
---
drivers/mmc/host/mxs-mmc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 02210ce..374fca7 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -72,6 +72,7 @@ struct mxs_mmc_host {
int wp_gpio;
bool wp_inverted;
bool cd_inverted;
+ bool broken_cd;
};
static int mxs_mmc_get_ro(struct mmc_host *mmc)
@@ -95,7 +96,8 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc)
struct mxs_mmc_host *host = mmc_priv(mmc);
struct mxs_ssp *ssp = &host->ssp;
- return !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
+ return host->broken_cd ||
+ !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
BM_SSP_STATUS_CARD_DETECT) ^ host->cd_inverted;
}
@@ -650,8 +652,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_4_BIT_DATA;
else if (bus_width == 8)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
- if (of_property_read_bool(np, "broken-cd"))
- mmc->caps |= MMC_CAP_NEEDS_POLL;
+ host->broken_cd = of_property_read_bool(np, "broken-cd");
if (of_property_read_bool(np, "non-removable"))
mmc->caps |= MMC_CAP_NONREMOVABLE;
host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags);
--
1.9.0