From 647c8464a687e316a383dae81af6e91b0c9b77a2 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Wed, 2 Apr 2014 19:06:53 +0000 Subject: [PATCH] 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. --- sys/arm/freescale/imx/imx_sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c index 2d83fd6ff9c..2e3d1a5b5b0 100644 --- a/sys/arm/freescale/imx/imx_sdhci.c +++ b/sys/arm/freescale/imx/imx_sdhci.c @@ -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);