diff --git a/sys/arch/prep/pnpbus/pnpbus.c b/sys/arch/prep/pnpbus/pnpbus.c index 7a6352779434..1c1ed2c172b1 100644 --- a/sys/arch/prep/pnpbus/pnpbus.c +++ b/sys/arch/prep/pnpbus/pnpbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbus.c,v 1.5 2006/06/23 03:08:41 garbled Exp $ */ +/* $NetBSD: pnpbus.c,v 1.6 2006/10/27 19:52:51 garbled Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pnpbus.c,v 1.5 2006/06/23 03:08:41 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pnpbus.c,v 1.6 2006/10/27 19:52:51 garbled Exp $"); #include #include @@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: pnpbus.c,v 1.5 2006/06/23 03:08:41 garbled Exp $"); #include +#include "isadma.h" + static int pnpbus_match(struct device *, struct cfdata *, void *); static void pnpbus_attach(struct device *, struct device *, void *); static int pnpbus_print(void *, const char *); @@ -88,6 +90,11 @@ pnpbus_attach(struct device *parent, struct device *self, void *aux) sc->sc_ic = paa->paa_ic; sc->sc_iot = paa->paa_iot; sc->sc_memt = paa->paa_memt; + sc->sc_dmat = paa->paa_dmat; + +#if NISADMA > 0 + isa_dmainit(sc->sc_ic, sc->sc_iot, sc->sc_dmat, self); +#endif (void)config_search_ia(pnpbus_search, self, "pnpbus", aux); } @@ -347,6 +354,7 @@ pnp_getpna(struct pnpbus_dev_attach_args *pna, struct pnpbus_attach_args *paa, pna->pna_iot = paa->paa_iot; pna->pna_memt = paa->paa_memt; pna->pna_ic = paa->paa_ic; + pna->pna_dmat = paa->paa_dmat; pnp_devid_to_string(id->DevId, pna->pna_devid); pna->basetype = id->BaseType; pna->subtype = id->SubType; diff --git a/sys/arch/prep/pnpbus/pnpbusvar.h b/sys/arch/prep/pnpbus/pnpbusvar.h index d519fbf30000..90951f4b124b 100644 --- a/sys/arch/prep/pnpbus/pnpbusvar.h +++ b/sys/arch/prep/pnpbus/pnpbusvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbusvar.h,v 1.3 2006/06/23 03:08:41 garbled Exp $ */ +/* $NetBSD: pnpbusvar.h,v 1.4 2006/10/27 19:52:51 garbled Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -90,6 +90,7 @@ struct pnpbus_attach_args { bus_space_tag_t paa_iot; /* i/o space tag */ bus_space_tag_t paa_memt; /* mem space tag */ isa_chipset_tag_t paa_ic; /* ISA chipset tag */ + bus_dma_tag_t paa_dmat; /* ISA DMA tag */ }; /* @@ -99,6 +100,7 @@ struct pnpbus_dev_attach_args { bus_space_tag_t pna_iot; /* i/o space tag */ bus_space_tag_t pna_memt; /* mem space tag */ isa_chipset_tag_t pna_ic; /* ISA chipset tag */ + bus_dma_tag_t pna_dmat; /* ISA DMA tag */ struct pnpresources pna_res; /* resources gathered from PNP */ char pna_devid[8]; /* PNP device id string */ @@ -121,6 +123,7 @@ struct pnpbus_softc { bus_space_tag_t sc_iot; /* io space tag */ bus_space_tag_t sc_memt; /* mem space tag */ + bus_dma_tag_t sc_dmat; /* ISA DMA tag */ }; int pnpbus_scan(struct pnpbus_dev_attach_args *pna, PPC_DEVICE *dev); diff --git a/sys/arch/prep/prep/mainbus.c b/sys/arch/prep/prep/mainbus.c index 61b3f63cca32..534efbc43a7a 100644 --- a/sys/arch/prep/prep/mainbus.c +++ b/sys/arch/prep/prep/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.25 2006/09/01 07:02:29 garbled Exp $ */ +/* $NetBSD: mainbus.c,v 1.26 2006/10/27 19:52:51 garbled Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.25 2006/09/01 07:02:29 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.26 2006/10/27 19:52:51 garbled Exp $"); #include "opt_pci.h" #include "opt_residual.h" @@ -163,6 +163,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux) mba.mba_paa.paa_iot = &prep_isa_io_space_tag; mba.mba_paa.paa_memt = &prep_isa_mem_space_tag; mba.mba_paa.paa_ic = &prep_isa_chipset; + mba.mba_paa.paa_dmat = &isa_bus_dma_tag; config_found_ia(self, "mainbus", &mba.mba_pba, mainbus_print); #endif /* NPNPBUS */