summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/pci/ioc.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-04-06 19:12:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-04-06 19:12:35 +0000
commit09e8efc0c49a6be063bc81a0f97257ba897e5dea (patch)
treefc49ea6513f23b3755cc10f76216ea119f299add /sys/arch/sgi/pci/ioc.c
parent883df95ae052284f135dab080cce056e38ee3d6d (diff)
Obtain struct sgi_device_location for the console input and output devices,
and compare against them when attaching potential console drivers, to figure out whether they indeed are acting are console devices or not.
Diffstat (limited to 'sys/arch/sgi/pci/ioc.c')
-rw-r--r--sys/arch/sgi/pci/ioc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c
index c19fc82b88e..e1f9a00707e 100644
--- a/sys/arch/sgi/pci/ioc.c
+++ b/sys/arch/sgi/pci/ioc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioc.c,v 1.33 2010/03/20 16:22:53 miod Exp $ */
+/* $OpenBSD: ioc.c,v 1.34 2010/04/06 19:12:34 miod Exp $ */
/*
* Copyright (c) 2008 Joel Sing.
@@ -66,7 +66,6 @@ struct ioc_intr {
struct ioc_softc {
struct device sc_dev;
- int sc_npci;
struct mips_bus_space *sc_mem_bus_space;
@@ -74,6 +73,7 @@ struct ioc_softc {
bus_space_handle_t sc_memh;
bus_dma_tag_t sc_dmat;
pci_chipset_tag_t sc_pc;
+ pcitag_t sc_tag;
void *sc_ih_enet; /* Ethernet interrupt */
void *sc_ih_superio; /* SuperIO interrupt */
@@ -171,7 +171,7 @@ ioc_attach(struct device *parent, struct device *self, void *aux)
}
sc->sc_pc = pa->pa_pc;
- sc->sc_npci = pa->pa_device;
+ sc->sc_tag = pa->pa_tag;
sc->sc_dmat = pa->pa_dmat;
/*
@@ -508,9 +508,7 @@ ioc_attach_child(struct ioc_softc *sc, const char *name, bus_addr_t base,
memset(&iaa, 0, sizeof iaa);
iaa.iaa_name = name;
- iaa.iaa_nasid = pci_get_nasid(sc->sc_pc);
- iaa.iaa_widget = pci_get_widget(sc->sc_pc);
- iaa.iaa_npci = sc->sc_npci;
+ pci_get_device_location(sc->sc_pc, sc->sc_tag, &iaa.iaa_location);
iaa.iaa_memt = sc->sc_memt;
iaa.iaa_memh = sc->sc_memh;
iaa.iaa_dmat = sc->sc_dmat;