summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2014-06-03 22:34:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-04 07:21:17 +0200
commitf20e3eb414f13987261b4860a90d21eb59f153bb (patch)
tree75455f7cac5d15aa04369bee8de65a34a3a0d42a /drivers/mci/mci-core.c
parentec4b4a6406b17d9bd6955a1da29af092a7c4198e (diff)
downloadbarebox-f20e3eb414f13987261b4860a90d21eb59f153bb.tar.gz
barebox-f20e3eb414f13987261b4860a90d21eb59f153bb.tar.xz
mci: implement non-removable property
There is no need to check the card-detect status for non-removable devices. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 282d2399f7..ce6e590aaf 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1572,7 +1572,8 @@ static int mci_card_probe(struct mci *mci)
struct mci_host *host = mci->host;
int i, rc, disknum, ret;
- if (host->card_present && !host->card_present(host)) {
+ if (host->card_present && !host->card_present(host) &&
+ !host->non_removable) {
dev_err(&mci->dev, "no card inserted\n");
return -ENODEV;
}
@@ -1839,4 +1840,6 @@ void mci_of_parse(struct mci_host *host)
host->dsr_val = dsr_val;
}
}
+
+ host->non_removable = of_property_read_bool(np, "non-removable");
}