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
This commit is contained in:
Andrew Turner 2022-10-28 17:45:41 +01:00
parent 83de695791
commit 8724dd26d4

View File

@ -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