Module Name: src
Committed By: dyoung
Date: Sun Jul 17 23:23:54 UTC 2011
Modified Files:
src/sys/arch/evbppc/include: types.h
src/sys/arch/macppc/include: types.h
src/sys/arch/mvmeppc/include: types.h
src/sys/arch/ofppc/include: types.h
src/sys/arch/powerpc/include: types.h
src/sys/arch/powerpc/oea: ofwoea_machdep.c
src/sys/arch/powerpc/powerpc: bus_dma.c
Removed Files:
src/sys/arch/evbppc/include: bus.h
src/sys/arch/macppc/include: bus.h
src/sys/arch/mvmeppc/include: bus.h
src/sys/arch/ofppc/include: bus.h
src/sys/arch/powerpc/include: bus.h
Log Message:
Enable new-style <sys/bus.h> on several PowerPC ports supporting PCI
buses. Make non-inline implementations of bus_space(9) and bus_dma(9)
routines and move them to appropriate .c files.
This may leave amigappc in a bad state, sorry. Fortunately, it will be
easy to repair by imitating the bus.h -> bus_{defs,funcs}.h split in
some other PowerPC port.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r0 src/sys/arch/evbppc/include/bus.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/include/types.h
cvs rdiff -u -r1.26 -r0 src/sys/arch/macppc/include/bus.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/macppc/include/types.h
cvs rdiff -u -r1.6 -r0 src/sys/arch/mvmeppc/include/bus.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mvmeppc/include/types.h
cvs rdiff -u -r1.12 -r0 src/sys/arch/ofppc/include/bus.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ofppc/include/types.h
cvs rdiff -u -r1.21 -r0 src/sys/arch/powerpc/include/bus.h
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/oea/ofwoea_machdep.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/powerpc/powerpc/bus_dma.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbppc/include/types.h
diff -u src/sys/arch/evbppc/include/types.h:1.9 src/sys/arch/evbppc/include/types.h:1.10
--- src/sys/arch/evbppc/include/types.h:1.9 Sun Jan 20 18:09:06 2008
+++ src/sys/arch/evbppc/include/types.h Sun Jul 17 23:23:53 2011
@@ -1,5 +1,5 @@
-/* $NetBSD: types.h,v 1.9 2008/01/20 18:09:06 joerg Exp $ */
+/* $NetBSD: types.h,v 1.10 2011/07/17 23:23:53 dyoung Exp $ */
#include <powerpc/types.h>
-#define __HAVE_DEVICE_REGISTER
+#define __HAVE_NEW_STYLE_BUS_H
Index: src/sys/arch/macppc/include/types.h
diff -u src/sys/arch/macppc/include/types.h:1.13 src/sys/arch/macppc/include/types.h:1.14
--- src/sys/arch/macppc/include/types.h:1.13 Sun Jan 20 18:09:07 2008
+++ src/sys/arch/macppc/include/types.h Sun Jul 17 23:23:53 2011
@@ -1,5 +1,5 @@
-/* $NetBSD: types.h,v 1.13 2008/01/20 18:09:07 joerg Exp $ */
+/* $NetBSD: types.h,v 1.14 2011/07/17 23:23:53 dyoung Exp $ */
#include <powerpc/types.h>
-#define __HAVE_DEVICE_REGISTER
+#define __HAVE_NEW_STYLE_BUS_H
Index: src/sys/arch/mvmeppc/include/types.h
diff -u src/sys/arch/mvmeppc/include/types.h:1.7 src/sys/arch/mvmeppc/include/types.h:1.8
--- src/sys/arch/mvmeppc/include/types.h:1.7 Sat Jul 17 15:25:57 2010
+++ src/sys/arch/mvmeppc/include/types.h Sun Jul 17 23:23:53 2011
@@ -1,5 +1,5 @@
-/* $NetBSD: types.h,v 1.7 2010/07/17 15:25:57 tsutsui Exp $ */
+/* $NetBSD: types.h,v 1.8 2011/07/17 23:23:53 dyoung Exp $ */
#include <powerpc/types.h>
-#define __HAVE_DEVICE_REGISTER
+#define __HAVE_NEW_STYLE_BUS_H
Index: src/sys/arch/ofppc/include/types.h
diff -u src/sys/arch/ofppc/include/types.h:1.10 src/sys/arch/ofppc/include/types.h:1.11
--- src/sys/arch/ofppc/include/types.h:1.10 Sun Jan 20 18:09:08 2008
+++ src/sys/arch/ofppc/include/types.h Sun Jul 17 23:23:53 2011
@@ -1,5 +1,5 @@
-/* $NetBSD: types.h,v 1.10 2008/01/20 18:09:08 joerg Exp $ */
+/* $NetBSD: types.h,v 1.11 2011/07/17 23:23:53 dyoung Exp $ */
-#define __HAVE_DEVICE_REGISTER
+#define __HAVE_NEW_STYLE_BUS_H
#include <powerpc/types.h>
Index: src/sys/arch/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.45 src/sys/arch/powerpc/include/types.h:1.46
--- src/sys/arch/powerpc/include/types.h:1.45 Thu Jun 23 01:27:20 2011
+++ src/sys/arch/powerpc/include/types.h Sun Jul 17 23:23:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.45 2011/06/23 01:27:20 matt Exp $ */
+/* $NetBSD: types.h,v 1.46 2011/07/17 23:23:54 dyoung Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@@ -75,6 +75,7 @@
#define __SIMPLELOCK_UNLOCKED 0
#define __HAVE_CPU_COUNTER
+#define __HAVE_NEW_STYLE_BUS_H
#define __HAVE_SYSCALL_INTERN
#define __HAVE_CPU_DATA_FIRST
#define __HAVE_CPU_UAREA_ROUTINES
Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.23 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.24
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.23 Sat Jul 2 00:22:06 2011
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Sun Jul 17 23:23:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.23 2011/07/02 00:22:06 matt Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.24 2011/07/17 23:23:54 dyoung Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.23 2011/07/02 00:22:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.24 2011/07/17 23:23:54 dyoung Exp $");
#include "opt_ppcarch.h"
#include "opt_compat_netbsd.h"
@@ -53,10 +53,9 @@
#include <machine/trap.h>
#include <machine/vmparam.h>
#include <machine/autoconf.h>
-#include <powerpc/bus.h>
+#include <sys/bus.h>
#include <powerpc/oea/bat.h>
#include <powerpc/oea/cpufeat.h>
-#include <powerpc/ofw_bus.h>
#include <powerpc/ofw_cons.h>
#include <powerpc/spr.h>
#include <powerpc/pic/picvar.h>
Index: src/sys/arch/powerpc/powerpc/bus_dma.c
diff -u src/sys/arch/powerpc/powerpc/bus_dma.c:1.42 src/sys/arch/powerpc/powerpc/bus_dma.c:1.43
--- src/sys/arch/powerpc/powerpc/bus_dma.c:1.42 Thu Jun 30 00:53:00 2011
+++ src/sys/arch/powerpc/powerpc/bus_dma.c Sun Jul 17 23:23:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.42 2011/06/30 00:53:00 matt Exp $ */
+/* $NetBSD: bus_dma.c,v 1.43 2011/07/17 23:23:54 dyoung Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _POWERPC_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.42 2011/06/30 00:53:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.43 2011/07/17 23:23:54 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -631,13 +631,13 @@
* If we are mapping nocache, flush the page from
* cache before we map it.
*/
- if (flags & BUS_DMA_NOCACHE)
+ if (flags & BUS_DMA_DONTCACHE)
dcbf(addr, PAGE_SIZE,
curcpu()->ci_ci.dcache_line_size);
pmap_kenter_pa(va, addr,
VM_PROT_READ | VM_PROT_WRITE,
PMAP_WIRED |
- ((flags & BUS_DMA_NOCACHE) ? PMAP_NOCACHE : 0));
+ ((flags & BUS_DMA_DONTCACHE) ? PMAP_NOCACHE : 0));
}
}