From a2993fcda63721903bf2840d386ff07e3e8239eb Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 19 Jul 2006 16:31:12 +0000 Subject: [PATCH] Enable build of ppc(4) module on i386 and amd64 architectures. Add proper module interdependencies. Reviewed by: marcel Approved by: pjd (mentor) --- sys/dev/ppbus/if_plip.c | 1 + sys/dev/ppbus/lpbb.c | 1 + sys/dev/ppbus/lpt.c | 1 + sys/dev/ppbus/ppi.c | 1 + sys/dev/ppbus/pps.c | 1 + sys/dev/ppc/ppc.c | 1 + sys/modules/Makefile | 3 +++ sys/modules/ppc/Makefile | 23 +++++------------------ 8 files changed, 14 insertions(+), 18 deletions(-) diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index 8a35336ea99b..6c7cf7ab8aeb 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -770,3 +770,4 @@ static driver_t lp_driver = { }; DRIVER_MODULE(plip, ppbus, lp_driver, lp_devclass, 0, 0); +MODULE_DEPEND(plip, ppbus, 1, 1, 1); diff --git a/sys/dev/ppbus/lpbb.c b/sys/dev/ppbus/lpbb.c index a9b3667c4129..07a2f213a9fb 100644 --- a/sys/dev/ppbus/lpbb.c +++ b/sys/dev/ppbus/lpbb.c @@ -226,5 +226,6 @@ static driver_t lpbb_driver = { }; DRIVER_MODULE(lpbb, ppbus, lpbb_driver, lpbb_devclass, 0, 0); +MODULE_DEPEND(lpbb, ppbus, 1, 1, 1); MODULE_DEPEND(lpbb, iicbb, IICBB_MINVER, IICBB_PREFVER, IICBB_MAXVER); MODULE_VERSION(lpbb, 1); diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index e096cadadee2..dec1084eca97 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -965,3 +965,4 @@ static driver_t lpt_driver = { }; DRIVER_MODULE(lpt, ppbus, lpt_driver, lpt_devclass, 0, 0); +MODULE_DEPEND(lpt, ppbus, 1, 1, 1); diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index 77a8f8f4c2ac..f689bc14ae52 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -575,3 +575,4 @@ static driver_t ppi_driver = { sizeof(struct ppi_data), }; DRIVER_MODULE(ppi, ppbus, ppi_driver, ppi_devclass, 0, 0); +MODULE_DEPEND(ppi, ppbus, 1, 1, 1); diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index 7a14fd14f698..37c785e7527f 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -321,3 +321,4 @@ static driver_t pps_driver = { sizeof(struct pps_data), }; DRIVER_MODULE(pps, ppbus, pps_driver, pps_devclass, 0, 0); +MODULE_DEPEND(pps, ppbus, 1, 1, 1); diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 7ae988bd9644..31acb7ddc569 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -2153,3 +2153,4 @@ ppc_teardown_intr(device_t bus, device_t child, struct resource *r, void *ih) DRIVER_MODULE(ppc, isa, ppc_driver, ppc_devclass, 0, 0); DRIVER_MODULE(ppc, acpi, ppc_driver, ppc_devclass, 0, 0); +MODULE_DEPEND(ppc, ppbus, 1, 1, 1); diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d85919329f9f..96710ce9421a 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -193,6 +193,7 @@ SUBDIR= ${_3dfx} \ ${_pmc} \ portalfs \ ppbus \ + ${_ppc} \ ppi \ pps \ procfs \ @@ -416,6 +417,7 @@ _nve= nve _padlock= padlock .endif .endif +_ppc= ppc _rr232x= rr232x _s3= s3 _twa= twa @@ -466,6 +468,7 @@ _ips= ips _mly= mly _ndis= ndis _nve= nve +_ppc= ppc _rr232x= rr232x _safe= safe _scsi_low= scsi_low diff --git a/sys/modules/ppc/Makefile b/sys/modules/ppc/Makefile index db36e7337737..60297898357d 100644 --- a/sys/modules/ppc/Makefile +++ b/sys/modules/ppc/Makefile @@ -1,24 +1,11 @@ # $FreeBSD$ +#.PATH: ${.CURDIR}/../../kern .PATH: ${.CURDIR}/../../dev/ppc +.PATH: ${.CURDIR}/../../dev/ppbus + KMOD= ppc -SRCS= bus_if.h device_if.h ppbus_if.h isa_if.h pci_if.h serdev_if.h \ - opt_ppc.h opt_isa.h \ - ppc.c ppc_pci.c ppc_puc.c - -.if ${MACHINE_ARCH} == "amd64" -SRCS+= ppc_acpi.c ppc_isa.c -.endif - -.if ${MACHINE_ARCH} == "i386" -.if ${MACHINE} != "pc98" -SRCS+= ppc_acpi.c -.endif -SRCS+= ppc_isa.c -.endif - -.if ${MACHINE_ARCH} == "ia64" -SRCS+= ppc_acpi.c -.endif +SRCS= bus_if.h ppbus_if.h opt_ppc.h device_if.h isa_if.h \ + ppc.c ppc_puc.c .include