enetc_mdio: Support building the driver as a loadable module.
After recent arm64 GENERIC config cleanup the ENETC MDIO in NXP LS1028A SoC should support being loaded as a module. Obtained from: Semihalf Sponsored by: Alstom Group
This commit is contained in:
parent
5ad6d28cbe
commit
dfcaa2c18b
@ -175,8 +175,8 @@ dev/cpufreq/cpufreq_dt.c optional cpufreq fdt
|
||||
dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10
|
||||
dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10
|
||||
|
||||
dev/enetc/enetc_mdio.c optional enetc soc_nxp_ls
|
||||
dev/enetc/enetc_mdio_pci.c optional enetc pci soc_nxp_ls
|
||||
dev/enetc/enetc_mdio.c optional enetc soc_nxp_ls | enetc_mdio soc_nxp_ls
|
||||
dev/enetc/enetc_mdio_pci.c optional enetc_mdio pci soc_nxp_ls
|
||||
dev/enetc/if_enetc.c optional enetc iflib pci fdt soc_nxp_ls
|
||||
|
||||
dev/etherswitch/felix/felix.c optional enetc etherswitch fdt felix pci soc_nxp_ls
|
||||
|
@ -159,7 +159,7 @@ enetc_mdio_pci_detach(device_t dev)
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_regs);
|
||||
bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), sc->sc_regs);
|
||||
mtx_destroy(&sc->sc_lock);
|
||||
|
||||
return (0);
|
||||
@ -184,8 +184,8 @@ static driver_t enetc_mdio_pci_driver = {
|
||||
|
||||
static devclass_t enetc_mdio_pci_devclass;
|
||||
|
||||
DRIVER_MODULE(enetc_mdio_pci, pci, enetc_mdio_pci_driver,
|
||||
DRIVER_MODULE(enetc_mdio, pci, enetc_mdio_pci_driver,
|
||||
enetc_mdio_pci_devclass, 0, 0);
|
||||
DRIVER_MODULE(miibus, enetc_mdio_pci, miibus_driver, miibus_devclass,
|
||||
DRIVER_MODULE(miibus, enetc_mdio, miibus_driver, miibus_devclass,
|
||||
0, 0);
|
||||
MODULE_VERSION(enetc_mdio_pci, 1);
|
||||
MODULE_VERSION(enetc_mdio, 1);
|
||||
|
@ -138,6 +138,8 @@ MODULE_VERSION(felix, 1);
|
||||
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, felix,
|
||||
felix_pci_ids, nitems(felix_pci_ids) - 1);
|
||||
|
||||
MODULE_DEPEND(felix, enetc_mdio, 1, 1, 1);
|
||||
|
||||
static int
|
||||
felix_probe(device_t dev)
|
||||
{
|
||||
|
@ -112,6 +112,7 @@ SUBDIR= \
|
||||
${_em} \
|
||||
${_ena} \
|
||||
${_enetc} \
|
||||
${_enetc_mdio} \
|
||||
esp \
|
||||
${_et} \
|
||||
evdev \
|
||||
@ -614,6 +615,7 @@ _armv8crypto= armv8crypto
|
||||
_dwwdt= dwwdt
|
||||
_em= em
|
||||
_enetc= enetc
|
||||
_enetc_mdio= enetc_mdio
|
||||
_felix= felix
|
||||
_rockchip= rockchip
|
||||
.endif
|
||||
|
8
sys/modules/enetc_mdio/Makefile
Normal file
8
sys/modules/enetc_mdio/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
#$FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/dev/enetc
|
||||
|
||||
KMOD = enetc_mdio
|
||||
SRCS = enetc_mdio_pci.c enetc_mdio.c
|
||||
|
||||
.include <bsd.kmod.mk>
|
Loading…
Reference in New Issue
Block a user