git: 8724dd26d49f - main - Allow clk_fixed.c to be built without FDT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Oct 2022 17:32:50 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8724dd26d49fbfa9b9486d30cb34380514bb952d commit 8724dd26d49fbfa9b9486d30cb34380514bb952d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-10-28 16:45:41 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-10-28 17:31:55 +0000 Allow clk_fixed.c to be built without FDT Include opt_platform.h to get the FDT definition and only include FDT headers when FDT is defined. Sponsored by: Innovate UK --- sys/dev/extres/clk/clk_fixed.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/extres/clk/clk_fixed.c b/sys/dev/extres/clk/clk_fixed.c index a38d444c5a29..57d8bf367945 100644 --- a/sys/dev/extres/clk/clk_fixed.c +++ b/sys/dev/extres/clk/clk_fixed.c @@ -27,6 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_platform.h" #include <sys/param.h> #include <sys/conf.h> #include <sys/bus.h> @@ -40,8 +41,11 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> +#ifdef FDT #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> +#endif + #include <dev/extres/clk/clk_fixed.h> #define CLK_TYPE_FIXED 1