summaryrefslogtreecommitdiff
path: root/sys/arch/armish/dev/com_obio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/armish/dev/com_obio.c')
-rw-r--r--sys/arch/armish/dev/com_obio.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/armish/dev/com_obio.c b/sys/arch/armish/dev/com_obio.c
index 2d488cc2817..b8c40f917ca 100644
--- a/sys/arch/armish/dev/com_obio.c
+++ b/sys/arch/armish/dev/com_obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_obio.c,v 1.3 2006/06/01 18:46:05 drahn Exp $ */
+/* $OpenBSD: com_obio.c,v 1.4 2006/06/16 01:31:35 drahn Exp $ */
/* $NetBSD: com_obio.c,v 1.9 2005/12/11 12:17:09 christos Exp $ */
/*-
@@ -67,14 +67,21 @@ struct cfdriver com_obio_cd = {
NULL, "com_obio", DV_DULL
};
+int com_irq_override = -1;
+
int
com_obio_match(struct device *parent, void *cf, void *aux)
{
+ struct obio_attach_args *oba = aux;
+
+ /* if the irq does not match, do not attach */
+ if (com_irq_override != -1)
+ oba->oba_irq = com_irq_override;
+
/* We take it on faith that the device is there. */
return (1);
}
-int com_irq_override = -1;
void
com_obio_attach(struct device *parent, struct device *self, void *aux)
@@ -84,10 +91,6 @@ com_obio_attach(struct device *parent, struct device *self, void *aux)
struct com_softc *sc = &osc->sc_com;
int error;
- /* XXX old value is already printed */
- if (com_irq_override != -1)
- oba->oba_irq = com_irq_override;
-
sc->sc_iot = oba->oba_st;
sc->sc_iobase = oba->oba_addr;
sc->sc_frequency = COM_FREQ;