diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-18 12:48:45 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-20 10:53:30 +0100 |
commit | d21575ddea8ca4e319814e06f7d19a027e2fd970 (patch) | |
tree | 8011eb2027d49be9d50fa89c52823d04c3d90b57 /drivers/mci | |
parent | 096789bc2af53f0f28f285aa0a88d5e9d05d3316 (diff) | |
download | barebox-d21575ddea8ca4e319814e06f7d19a027e2fd970.tar.gz barebox-d21575ddea8ca4e319814e06f7d19a027e2fd970.tar.xz |
mci i.MX esdhc: implement card_present callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci')
-rw-r--r-- | drivers/mci/imx-esdhc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index dfeb509db4..aad1b86962 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); |