summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2016-02-18 13:07:21 +0000
committerzbb <zbb@FreeBSD.org>2016-02-18 13:07:21 +0000
commite22231d2191b7f99cc27e44b943a974917168a8e (patch)
tree99d7a6b289c5e09db4772ef77d809e48579d9a8b /sys/powerpc
parentd2a1177be6963874bcf8d15330e4ea74c36d6823 (diff)
downloadFreeBSD-src-e22231d2191b7f99cc27e44b943a974917168a8e.zip
FreeBSD-src-e22231d2191b7f99cc27e44b943a974917168a8e.tar.gz
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 <mma@semihalf.com> Obtained from: Semihalf Sponsored by: Annapurna Labs Reviewed by: jhibbits, mmel Differential Revision: https://reviews.freebsd.org/D4879
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/mpc85xx/pci_mpc85xx.c4
-rw-r--r--sys/powerpc/powermac/cpcht.c3
-rw-r--r--sys/powerpc/powermac/grackle.c3
-rw-r--r--sys/powerpc/powermac/uninorthpci.c3
-rw-r--r--sys/powerpc/powermac/uninorthvar.h1
-rw-r--r--sys/powerpc/pseries/rtas_pci.c3
6 files changed, 5 insertions, 12 deletions
diff --git a/sys/powerpc/mpc85xx/pci_mpc85xx.c b/sys/powerpc/mpc85xx/pci_mpc85xx.c
index 4397ac0..de55afc 100644
--- a/sys/powerpc/mpc85xx/pci_mpc85xx.c
+++ b/sys/powerpc/mpc85xx/pci_mpc85xx.c
@@ -55,15 +55,13 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <dev/ofw/ofw_pci.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/ofw_pci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcib_private.h>
-#include <powerpc/ofw/ofw_pci.h>
-
#include "ofw_bus_if.h"
#include "pcib_if.h"
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 <sys/rman.h>
#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_pci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -51,7 +50,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
-#include <powerpc/ofw/ofw_pci.h>
+#include <dev/ofw/ofw_pci.h>
#include <vm/vm.h>
#include <vm/pmap.h>
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 <sys/proc.h>
#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_pci.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/ofw_pci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
-#include <powerpc/ofw/ofw_pci.h>
#include <powerpc/powermac/gracklevar.h>
#include <vm/vm.h>
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 <sys/kernel.h>
#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_pci.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/ofw_pci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
-#include <powerpc/ofw/ofw_pci.h>
#include <powerpc/powermac/uninorthvar.h>
#include <vm/vm.h>
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 <dev/ofw/ofw_bus_subr.h>
#include <dev/ofw/ofw_pci.h>
-#include <powerpc/ofw/ofw_pci.h>
struct uninorth_softc {
struct ofw_pci_softc pci_sc;
diff --git a/sys/powerpc/pseries/rtas_pci.c b/sys/powerpc/pseries/rtas_pci.c
index bb72b71..1348fc8 100644
--- a/sys/powerpc/pseries/rtas_pci.c
+++ b/sys/powerpc/pseries/rtas_pci.c
@@ -34,9 +34,9 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_pci.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/ofw_pci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <powerpc/ofw/ofw_pci.h>
#include <powerpc/pseries/plpar_iommu.h>
#include "pcib_if.h"
OpenPOWER on IntegriCloud