diff options
| author | pk <pk@NetBSD.org> | 1998-09-19 15:47:18 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 1998-09-19 15:47:18 +0000 |
| commit | 1bcd9d3bbb8ca4cb82d255b76f68bada8f72afa4 (patch) | |
| tree | 091a2c1091b341d1b7eb57771906ae9e896d1e70 /sys | |
| parent | e4b5f539514f6c400bf8adbf1c58a8e3a66718ea (diff) | |
Pass the children register space in the attach arguments.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/sparc/sparc/iommu.c | 10 | ||||
| -rw-r--r-- | sys/arch/sparc/sparc/iommuvar.h | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/iommu.c b/sys/arch/sparc/sparc/iommu.c index aa8c898f5f0..8fd82953fe7 100644 --- a/sys/arch/sparc/sparc/iommu.c +++ b/sys/arch/sparc/sparc/iommu.c @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.26 1998/09/10 21:08:39 pk Exp $ */ +/* $NetBSD: iommu.c,v 1.27 1998/09/19 15:47:19 pk Exp $ */ /* * Copyright (c) 1996 @@ -329,9 +329,17 @@ iommu_attach(parent, self, aux) /* Propagate BUS & DMA tags */ ia.iom_bustag = ma->ma_bustag; ia.iom_dmatag = &iommu_dma_tag; + ia.iom_node = node; ia.iom_bp = bp; + + ia.iom_reg = NULL; + getprop(node, "reg", sizeof(struct sbus_reg), + &ia.iom_nreg, (void **)&ia.iom_reg); + (void) config_found(&sc->sc_dev, (void *)&ia, iommu_print); + if (ia.iom_reg != NULL) + free(ia.iom_reg, M_DEVBUF); } #endif } diff --git a/sys/arch/sparc/sparc/iommuvar.h b/sys/arch/sparc/sparc/iommuvar.h index 3db049e8721..21309f83141 100644 --- a/sys/arch/sparc/sparc/iommuvar.h +++ b/sys/arch/sparc/sparc/iommuvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: iommuvar.h,v 1.3 1998/08/21 13:29:57 pk Exp $ */ +/* $NetBSD: iommuvar.h,v 1.4 1998/09/19 15:47:18 pk Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -39,11 +39,19 @@ #ifndef _IOMMU_VAR_H #define _IOMMU_VAR_H +struct iommu_reg { + u_int32_t ior_iospace; + u_int32_t ior_pa; + u_int32_t ior_size; +}; + struct iommu_attach_args { bus_space_tag_t iom_bustag; bus_dma_tag_t iom_dmatag; char *iom_name; /* PROM node name */ int iom_node; /* PROM handle */ + struct iommu_reg *iom_reg; + int iom_nreg; struct bootpath *iom_bp; /* used for locating boot device */ }; |
