mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
|
From 5a70382dd43a27ae4bc8d8d6af5f7341828f23ad Mon Sep 17 00:00:00 2001
|
||
|
From: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
|
||
|
Date: Fri, 5 Apr 2013 01:18:38 -0300
|
||
|
Subject: [PATCH 1/2] mmc: mxs-mmc: Add support for non-removable cards
|
||
|
|
||
|
Some boards and card slots doesn't have card detect feature available.
|
||
|
In that case allow to mark the cards as non-removable, via devicetree.
|
||
|
|
||
|
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
|
||
|
---
|
||
|
drivers/mmc/host/mxs-mmc.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
|
||
|
index 4efe302..7d2cd74 100644
|
||
|
--- a/drivers/mmc/host/mxs-mmc.c
|
||
|
+++ b/drivers/mmc/host/mxs-mmc.c
|
||
|
@@ -95,6 +95,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;
|
||
|
|
||
|
+ if (mmc->caps & MMC_CAP_NONREMOVABLE)
|
||
|
+ return 1;
|
||
|
+
|
||
|
return !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
|
||
|
BM_SSP_STATUS_CARD_DETECT);
|
||
|
}
|
||
|
@@ -691,6 +694,9 @@ static int mxs_mmc_probe(struct platform_device *pdev)
|
||
|
if (flags & OF_GPIO_ACTIVE_LOW)
|
||
|
host->wp_inverted = 1;
|
||
|
|
||
|
+ if (of_find_property(np, "non-removable", NULL))
|
||
|
+ mmc->caps |= MMC_CAP_NONREMOVABLE;
|
||
|
+
|
||
|
mmc->f_min = 400000;
|
||
|
mmc->f_max = 288000000;
|
||
|
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
||
|
--
|
||
|
1.7.10.4
|
||
|
|