Signed-off-by: Sascha Hauer <[email protected]>
---
 drivers/mci/mci-bcm2835.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index abd38a3..a0c364d 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -511,6 +511,13 @@ static u32 bcm2835_mci_get_emmc_clock(struct 
msg_get_clock_rate *clk_data)
        return 0;
 }
 
+static int bcm2835_mci_detect(struct device_d *dev)
+{
+       struct bcm2835_mci_host *host = dev->priv;
+
+       return mci_detect_card(&host->mci);
+}
+
 static int bcm2835_mci_probe(struct device_d *hw_dev)
 {
        struct bcm2835_mci_host *host;
@@ -561,6 +568,9 @@ static int bcm2835_mci_probe(struct device_d *hw_dev)
        host->mci.f_min = MIN_FREQ;
        host->mci.f_max = host->max_clock;
 
+       hw_dev->priv = host;
+       hw_dev->detect = bcm2835_mci_detect,
+
        /*
         * The Arasan has a bugette whereby it may lose the content of
         * successive writes to registers that are within two SD-card clock
-- 
1.8.4.rc3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to