- Garbage-collect all DMA-related initialization, calling a separate
*_dma_init() function instead. - Pass the appropriate bus dma tag to children.
This commit is contained in:
parent
3ac7ac6e63
commit
375ad27ed8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apecs.c,v 1.23 1997/09/02 12:40:18 thorpej Exp $ */
|
||||
/* $NetBSD: apecs.c,v 1.24 1997/09/02 12:51:20 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.23 1997/09/02 12:40:18 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.24 1997/09/02 12:51:20 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -106,11 +106,6 @@ apecs_init(acp, mallocsafe)
|
|||
acp->ac_haxr1 = REGVAL(EPIC_HAXR1);
|
||||
acp->ac_haxr2 = REGVAL(EPIC_HAXR2);
|
||||
|
||||
/*
|
||||
* Can't set up SGMAP data here; can be called before malloc().
|
||||
* XXX THIS COMMENT NO LONGER MAKES SENSE.
|
||||
*/
|
||||
|
||||
if (!acp->ac_initted) {
|
||||
/* don't do these twice since they set up extents */
|
||||
apecs_bus_io_init(&acp->ac_iot, acp);
|
||||
|
@ -120,18 +115,7 @@ apecs_init(acp, mallocsafe)
|
|||
|
||||
apecs_pci_init(&acp->ac_pc, acp);
|
||||
|
||||
/* Turn off DMA window enables in PCI Base Reg 1. */
|
||||
REGVAL(EPIC_PCI_BASE_1) = 0;
|
||||
alpha_mb();
|
||||
|
||||
/* XXX SGMAP? */
|
||||
|
||||
/* XXX XXX BEGIN XXX XXX */
|
||||
{ /* XXX */
|
||||
extern vm_offset_t alpha_XXX_dmamap_or; /* XXX */
|
||||
alpha_XXX_dmamap_or = 0x40000000; /* XXX */
|
||||
} /* XXX */
|
||||
/* XXX XXX END XXX XXX */
|
||||
apecs_dma_init(acp);
|
||||
|
||||
acp->ac_initted = 1;
|
||||
}
|
||||
|
@ -182,6 +166,7 @@ apecsattach(parent, self, aux)
|
|||
pba.pba_busname = "pci";
|
||||
pba.pba_iot = acp->ac_iot;
|
||||
pba.pba_memt = acp->ac_memt;
|
||||
pba.pba_dmat = &acp->ac_dmat_direct;
|
||||
pba.pba_pc = &acp->ac_pc;
|
||||
pba.pba_bus = 0;
|
||||
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
|
||||
|
|
Loading…
Reference in New Issue