From e22231d2191b7f99cc27e44b943a974917168a8e Mon Sep 17 00:00:00 2001 From: zbb Date: Thu, 18 Feb 2016 13:07:21 +0000 Subject: Extract common code from PowerPC's ofw_pci Import portions of the PowerPC OF PCI implementation into new file "ofw_pci.c", common for other platforms. The files ofw_pci.c and ofw_pci.h from sys/powerpc/ofw no longer exist. All required declarations are moved to sys/dev/ofw/ofw_pci.h. This creates a new ofw_pci_write_ivar() function and modifies ofw_pci_nranges(), ofw_pci_read_ivar(), ofw_pci_route_interrupt() methods. Most functions contain existing ppc implementations in the majority unchanged. Now there is no need to have multiple identical copies of methods for various architectures. Submitted by: Marcin Mazurek Obtained from: Semihalf Sponsored by: Annapurna Labs Reviewed by: jhibbits, mmel Differential Revision: https://reviews.freebsd.org/D4879 --- sys/powerpc/powermac/cpcht.c | 3 +-- sys/powerpc/powermac/grackle.c | 3 +-- sys/powerpc/powermac/uninorthpci.c | 3 +-- sys/powerpc/powermac/uninorthvar.h | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'sys/powerpc/powermac') diff --git a/sys/powerpc/powermac/cpcht.c b/sys/powerpc/powermac/cpcht.c index 765d946..737e872 100644 --- a/sys/powerpc/powermac/cpcht.c +++ b/sys/powerpc/powermac/cpcht.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -51,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include diff --git a/sys/powerpc/powermac/grackle.c b/sys/powerpc/powermac/grackle.c index 95d59a1..f0928f3 100644 --- a/sys/powerpc/powermac/grackle.c +++ b/sys/powerpc/powermac/grackle.c @@ -37,9 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/powerpc/powermac/uninorthpci.c b/sys/powerpc/powermac/uninorthpci.c index 9da06ff..5cb21c1 100644 --- a/sys/powerpc/powermac/uninorthpci.c +++ b/sys/powerpc/powermac/uninorthpci.c @@ -34,9 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/powerpc/powermac/uninorthvar.h b/sys/powerpc/powermac/uninorthvar.h index e08478d..efe169c 100644 --- a/sys/powerpc/powermac/uninorthvar.h +++ b/sys/powerpc/powermac/uninorthvar.h @@ -30,7 +30,6 @@ #include #include -#include struct uninorth_softc { struct ofw_pci_softc pci_sc; -- cgit v1.1