git: b4cc0f7d28e2 - main - dwmmc: Make ext_resources non-optional
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Feb 2022 16:29:45 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=b4cc0f7d28e2f4ae12db3be75658ac5b8c1293f1
commit b4cc0f7d28e2f4ae12db3be75658ac5b8c1293f1
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-01-11 09:38:24 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-02-21 16:28:42 +0000
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 <machine/cpu.h>
#include <machine/intr.h>
-#ifdef EXT_RESOURCES
#include <dev/extres/clk/clk.h>
-#endif
#include <dev/mmc/host/dwmmc_reg.h>
#include <dev/mmc/host/dwmmc_var.h>
@@ -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 <dev/ofw/ofw_bus_subr.h>
-#ifdef EXT_RESOURCES
#include <dev/extres/clk/clk.h>
-#endif
#include <dev/mmc/host/dwmmc_var.h>
@@ -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 <dev/extres/clk/clk.h>
#include <dev/extres/hwreset/hwreset.h>
#include <dev/extres/regulator/regulator.h>
-#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);