Move the call to isa_dmainit to mainbus_attach from pnpbios_attach since

ACPI needs to have that done for the exact same reasons as ACPI.
This commit is contained in:
matt 2002-12-28 17:11:50 +00:00
parent e60823f9f2
commit 51ec27c813
2 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.43 2002/12/28 06:14:08 jmcneill Exp $ */
/* $NetBSD: mainbus.c,v 1.44 2002/12/28 17:11:50 matt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.43 2002/12/28 06:14:08 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.44 2002/12/28 17:11:50 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.43 2002/12/28 06:14:08 jmcneill Exp $"
#include "pci.h"
#include "eisa.h"
#include "isa.h"
#include "isadma.h"
#include "mca.h"
#include "apm.h"
#include "pnpbios.h"
@ -188,6 +189,13 @@ mainbus_attach(parent, self, aux)
pci_mode = pci_mode_detect();
#endif
#if NISADMA > 0 && (NACPCI > 0 || NPNPBIOS > 0)
/*
* ACPI and PNPBIOS need ISA DMA initialized before they start probing.
*/
isa_dmainit(sc->sc_ic, I386_BUS_SPACE_IO, &isa_bus_dma_tag, self);
#endif
#if NACPI > 0
if (acpi_probe()) {
mba.mba_acpi.aa_busname = "acpi";

View File

@ -1,4 +1,4 @@
/* $NetBSD: pnpbios.c,v 1.30 2002/10/02 05:47:17 thorpej Exp $ */
/* $NetBSD: pnpbios.c,v 1.31 2002/12/28 17:11:51 matt Exp $ */
/*
* Copyright (c) 2000 Jason R. Thorpe. All rights reserved.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.30 2002/10/02 05:47:17 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.31 2002/12/28 17:11:51 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,7 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.30 2002/10/02 05:47:17 thorpej Exp $")
#include <arch/i386/pnpbios/pnpbiosreg.h>
#include "opt_pnpbiosverbose.h"
#include "isadma.h"
#include "locators.h"
#ifdef PNPBIOSVERBOSE
@ -302,10 +301,6 @@ pnpbios_attach(parent, self, aux)
pnpbios_softc = sc;
sc->sc_ic = paa->paa_ic;
#if NISADMA > 0
isa_dmainit(sc->sc_ic, I386_BUS_SPACE_IO, &isa_bus_dma_tag, self);
#endif
p = pnpbios_find();
if (!p)
panic("pnpbios_attach: disappeared");