summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Dagum <dagum@engr.sgi.com>2000-03-30 23:34:26 +0000
committerLeo Dagum <dagum@engr.sgi.com>2000-03-30 23:34:26 +0000
commit54224ce67ccea820ba4ffc50b3c76878aba0cad3 (patch)
tree01cac780eea8b44aabca23197f89edf210a77543
parent71556f85909c4358ad829da918d2ad6df89b932f (diff)
Added pcibr_setup() routine to initialize some bridge registers different
from what the prom gives us.
-rw-r--r--arch/mips64/sgi-ip27/ip27-setup.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-setup.c b/arch/mips64/sgi-ip27/ip27-setup.c
index f0d7d66ab..7a72a24bb 100644
--- a/arch/mips64/sgi-ip27/ip27-setup.c
+++ b/arch/mips64/sgi-ip27/ip27-setup.c
@@ -1,4 +1,4 @@
-/* $Id: ip27-setup.c,v 1.6 2000/02/05 02:12:32 kanoj Exp $
+/* $Id: ip27-setup.c,v 1.7 2000/03/07 15:45:29 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -19,6 +19,9 @@
#include <asm/sn/klconfig.h>
#include <asm/ioc3.h>
#include <asm/mipsregs.h>
+#include <asm/sn/arch.h>
+#include <asm/pci/bridge.h>
+#include <asm/paccess.h>
/* Check against user dumbness. */
#ifdef CONFIG_VT
@@ -84,6 +87,23 @@ static void __init verify_mode(void)
#endif
}
+static void __init pcibr_setup(void)
+{
+ bridge_t *bridge = (bridge_t *) 0x9200000008000000;
+ bridgereg_t devreg;
+ int slot;
+
+ /*
+ * Clear all pending interrupts.
+ */
+ bridge->b_int_rst_stat = (BRIDGE_IRR_ALL_CLR);
+ /*
+ * Until otherwise set up, assume all interrupts are from slot 0
+ */
+ bridge->b_int_device = (u32) 0x0;
+ bridge->b_wid_tflush; /* wait until Bridge PIO complete */
+}
+
void __init ip27_setup(void)
{
nasid_t nid;
@@ -108,4 +128,7 @@ void __init ip27_setup(void)
verify_mode();
ioc3_sio_init();
ioc3_eth_init();
+
+ /* set some bridge registers */
+ pcibr_setup();
}