Pass down bus space tags to children, and use types appropriate for

bus.h.
This commit is contained in:
thorpej 1998-01-11 21:53:04 +00:00
parent 774d66001e
commit 1687835b3e
4 changed files with 17 additions and 9 deletions

View File

@ -1,7 +1,7 @@
/* $NetBSD: dio.c,v 1.10 1997/10/09 09:06:49 jtc Exp $ */
/* $NetBSD: dio.c,v 1.11 1998/01/11 21:53:04 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -146,6 +146,7 @@ dioattach(parent, self, aux)
/* Fill out attach args. */
bzero(&da, sizeof(da));
da.da_bst = HP300_BUS_SPACE_DIO;
da.da_scode = scode;
da.da_id = DIO_ID(va);

View File

@ -1,7 +1,7 @@
/* $NetBSD: diovar.h,v 1.6 1997/10/09 09:06:52 jtc Exp $ */
/* $NetBSD: diovar.h,v 1.7 1998/01/11 21:53:05 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -40,10 +40,13 @@
* Autoconfiguration definitions and prototypes for the DIO bus.
*/
#include <machine/bus.h>
/*
* Arguments used to attach a device to the DIO bus.
*/
struct dio_attach_args {
bus_space_tag_t da_bst; /* bus space tag */
int da_scode; /* select code */
int da_size; /* size of address space */
u_int8_t da_id; /* primary device id */

View File

@ -1,7 +1,7 @@
/* $NetBSD: intio.c,v 1.3 1997/10/09 09:06:54 jtc Exp $ */
/* $NetBSD: intio.c,v 1.4 1998/01/11 21:53:05 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -108,6 +108,7 @@ intiosearch(parent, cf, aux)
struct intio_attach_args ia;
bzero(&ia, sizeof(ia));
ia.ia_bst = HP300_BUS_SPACE_INTIO;
if ((*cf->cf_attach->ca_match)(parent, cf, &ia) > 0)
config_attach(parent, cf, &ia, intioprint);
return (0);

View File

@ -1,7 +1,7 @@
/* $NetBSD: intiovar.h,v 1.3 1997/10/09 09:06:55 jtc Exp $ */
/* $NetBSD: intiovar.h,v 1.4 1998/01/11 21:53:06 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -41,9 +41,12 @@
* internal i/o space.
*/
#include <machine/bus.h>
/*
* Arguments used to attach a device to the internal i/o space.
*/
struct intio_attach_args {
caddr_t ia_addr; /* physical address */
bus_space_tag_t ia_bst; /* bus space tag */
bus_addr_t ia_addr; /* physical address */
};