From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] mci i.MX esdhc: implement card_present callback
Date: Sun, 20 Jan 2013 10:58:42 +0100 [thread overview]
Message-ID: <1358675923-13628-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1358675923-13628-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/imx-esdhc.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index dfeb509..aad1b86 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -421,8 +421,9 @@ static void esdhc_set_ios(struct mci_host *mci, struct mci_ios *ios)
}
-static int esdhc_card_detect(struct fsl_esdhc_host *host)
+static int esdhc_card_present(struct mci_host *mci)
{
+ struct fsl_esdhc_host *host = to_fsl_esdhc(mci);
struct fsl_esdhc __iomem *regs = host->regs;
struct esdhc_platform_data *pdata = host->dev->platform_data;
int ret;
@@ -453,16 +454,6 @@ static int esdhc_init(struct mci_host *mci, struct device_d *dev)
int timeout = 1000;
int ret = 0;
- ret = esdhc_card_detect(host);
-
- if (ret == 0)
- return -ENODEV;
-
- if (ret < 0)
- return ret;
-
- ret = 0;
-
/* Enable cache snooping */
if (host && !host->no_snoop)
esdhc_write32(®s->scr, 0x00000040);
@@ -561,6 +552,7 @@ static int fsl_esdhc_probe(struct device_d *dev)
host->mci.send_cmd = esdhc_send_cmd;
host->mci.set_ios = esdhc_set_ios;
host->mci.init = esdhc_init;
+ host->mci.card_present = esdhc_card_present;
host->mci.hw_dev = dev;
rate = clk_get_rate(host->clk);
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-01-20 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 9:58 [PATCH] MMC/SD improvements Sascha Hauer
2013-01-20 9:58 ` [PATCH 1/5] mci: return 0 for probe parameter even when already initialized Sascha Hauer
2013-01-20 9:58 ` [PATCH 2/5] mci: Always add probe parameter for cards Sascha Hauer
2013-01-20 9:58 ` [PATCH 3/5] mci: Add card_present callback Sascha Hauer
2013-01-20 9:58 ` Sascha Hauer [this message]
2013-01-20 9:58 ` [PATCH 5/5] mci atmel: implement " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358675923-13628-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox