git: 36498b14083d - main - twsi: Make ext_resources non-optional
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Feb 2022 16:29:47 UTC
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=36498b14083d5be64052e65bd7d1c81c1352dce4 commit 36498b14083d5be64052e65bd7d1c81c1352dce4 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2022-01-11 09:39:47 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2022-02-21 16:28:44 +0000 twsi: 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/D33823 --- sys/dev/iicbus/twsi/mv_twsi.c | 2 -- sys/dev/iicbus/twsi/twsi.c | 8 -------- sys/dev/iicbus/twsi/twsi.h | 4 ---- 3 files changed, 14 deletions(-) diff --git a/sys/dev/iicbus/twsi/mv_twsi.c b/sys/dev/iicbus/twsi/mv_twsi.c index 793b674730ed..7ad6ee68827f 100644 --- a/sys/dev/iicbus/twsi/mv_twsi.c +++ b/sys/dev/iicbus/twsi/mv_twsi.c @@ -61,9 +61,7 @@ __FBSDID("$FreeBSD$"); #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> -#ifdef EXT_RESOURCES #include <dev/extres/clk/clk.h> -#endif #include <arm/mv/mvreg.h> #include <arm/mv/mvvar.h> diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 91433f2cfe4a..3baec3944fee 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -246,7 +246,6 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, return (IIC_NOERR); } -#ifdef EXT_RESOURCES #define TWSI_BAUD_RATE_RAW(C,M,N) ((C)/((10*(M+1))<<(N))) #define ABSSUB(a,b) (((a) > (b)) ? (a) - (b) : (b) - (a)) @@ -281,7 +280,6 @@ twsi_calc_baud_rate(struct twsi_softc *sc, const u_int target, return (0); } -#endif /* EXT_RESOURCES */ /* * Only slave mode supported, disregard [old]addr @@ -291,17 +289,13 @@ twsi_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { struct twsi_softc *sc; uint32_t param; -#ifdef EXT_RESOURCES u_int busfreq; -#endif sc = device_get_softc(dev); -#ifdef EXT_RESOURCES busfreq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); if (twsi_calc_baud_rate(sc, busfreq, ¶m) == -1) { -#endif switch (speed) { case IIC_SLOW: case IIC_FAST: @@ -315,9 +309,7 @@ twsi_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) debugf(sc, "Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n", param); break; } -#ifdef EXT_RESOURCES } -#endif debugf(sc, "Using clock param=%x\n", param); diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index ed0ea72ab819..d61a1eb5aa09 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -34,9 +34,7 @@ #ifndef _TWSI_H_ #define _TWSI_H_ -#ifdef EXT_RESOURCES #include <dev/extres/clk/clk.h> -#endif struct twsi_baud_rate { uint32_t raw; @@ -50,10 +48,8 @@ struct twsi_softc { struct resource *res[2]; struct mtx mutex; device_t iicbus; -#ifdef EXT_RESOURCES clk_t clk_core; clk_t clk_reg; -#endif void * intrhand; bool have_intr;