A few changes so pnpbus devices can do isadma. Note that isadma still
does not seem to work properly on prep.
This commit is contained in:
parent
65b9988ba4
commit
e5bff3e418
|
@ -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.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__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 <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: pnpbus.c,v 1.5 2006/06/23 03:08:41 garbled Exp $");
|
||||||
|
|
||||||
#include <prep/pnpbus/pnpbusvar.h>
|
#include <prep/pnpbus/pnpbusvar.h>
|
||||||
|
|
||||||
|
#include "isadma.h"
|
||||||
|
|
||||||
static int pnpbus_match(struct device *, struct cfdata *, void *);
|
static int pnpbus_match(struct device *, struct cfdata *, void *);
|
||||||
static void pnpbus_attach(struct device *, struct device *, void *);
|
static void pnpbus_attach(struct device *, struct device *, void *);
|
||||||
static int pnpbus_print(void *, const char *);
|
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_ic = paa->paa_ic;
|
||||||
sc->sc_iot = paa->paa_iot;
|
sc->sc_iot = paa->paa_iot;
|
||||||
sc->sc_memt = paa->paa_memt;
|
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);
|
(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_iot = paa->paa_iot;
|
||||||
pna->pna_memt = paa->paa_memt;
|
pna->pna_memt = paa->paa_memt;
|
||||||
pna->pna_ic = paa->paa_ic;
|
pna->pna_ic = paa->paa_ic;
|
||||||
|
pna->pna_dmat = paa->paa_dmat;
|
||||||
pnp_devid_to_string(id->DevId, pna->pna_devid);
|
pnp_devid_to_string(id->DevId, pna->pna_devid);
|
||||||
pna->basetype = id->BaseType;
|
pna->basetype = id->BaseType;
|
||||||
pna->subtype = id->SubType;
|
pna->subtype = id->SubType;
|
||||||
|
|
|
@ -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.
|
* 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_iot; /* i/o space tag */
|
||||||
bus_space_tag_t paa_memt; /* mem space tag */
|
bus_space_tag_t paa_memt; /* mem space tag */
|
||||||
isa_chipset_tag_t paa_ic; /* ISA chipset 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_iot; /* i/o space tag */
|
||||||
bus_space_tag_t pna_memt; /* mem space tag */
|
bus_space_tag_t pna_memt; /* mem space tag */
|
||||||
isa_chipset_tag_t pna_ic; /* ISA chipset 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 */
|
struct pnpresources pna_res; /* resources gathered from PNP */
|
||||||
char pna_devid[8]; /* PNP device id string */
|
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_iot; /* io space tag */
|
||||||
bus_space_tag_t sc_memt; /* mem 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);
|
int pnpbus_scan(struct pnpbus_dev_attach_args *pna, PPC_DEVICE *dev);
|
||||||
|
|
|
@ -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.
|
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__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_pci.h"
|
||||||
#include "opt_residual.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_iot = &prep_isa_io_space_tag;
|
||||||
mba.mba_paa.paa_memt = &prep_isa_mem_space_tag;
|
mba.mba_paa.paa_memt = &prep_isa_mem_space_tag;
|
||||||
mba.mba_paa.paa_ic = &prep_isa_chipset;
|
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);
|
config_found_ia(self, "mainbus", &mba.mba_pba, mainbus_print);
|
||||||
#endif /* NPNPBUS */
|
#endif /* NPNPBUS */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue