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/dev/ofw/ofw_subr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/ofw/ofw_subr.c') diff --git a/sys/dev/ofw/ofw_subr.c b/sys/dev/ofw/ofw_subr.c index c9b99bf..be31ccb 100644 --- a/sys/dev/ofw/ofw_subr.c +++ b/sys/dev/ofw/ofw_subr.c @@ -38,8 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include static void get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep, int *pcip) -- cgit v1.1 From 9fb865d0991f5a39f227a3449c5b5b5ff6228af3 Mon Sep 17 00:00:00 2001 From: zbb Date: Thu, 18 Feb 2016 15:44:45 +0000 Subject: Fix build for i386 and arm64 after r295755 - Take bus_space_tag_t type into consideration when returning default, zero value. - Include missing rman.h required by ofw_pci.h --- sys/dev/ofw/ofw_subr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/dev/ofw/ofw_subr.c') diff --git a/sys/dev/ofw/ofw_subr.c b/sys/dev/ofw/ofw_subr.c index be31ccb..e9b66c2 100644 --- a/sys/dev/ofw/ofw_subr.c +++ b/sys/dev/ofw/ofw_subr.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -- cgit v1.1 From e9cf712fdabf0a3b6b3e8e1e7f239a4e1c4e2d1f Mon Sep 17 00:00:00 2001 From: zbb Date: Sat, 20 Feb 2016 12:28:20 +0000 Subject: Revert r295756: 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 This needs to return to the drawing board as it breaks both PowerPC and Sparc64 build. Pointed out by: jhibbits --- sys/dev/ofw/ofw_subr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/ofw/ofw_subr.c') diff --git a/sys/dev/ofw/ofw_subr.c b/sys/dev/ofw/ofw_subr.c index e9b66c2..4d14db7 100644 --- a/sys/dev/ofw/ofw_subr.c +++ b/sys/dev/ofw/ofw_subr.c @@ -39,9 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include static void get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep, int *pcip) -- cgit v1.1