Add an optional "width" locator to the obio bus, specifying the
bus width of the device.
This commit is contained in:
parent
05d2fb4399
commit
998f8a71ed
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue