Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc grackle uses different I/O address.
details: https://anonhg.NetBSD.org/src/rev/b087187a67bb
branches: trunk
changeset: 474783:b087187a67bb
user: tsubai <tsubai%NetBSD.org@localhost>
date: Tue Jul 20 17:31:59 1999 +0000
description:
grackle uses different I/O address.
diffstat:
sys/arch/macppc/macppc/machdep.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (44 lines):
diff -r 5744e1deeec7 -r b087187a67bb sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c Tue Jul 20 10:53:05 1999 +0000
+++ b/sys/arch/macppc/macppc/machdep.c Tue Jul 20 17:31:59 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.50 1999/07/08 18:08:55 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.51 1999/07/20 17:31:59 tsubai Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -81,15 +81,10 @@
#endif
#include <machine/bat.h>
-#include <machine/pmap.h>
#include <machine/powerpc.h>
#include <machine/trap.h>
-
#include <machine/bus.h>
-#include <dev/pci/pcireg.h>
-#include <dev/pci/pcivar.h>
-
#include <dev/cons.h>
#include <dev/ofw/openfirm.h>
@@ -196,9 +191,15 @@
:: "r"(battable[0].batl), "r"(battable[0].batu));
/* BAT1 statically maps obio devices */
- /* 0xf0000000-0xf7ffffff (128MB) --> 0xf0000000- */
- asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1"
- :: "r"(0xf0000002 | BAT_I), "r"(0xf0000ffe));
+ if (OF_finddevice("/pci") != -1) {
+ /* 0xfe000000-0xfeffffff (16MB) --> 0xfe000000- */
+ asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1"
+ :: "r"(0xfe000002 | BAT_I), "r"(0xfe0001fe));
+ } else {
+ /* 0xf0000000-0xf7ffffff (128MB) --> 0xf0000000- */
+ asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1"
+ :: "r"(0xf0000002 | BAT_I), "r"(0xf0000ffe));
+ }
chosen = OF_finddevice("/chosen");
save_ofw_mapping();
Home |
Main Index |
Thread Index |
Old Index