diff --git a/sys/arch/evbarm/adi_brh/obio.c b/sys/arch/evbarm/adi_brh/obio.c index aa43bcaceb44..8098c986c2d7 100644 --- a/sys/arch/evbarm/adi_brh/obio.c +++ b/sys/arch/evbarm/adi_brh/obio.c @@ -1,7 +1,7 @@ -/* $NetBSD: obio.c,v 1.3 2003/05/23 05:47:11 briggs Exp $ */ +/* $NetBSD: obio.c,v 1.4 2003/06/15 19:03:46 thorpej Exp $ */ /* - * Copyright (c) 2001, 2002 Wasabi Systems, Inc. + * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. * All rights reserved. * * Written by Jason R. Thorpe for Wasabi Systems, Inc. @@ -110,8 +110,10 @@ obio_print(void *aux, const char *pnp) struct obio_attach_args *oba = aux; aprint_normal(" addr 0x%08lx", oba->oba_addr); - if (oba->oba_irq != -1) + if (oba->oba_irq != OBIOCF_IRQ_DEFAULT) aprint_normal(" irq %d", oba->oba_irq); + if (oba->oba_width != OBIOCF_WIDTH_DEFAULT) + aprint_normal(" width %d", oba->oba_width); return (UNCONF); } @@ -125,6 +127,7 @@ obio_search(struct device *parent, struct cfdata *cf, void *aux) oba.oba_addr = cf->cf_loc[OBIOCF_ADDR]; oba.oba_irq = cf->cf_loc[OBIOCF_IRQ]; + oba.oba_width = cf->cf_loc[OBIOCF_WIDTH]; if (config_match(parent, cf, &oba) > 0) config_attach(parent, cf, &oba, obio_print); diff --git a/sys/arch/evbarm/adi_brh/obiovar.h b/sys/arch/evbarm/adi_brh/obiovar.h index adbfbeadbd1d..4273fea63b83 100644 --- a/sys/arch/evbarm/adi_brh/obiovar.h +++ b/sys/arch/evbarm/adi_brh/obiovar.h @@ -1,4 +1,4 @@ -/* $NetBSD: obiovar.h,v 1.1 2003/01/25 02:00:17 thorpej Exp $ */ +/* $NetBSD: obiovar.h,v 1.2 2003/06/15 19:03:46 thorpej Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -42,6 +42,7 @@ struct obio_attach_args { bus_space_tag_t oba_st; /* bus space tag */ bus_addr_t oba_addr; /* address of device */ int oba_irq; /* BECC interrupt bit # */ + int oba_width; /* bus width */ }; extern struct bus_space obio_bs_tag; diff --git a/sys/arch/evbarm/conf/files.adi_brh b/sys/arch/evbarm/conf/files.adi_brh index e0cb6e7f2d4b..bb9a6e126fb0 100644 --- a/sys/arch/evbarm/conf/files.adi_brh +++ b/sys/arch/evbarm/conf/files.adi_brh @@ -1,4 +1,4 @@ -# $NetBSD: files.adi_brh,v 1.1 2003/01/25 02:00:15 thorpej Exp $ +# $NetBSD: files.adi_brh,v 1.2 2003/06/15 19:03:47 thorpej Exp $ # # ADI BRH evaluation board configuration info # @@ -10,7 +10,7 @@ file arch/evbarm/adi_brh/brh_7seg.c file arch/evbarm/adi_brh/brh_machdep.c # BRH on-board devices -device obio {addr, [irq = -1]}: bus_space_generic +device obio {addr, [irq = -1], [width = -1]}: bus_space_generic attach obio at mainbus file arch/evbarm/adi_brh/obio.c obio file arch/evbarm/adi_brh/obio_space.c obio diff --git a/sys/arch/evbarm/conf/files.iq31244 b/sys/arch/evbarm/conf/files.iq31244 index 3504e306f404..5f5f0a99e8c2 100644 --- a/sys/arch/evbarm/conf/files.iq31244 +++ b/sys/arch/evbarm/conf/files.iq31244 @@ -1,4 +1,4 @@ -# $NetBSD: files.iq31244,v 1.1 2003/05/14 21:41:31 thorpej Exp $ +# $NetBSD: files.iq31244,v 1.2 2003/06/15 19:03:47 thorpej Exp $ # # Intel IQ31244 reference board configuration info # @@ -15,7 +15,7 @@ file arch/evbarm/iq80321/iq80321_machdep.c file arch/evbarm/iq31244/iq31244_pci.c # IQ31244 on-board devices -device obio {addr, [xint = -1]}: bus_space_generic +device obio {addr, [xint = -1], [width = -1]}: bus_space_generic attach obio at mainbus file arch/evbarm/iq80321/obio.c obio file arch/evbarm/iq80321/obio_space.c obio diff --git a/sys/arch/evbarm/conf/files.iq80310 b/sys/arch/evbarm/conf/files.iq80310 index 41ec42550032..7b853289cad7 100644 --- a/sys/arch/evbarm/conf/files.iq80310 +++ b/sys/arch/evbarm/conf/files.iq80310 @@ -1,4 +1,4 @@ -# $NetBSD: files.iq80310,v 1.9 2002/10/03 20:14:58 thorpej Exp $ +# $NetBSD: files.iq80310,v 1.10 2003/06/15 19:03:47 thorpej Exp $ # # Intel IQ80310 evaluation board configuration info # @@ -23,7 +23,7 @@ file arch/evbarm/iq80310/iq80310_timer.c file arch/evbarm/iq80310/iq80310_pci.c # IQ80310 on-board devices (including CPLD) -device obio {addr, [xint3 = -1]}: bus_space_generic +device obio {addr, [xint3 = -1], [width = -1]}: bus_space_generic attach obio at mainbus file arch/evbarm/iq80310/obio.c obio file arch/evbarm/iq80310/obio_space.c obio diff --git a/sys/arch/evbarm/conf/files.iq80321 b/sys/arch/evbarm/conf/files.iq80321 index 3f5e3cec021a..f5c267fbda57 100644 --- a/sys/arch/evbarm/conf/files.iq80321 +++ b/sys/arch/evbarm/conf/files.iq80321 @@ -1,4 +1,4 @@ -# $NetBSD: files.iq80321,v 1.5 2003/04/19 08:18:12 scw Exp $ +# $NetBSD: files.iq80321,v 1.6 2003/06/15 19:03:47 thorpej Exp $ # # Intel IQ80321 evaluation board configuration info # @@ -15,7 +15,7 @@ file arch/evbarm/iq80321/iq80321_machdep.c file arch/evbarm/iq80321/iq80321_pci.c # IQ80321 on-board devices -device obio {addr, [xint = -1]}: bus_space_generic +device obio {addr, [xint = -1], [width = -1]}: bus_space_generic attach obio at mainbus file arch/evbarm/iq80321/obio.c obio file arch/evbarm/iq80321/obio_space.c obio diff --git a/sys/arch/evbarm/iq80310/obio.c b/sys/arch/evbarm/iq80310/obio.c index 80c805f1287c..c978d0d9e19d 100644 --- a/sys/arch/evbarm/iq80310/obio.c +++ b/sys/arch/evbarm/iq80310/obio.c @@ -1,7 +1,7 @@ -/* $NetBSD: obio.c,v 1.12 2003/01/01 01:29:59 thorpej Exp $ */ +/* $NetBSD: obio.c,v 1.13 2003/06/15 19:03:47 thorpej Exp $ */ /* - * Copyright (c) 2001, 2002 Wasabi Systems, Inc. + * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. * All rights reserved. * * Written by Jason R. Thorpe for Wasabi Systems, Inc. @@ -132,6 +132,8 @@ obio_print(void *aux, const char *pnp) aprint_normal(" addr 0x%08lx", oba->oba_addr); if (oba->oba_irq != -1) aprint_normal(" xint3 %d", IRQ_XINT3(oba->oba_irq)); + if (oba->oba_width != OBIOCF_WIDTH_DEFAULT) + aprint_normal(" width %d", oba->oba_width); return (UNCONF); } @@ -149,6 +151,8 @@ obio_search(struct device *parent, struct cfdata *cf, void *aux) else oba.oba_irq = -1; + oba.oba_width = cf->cf_loc[OBIOCF_WIDTH]; + if (config_match(parent, cf, &oba) > 0) config_attach(parent, cf, &oba, obio_print); diff --git a/sys/arch/evbarm/iq80310/obiovar.h b/sys/arch/evbarm/iq80310/obiovar.h index 0e8ea7657d4a..0122e6ab0c1b 100644 --- a/sys/arch/evbarm/iq80310/obiovar.h +++ b/sys/arch/evbarm/iq80310/obiovar.h @@ -1,4 +1,4 @@ -/* $NetBSD: obiovar.h,v 1.2 2002/10/03 20:14:58 thorpej Exp $ */ +/* $NetBSD: obiovar.h,v 1.3 2003/06/15 19:03:47 thorpej Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,6 +42,7 @@ struct obio_attach_args { bus_space_tag_t oba_st; /* bus space tag */ bus_addr_t oba_addr; /* address of device */ int oba_irq; /* CPLD interrupt bit # */ + int oba_width; /* bus width */ }; extern struct bus_space obio_bs_tag; diff --git a/sys/arch/evbarm/iq80321/obio.c b/sys/arch/evbarm/iq80321/obio.c index c9d39dca46c2..26f46c70d17f 100644 --- a/sys/arch/evbarm/iq80321/obio.c +++ b/sys/arch/evbarm/iq80321/obio.c @@ -1,7 +1,7 @@ -/* $NetBSD: obio.c,v 1.8 2003/04/29 01:11:14 thorpej Exp $ */ +/* $NetBSD: obio.c,v 1.9 2003/06/15 19:03:47 thorpej Exp $ */ /* - * Copyright (c) 2001, 2002 Wasabi Systems, Inc. + * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. * All rights reserved. * * Written by Jason R. Thorpe for Wasabi Systems, Inc. @@ -111,6 +111,8 @@ obio_print(void *aux, const char *pnp) aprint_normal(" addr 0x%08lx", oba->oba_addr); if (oba->oba_irq != -1) aprint_normal(" xint %d", oba->oba_irq - ICU_INT_XINT0); + if (oba->oba_width != OBIOCF_WIDTH_DEFAULT) + aprint_normal(" width %d", oba->oba_width); return (UNCONF); } @@ -129,6 +131,8 @@ obio_search(struct device *parent, struct cfdata *cf, void *aux) else oba.oba_irq = -1; + oba.oba_width = cf->cf_loc[OBIOCF_WIDTH]; + if (config_match(parent, cf, &oba) > 0) config_attach(parent, cf, &oba, obio_print); diff --git a/sys/arch/evbarm/iq80321/obiovar.h b/sys/arch/evbarm/iq80321/obiovar.h index 915d8d9bf696..61ac50f2d31d 100644 --- a/sys/arch/evbarm/iq80321/obiovar.h +++ b/sys/arch/evbarm/iq80321/obiovar.h @@ -1,4 +1,4 @@ -/* $NetBSD: obiovar.h,v 1.2 2002/10/03 20:14:59 thorpej Exp $ */ +/* $NetBSD: obiovar.h,v 1.3 2003/06/15 19:03:47 thorpej Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -41,7 +41,8 @@ struct obio_attach_args { bus_space_tag_t oba_st; /* bus space tag */ bus_addr_t oba_addr; /* address of device */ - int oba_irq; /* CPLD interrupt bit # */ + int oba_irq; /* XINT interrupt bit # */ + int oba_width; /* bus width */ }; extern struct bus_space obio_bs_tag;