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
This commit is contained in:
parent
78f8b4aafa
commit
b4cc0f7d28
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user