Build modules specific to imx5/imx6 only when building those kernels.

This adds sys/modules/imx with a SUBDIR makefile to make the whole
collection of modules that are specific to these SoCs.  Initially, that
"whole collection" consists of the if_ffec and imx_i2c drivers.

The if_ffec driver is referenced in its existing home in ../ffec rather
than moving it into the imx directory, because it's used by powerpc too,
but it is no longer built for all armv6/7 systems.

The imx_i2c driver is newly added as a module.
This commit is contained in:
Ian Lepore 2018-02-18 02:48:54 +00:00
parent b107b904a6
commit f82eace5b3
5 changed files with 25 additions and 6 deletions

View File

@ -117,6 +117,6 @@ device wlan_amrr # AMRR transmit rate control algorithm
# Flattened Device Tree
options FDT # Configure using FDT/DTB data
makeoptions MODULES_EXTRA=dtb/imx5
makeoptions MODULES_EXTRA="dtb/imx5 imx"
options INTRNG

View File

@ -117,7 +117,7 @@ device hdmi
# Flattened Device Tree
options FDT # Configure using FDT/DTB data
makeoptions MODULES_EXTRA=dtb/imx6
makeoptions MODULES_EXTRA="dtb/imx6 imx"
# SoC-specific devices
device ffec # Freescale Fast Ethernet Controller

View File

@ -813,10 +813,6 @@ _bcm283x_clkman= bcm283x_clkman
_bcm283x_pwm= bcm283x_pwm
.endif
.if ${MACHINE_ARCH:Marmv[67]*} != ""
_ffec= ffec
.endif
SUBDIR+=${MODULES_EXTRA}
.for reject in ${WITHOUT_MODULES}

8
sys/modules/imx/Makefile Normal file
View File

@ -0,0 +1,8 @@
# $FreeBSD$
# Build modules specific to freescale/nxp imx-family SoCs.
SUBDIR = \
../ffec \
imx_i2c \
.include <bsd.subdir.mk>

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.PATH: ${SRCTOP}/sys/arm/freescale/imx
KMOD= imx_i2c
SRCS= imx_i2c.c
SRCS+= \
bus_if.h \
device_if.h \
iicbus_if.h \
ofw_bus_if.h \
opt_platform.h \
.include <bsd.kmod.mk>