dwmmc_rockchip: Add ifdefs on EXT_RESOURCES

The old RK3188 kernel config uses dwmmc but isn't compiled with EXT_RESOURCES.
Add ifdefs around code using EXT_RESOURCES code.

Reported by:	rpokala
This commit is contained in:
manu 2018-02-28 19:05:25 +00:00
parent 67f9ad3b97
commit 7cee124685

View File

@ -39,6 +39,10 @@ __FBSDID("$FreeBSD$");
#include <dev/ofw/ofw_bus_subr.h> #include <dev/ofw/ofw_bus_subr.h>
#ifdef EXT_RESOURCES
#include <dev/extres/clk/clk.h>
#endif
#include <dev/mmc/host/dwmmc_var.h> #include <dev/mmc/host/dwmmc_var.h>
enum RKTYPE { enum RKTYPE {
@ -88,11 +92,14 @@ rockchip_dwmmc_attach(device_t dev)
sc->pwren_inverted = 1; sc->pwren_inverted = 1;
#ifdef EXT_RESOURCES
sc->update_ios = &dwmmc_rockchip_update_ios; sc->update_ios = &dwmmc_rockchip_update_ios;
#endif
return (dwmmc_attach(dev)); return (dwmmc_attach(dev));
} }
#ifdef EXT_RESOURCES
static int static int
dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios) dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios)
{ {
@ -119,6 +126,7 @@ dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios)
} }
return (0); return (0);
} }
#endif
static device_method_t rockchip_dwmmc_methods[] = { static device_method_t rockchip_dwmmc_methods[] = {
/* bus interface */ /* bus interface */