aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/pseries/rtas_pci.c
diff options
context:
space:
mode:
authorZbigniew Bodek <zbb@FreeBSD.org>2016-03-29 15:19:56 +0000
committerZbigniew Bodek <zbb@FreeBSD.org>2016-03-29 15:19:56 +0000
commitc43a86743cf3e0fd87fbe84241056089c14a3848 (patch)
treeb0ba83207bab9525934dc8eaed7ce4eb918ad758 /sys/powerpc/pseries/rtas_pci.c
parent35030a5dd4d434af4975c0948c93ce3842fa3809 (diff)
downloadsrc-c43a86743cf3e0fd87fbe84241056089c14a3848.tar.gz
src-c43a86743cf3e0fd87fbe84241056089c14a3848.zip
Reduce OFW PCI code duplication - involves ARM, PPC and SPARC64
Import portions of the PowerPC OF PCI implementation into new file "ofwpci.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/ofwpci.h. This creates a new ofw_pci_write_ivar() function and modifies some others 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. Requested by: jhibbits Reviewed by: jhibbits, marius Submitted by: Marcin Mazurek <mma@semihalf.com> Obtained from: Semihalf Sponsored by: Annapurna Labs Differential Revision: https://reviews.freebsd.org/D4879
Notes
Notes: svn path=/head/; revision=297392
Diffstat (limited to 'sys/powerpc/pseries/rtas_pci.c')
-rw-r--r--sys/powerpc/pseries/rtas_pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/powerpc/pseries/rtas_pci.c b/sys/powerpc/pseries/rtas_pci.c
index bb72b710e7b5..873168e2612a 100644
--- a/sys/powerpc/pseries/rtas_pci.c
+++ b/sys/powerpc/pseries/rtas_pci.c
@@ -32,11 +32,13 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/kernel.h>
+#include <sys/rman.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/ofwpci.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -48,12 +50,9 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <machine/rtas.h>
-#include <sys/rman.h>
-
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <powerpc/ofw/ofw_pci.h>
#include <powerpc/pseries/plpar_iommu.h>
#include "pcib_if.h"