From 8c7d26072be8244ca9aa2031cc6483e03e4f5b19 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Fri, 16 Jun 2006 01:31:36 +0000 Subject: If there is going to be a kludge to change the irq for com, do it early enough so that the used irq is printed in dmesg. --- sys/arch/armish/dev/com_obio.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sys/arch/armish/dev') 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; -- cgit v1.2.3