summaryrefslogtreecommitdiff
path: root/sys/arch/landisk
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-10-21 14:43:52 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-10-21 14:43:52 +0000
commita4d809bed6bff24d34840bab41226b5dcfd5a0b3 (patch)
treec2ee2eda012f6fb9c3f8966a9b5b466375cce5a2 /sys/arch/landisk
parent1d6526c6f4de3600111b9ba4b1194566a9d69b5d (diff)
Do not pass down IOBASEUNK/MADDRUNK/IRQUNK.
ok miod@, drahn@
Diffstat (limited to 'sys/arch/landisk')
-rw-r--r--sys/arch/landisk/dev/obio.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/sys/arch/landisk/dev/obio.c b/sys/arch/landisk/dev/obio.c
index 4c7208a720d..a4b80cccf5c 100644
--- a/sys/arch/landisk/dev/obio.c
+++ b/sys/arch/landisk/dev/obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: obio.c,v 1.2 2006/10/11 20:34:19 miod Exp $ */
+/* $OpenBSD: obio.c,v 1.3 2006/10/21 14:43:51 kettenis Exp $ */
/* $NetBSD: obio.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -104,23 +104,27 @@ obio_search(struct device *parent, void *vcf, void *aux)
oa.oa_iot = sc->sc_iot;
oa.oa_memt = sc->sc_memt;
+ oa.oa_nio = oa.oa_niomem = oa.oa_nirq = 0;
- res_io[0].or_addr = cf->cf_iobase;
- res_io[0].or_size = cf->cf_iosize;
-
- res_mem[0].or_addr = cf->cf_maddr;
- res_mem[0].or_size = cf->cf_msize;
-
- res_irq[0].or_irq = cf->cf_irq;
-
- oa.oa_io = res_io;
- oa.oa_nio = 1;
+ if (cf->cf_iobase != IOBASEUNK) {
+ res_io[0].or_addr = cf->cf_iobase;
+ res_io[0].or_size = cf->cf_iosize;
+ oa.oa_io = res_io;
+ oa.oa_nio = 1;
+ }
- oa.oa_iomem = res_mem;
- oa.oa_niomem = 1;
+ if (cf->cf_maddr != MADDRUNK) {
+ res_mem[0].or_addr = cf->cf_maddr;
+ res_mem[0].or_size = cf->cf_msize;
+ oa.oa_iomem = res_mem;
+ oa.oa_niomem = 1;
+ }
- oa.oa_irq = res_irq;
- oa.oa_nirq = 1;
+ if (cf->cf_irq != IRQUNK) {
+ res_irq[0].or_irq = cf->cf_irq;
+ oa.oa_irq = res_irq;
+ oa.oa_nirq = 1;
+ }
if ((*cf->cf_attach->ca_match)(parent, cf, &oa) == 0)
return (0);