Pass the children register space in the attach arguments.

This commit is contained in:
pk 1998-09-19 15:47:18 +00:00
parent e4b5f53951
commit 1bcd9d3bbb
2 changed files with 18 additions and 2 deletions

View File

@ -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
}

View File

@ -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 */
};