diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-19 12:52:34 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-19 12:52:34 +0000 |
commit | 697e8762a99f4297ea2f3a1994450ab96f4e0600 (patch) | |
tree | fdf4144848923499e0be34ce361099f5f55bad0d /sys/arch/sgi/xbow | |
parent | b6cb614f0405d63793d9df68b964b36dcd50bb45 (diff) |
Add heuristics to tell IP27 and IP35 apart, as they will need to be handled
differently at times.
Diffstat (limited to 'sys/arch/sgi/xbow')
-rw-r--r-- | sys/arch/sgi/xbow/xbow.c | 16 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbridge.c | 3 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/arch/sgi/xbow/xbow.c b/sys/arch/sgi/xbow/xbow.c index f0c9b4a1270..63d6b16019d 100644 --- a/sys/arch/sgi/xbow/xbow.c +++ b/sys/arch/sgi/xbow/xbow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbow.c,v 1.4 2009/04/15 18:45:41 miod Exp $ */ +/* $OpenBSD: xbow.c,v 1.5 2009/04/19 12:52:33 miod Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -189,6 +189,7 @@ xbowmatch(struct device *parent, void *match, void *aux) { switch (sys_config.system_type) { case SGI_O200: + case SGI_O300: case SGI_OCTANE: return (1); default: @@ -301,9 +302,17 @@ xbowattach(struct device *parent, struct device *self, void *aux) (wid & WIDGET_ID_REV_MASK) >> WIDGET_ID_REV_SHIFT); /* + * Default value for the interrupt register. If this system + * has a Heart widget, the Heart code will take care of changing it. + */ + xbow_intr_widget_register = (1UL << 47) /* XIO I/O space */ | + ((paddr_t)IP27_RHUB_ADDR(nasid, HUB_IR_CHANGE) - + IP27_NODE_IO_BASE(nasid)) /* HUB register offset */; + + /* * If widget 0 reports itself as a bridge, this is not a * complete XBow, but only a limited topology. This is - * found on the Origin 200 (but probably not on the Origin 2000). + * found on at least the Origin 200. */ if (vendor == XBOW_VENDOR_SGI4 && product == XBOW_PRODUCT_SGI4_BRIDGE) { /* @@ -311,9 +320,6 @@ xbowattach(struct device *parent, struct device *self, void *aux) * bridge). */ xbow_intr_widget = 0x0a; - xbow_intr_widget_register = (1UL << 47) /* XIO I/O space */ | - ((paddr_t)IP27_RHUB_ADDR(nasid, HUB_IR_CHANGE) - - IP27_NODE_IO_BASE(nasid)) /* HUB register offset */; xbow_attach_widget(self, nasid, WIDGET_MIN, xbowsubmatch_pass2, xbowprint_pass2); diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c index 2714a02a754..b729bf2c464 100644 --- a/sys/arch/sgi/xbow/xbridge.c +++ b/sys/arch/sgi/xbow/xbridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbridge.c,v 1.10 2009/04/18 19:26:33 miod Exp $ */ +/* $OpenBSD: xbridge.c,v 1.11 2009/04/19 12:52:33 miod Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -618,6 +618,7 @@ xbridge_intr_establish(void *cookie, pci_intr_handle_t ih, int level, break; default: case SGI_O200: + case SGI_O300: int_addr = 0x20000 | intrsrc | (nasid << 8); break; } |