Don't call sdhci_init_slot() until after handling the FDT properties

related to detecting card presence.  This actually makes no difference
now, but will when we get support for gpio-based card detection.
This commit is contained in:
Ian Lepore 2014-04-02 19:06:53 +00:00
parent 5b9b849b45
commit 647c8464a6

View File

@ -730,9 +730,6 @@ imx_sdhci_attach(device_t dev)
sc->baseclk_hz = imx51_get_clock(IMX51CLK_PERCLK_ROOT);
}
sdhci_init_slot(dev, &sc->slot, 0);
callout_init(&sc->r1bfix_callout, true);
/*
* If the slot is flagged with the non-removable property, set our flag
* to always force the SDHCI_CARD_PRESENT bit on.
@ -752,6 +749,9 @@ imx_sdhci_attach(device_t dev)
sc->force_card_present = true;
}
callout_init(&sc->r1bfix_callout, true);
sdhci_init_slot(dev, &sc->slot, 0);
bus_generic_probe(dev);
bus_generic_attach(dev);