summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/pci
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-04-13 21:17:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-04-13 21:17:55 +0000
commit5a4ab77cd05371c9c73e0252ecb3d9b195c4cccc (patch)
tree1cb1261a2880f19e089601df90360c6e86693ff2 /sys/arch/sgi/pci
parent965d0314e696574208eb46763d7b45a3989da26e (diff)
The start of Origin 200 support. Based on some code contributed by pefo@
some years ago for KL enumeration, building on the existing XBow support to limit ourselves to a single node for now. This is a work-in-progress; it currently lacks complete interrupt code, as well as PCI resource management. And there are likely bugs creeping inside.
Diffstat (limited to 'sys/arch/sgi/pci')
-rw-r--r--sys/arch/sgi/pci/ioc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c
index e00a3bc59d0..af606dcba64 100644
--- a/sys/arch/sgi/pci/ioc.c
+++ b/sys/arch/sgi/pci/ioc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioc.c,v 1.3 2009/04/12 17:56:58 miod Exp $ */
+/* $OpenBSD: ioc.c,v 1.4 2009/04/13 21:17:54 miod Exp $ */
/*
* Copyright (c) 2008 Joel Sing.
@@ -27,6 +27,7 @@
#include <sys/device.h>
#include <sys/malloc.h>
+#include <mips64/archtype.h>
#include <machine/autoconf.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -41,7 +42,9 @@
#include <dev/onewire/onewirereg.h>
#include <dev/onewire/onewirevar.h>
+#if 0
#include <sgi/dev/if_efreg.h>
+#endif
#include <sgi/dev/owmacvar.h>
#include <sgi/xbow/xbow.h>
@@ -228,6 +231,10 @@ ioc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_mem_bus_space->_space_write_1 = xbow_write_1;
sc->sc_mem_bus_space->_space_write_2 = xbow_write_2;
+ /* XXX undo IP27 xbridge weird mapping */
+ if (sys_config.system_type != SGI_OCTANE)
+ sc->sc_mem_bus_space->_space_map = xbow_space_map_short;
+
sc->sc_memt = sc->sc_mem_bus_space;
sc->sc_memh = memh;
@@ -515,6 +522,7 @@ ioc_intr_superio(void *v)
int
ioc_intr_ethernet(void *v)
{
+#if 0
struct ioc_softc *sc = (struct ioc_softc *)v;
uint32_t stat;
@@ -527,6 +535,9 @@ ioc_intr_ethernet(void *v)
bus_space_write_4(sc->sc_memt, sc->sc_memh, EF_INTR_STATUS, stat);
return 1;
+#else
+ return 0;
+#endif
}
void