mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 693ae32da4dd06e3f98bf1ff2595e1d461ad1402 Mon Sep 17 00:00:00 2001
|
|
From: Robert Nelson <robertcnelson@gmail.com>
|
|
Date: Tue, 1 Apr 2014 16:55:53 -0500
|
|
Subject: [PATCH 3/4] Revert "mmc: mxs: use standard flag for cd inverted"
|
|
|
|
This reverts commit 6c3331d3ace7989688fa59f541f5e722e44ac373.
|
|
---
|
|
drivers/mmc/host/mxs-mmc.c | 14 ++++----------
|
|
1 file changed, 4 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
|
|
index 3dd2f4c..02210ce 100644
|
|
--- a/drivers/mmc/host/mxs-mmc.c
|
|
+++ b/drivers/mmc/host/mxs-mmc.c
|
|
@@ -71,6 +71,7 @@ struct mxs_mmc_host {
|
|
int sdio_irq_en;
|
|
int wp_gpio;
|
|
bool wp_inverted;
|
|
+ bool cd_inverted;
|
|
};
|
|
|
|
static int mxs_mmc_get_ro(struct mmc_host *mmc)
|
|
@@ -93,15 +94,9 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc)
|
|
{
|
|
struct mxs_mmc_host *host = mmc_priv(mmc);
|
|
struct mxs_ssp *ssp = &host->ssp;
|
|
- int present;
|
|
|
|
- present = !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
|
|
- BM_SSP_STATUS_CARD_DETECT);
|
|
-
|
|
- if (mmc->caps2 & MMC_CAP2_CD_ACTIVE_HIGH)
|
|
- present = !present;
|
|
-
|
|
- return present;
|
|
+ return !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
|
|
+ BM_SSP_STATUS_CARD_DETECT) ^ host->cd_inverted;
|
|
}
|
|
|
|
static int mxs_mmc_reset(struct mxs_mmc_host *host)
|
|
@@ -663,8 +658,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
|
|
if (flags & OF_GPIO_ACTIVE_LOW)
|
|
host->wp_inverted = 1;
|
|
|
|
- if (of_property_read_bool(np, "cd-inverted"))
|
|
- mmc->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH;
|
|
+ host->cd_inverted = of_property_read_bool(np, "cd-inverted");
|
|
|
|
mmc->f_min = 400000;
|
|
mmc->f_max = 288000000;
|
|
--
|
|
1.9.1
|
|
|