From 1687835b3e22b3ba476af9829e54d41ff96655a3 Mon Sep 17 00:00:00 2001 From: thorpej Date: Sun, 11 Jan 1998 21:53:04 +0000 Subject: [PATCH] Pass down bus space tags to children, and use types appropriate for bus.h. --- sys/arch/hp300/dev/dio.c | 5 +++-- sys/arch/hp300/dev/diovar.h | 7 +++++-- sys/arch/hp300/dev/intio.c | 5 +++-- sys/arch/hp300/dev/intiovar.h | 9 ++++++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/sys/arch/hp300/dev/dio.c b/sys/arch/hp300/dev/dio.c index 94183b091bc7..c86d663d6338 100644 --- a/sys/arch/hp300/dev/dio.c +++ b/sys/arch/hp300/dev/dio.c @@ -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); diff --git a/sys/arch/hp300/dev/diovar.h b/sys/arch/hp300/dev/diovar.h index c1eb8ec137b9..10d353e056ba 100644 --- a/sys/arch/hp300/dev/diovar.h +++ b/sys/arch/hp300/dev/diovar.h @@ -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 + /* * 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 */ diff --git a/sys/arch/hp300/dev/intio.c b/sys/arch/hp300/dev/intio.c index c56b5f1c22b3..ab9acea0c3d7 100644 --- a/sys/arch/hp300/dev/intio.c +++ b/sys/arch/hp300/dev/intio.c @@ -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); diff --git a/sys/arch/hp300/dev/intiovar.h b/sys/arch/hp300/dev/intiovar.h index 2801e186ac17..7e3bcfd10285 100644 --- a/sys/arch/hp300/dev/intiovar.h +++ b/sys/arch/hp300/dev/intiovar.h @@ -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 + /* * 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 */ };