From b4cc0f7d28e2f4ae12db3be75658ac5b8c1293f1 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Tue, 11 Jan 2022 10:38:24 +0100 Subject: [PATCH] dwmmc: Make ext_resources non-optional EXT_RESOURCES have been introduced in 12-CURRENT and all supported releases have it enabled in their kernel config. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33822 --- sys/dev/mmc/host/dwmmc.c | 9 --------- sys/dev/mmc/host/dwmmc_rockchip.c | 6 ------ sys/dev/mmc/host/dwmmc_var.h | 4 ---- 3 files changed, 19 deletions(-) diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c index 70bd204069bd..8cedcd0b9fe8 100644 --- a/sys/dev/mmc/host/dwmmc.c +++ b/sys/dev/mmc/host/dwmmc.c @@ -63,9 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EXT_RESOURCES #include -#endif #include #include @@ -520,9 +518,7 @@ parse_fdt(struct dwmmc_softc *sc) phandle_t node; uint32_t bus_hz = 0; int len; -#ifdef EXT_RESOURCES int error; -#endif if ((node = ofw_bus_get_node(sc->dev)) == -1) return (ENXIO); @@ -554,8 +550,6 @@ parse_fdt(struct dwmmc_softc *sc) bus_hz = dts_value[0]; } -#ifdef EXT_RESOURCES - /* IP block reset is optional */ error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", &sc->hwreset); if (error != 0 && @@ -662,7 +656,6 @@ parse_fdt(struct dwmmc_softc *sc) goto fail; } } -#endif /* EXT_RESOURCES */ if (sc->bus_hz == 0) { device_printf(sc->dev, "No bus speed provided\n"); @@ -804,7 +797,6 @@ dwmmc_detach(device_t dev) DWMMC_LOCK_DESTROY(sc); -#ifdef EXT_RESOURCES if (sc->hwreset != NULL && hwreset_deassert(sc->hwreset) != 0) device_printf(sc->dev, "cannot deassert reset\n"); if (sc->biu != NULL && clk_disable(sc->biu) != 0) @@ -816,7 +808,6 @@ dwmmc_detach(device_t dev) device_printf(sc->dev, "Cannot disable vmmc regulator\n"); if (sc->vqmmc && regulator_disable(sc->vqmmc) != 0) device_printf(sc->dev, "Cannot disable vqmmc regulator\n"); -#endif #ifdef MMCCAM mmc_cam_sim_free(&sc->mmc_sim); diff --git a/sys/dev/mmc/host/dwmmc_rockchip.c b/sys/dev/mmc/host/dwmmc_rockchip.c index c025e531e27b..44fbf720f908 100644 --- a/sys/dev/mmc/host/dwmmc_rockchip.c +++ b/sys/dev/mmc/host/dwmmc_rockchip.c @@ -41,9 +41,7 @@ __FBSDID("$FreeBSD$"); #include -#ifdef EXT_RESOURCES #include -#endif #include @@ -94,14 +92,11 @@ rockchip_dwmmc_attach(device_t dev) break; } -#ifdef EXT_RESOURCES sc->update_ios = &dwmmc_rockchip_update_ios; -#endif return (dwmmc_attach(dev)); } -#ifdef EXT_RESOURCES static int dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios) { @@ -128,7 +123,6 @@ dwmmc_rockchip_update_ios(struct dwmmc_softc *sc, struct mmc_ios *ios) } return (0); } -#endif static device_method_t rockchip_dwmmc_methods[] = { /* bus interface */ diff --git a/sys/dev/mmc/host/dwmmc_var.h b/sys/dev/mmc/host/dwmmc_var.h index 33210f547dff..cd4c5f2b6051 100644 --- a/sys/dev/mmc/host/dwmmc_var.h +++ b/sys/dev/mmc/host/dwmmc_var.h @@ -33,11 +33,9 @@ #ifndef DEV_MMC_HOST_DWMMC_VAR_H #define DEV_MMC_HOST_DWMMC_VAR_H -#ifdef EXT_RESOURCES #include #include #include -#endif #include "opt_mmccam.h" @@ -92,13 +90,11 @@ struct dwmmc_softc { uint32_t sdr_timing; uint32_t ddr_timing; -#ifdef EXT_RESOURCES clk_t biu; clk_t ciu; hwreset_t hwreset; regulator_t vmmc; regulator_t vqmmc; -#endif }; DECLARE_CLASS(dwmmc_driver);