9
0
Fork 0

mci: bcm2835: Add detect callback support for hardware device

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-10-15 10:35:42 +02:00
parent 43efd0e84f
commit 2725164194
1 changed files with 10 additions and 0 deletions

View File

@ -516,6 +516,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;
@ -566,6 +573,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