[twsi] Make extres/clk part conditional based on the EXT_RESOURCES option value

This should fix kernel build for ARMADA38X and possibly some other ARM configs

Approved by:	manu
This commit is contained in:
Oleksandr Tymoshenko 2018-12-14 21:17:42 +00:00
parent 032f0fbbb6
commit e7bf6d7ae9
2 changed files with 6 additions and 0 deletions

View File

@ -61,7 +61,9 @@ __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>

View File

@ -34,7 +34,9 @@
#ifndef _TWSI_H_
#define _TWSI_H_
#ifdef EXT_RESOURCES
#include <dev/extres/clk/clk.h>
#endif
struct twsi_baud_rate {
uint32_t raw;
@ -48,8 +50,10 @@ struct twsi_softc {
struct resource *res[1]; /* SYS_RES_MEMORY */
struct mtx mutex;
device_t iicbus;
#ifdef EXT_RESOURCES
clk_t clk_core;
clk_t clk_reg;
#endif
bus_size_t reg_data;
bus_size_t reg_slave_addr;