Glue in ACPI -- not really for prime-time, but useful for developers.
This commit is contained in:
parent
1a9d24bce1
commit
70f1ab462a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mainbus.c,v 1.32 2001/04/01 23:14:02 jdolecek Exp $ */
|
||||
/* $NetBSD: mainbus.c,v 1.33 2001/09/28 03:56:21 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -48,6 +48,7 @@
|
|||
#include "mca.h"
|
||||
#include "apm.h"
|
||||
#include "pnpbios.h"
|
||||
#include "acpi.h"
|
||||
|
||||
#if NAPM > 0
|
||||
#include <machine/bioscall.h>
|
||||
|
@ -58,6 +59,10 @@
|
|||
#include <arch/i386/pnpbios/pnpbiosvar.h>
|
||||
#endif
|
||||
|
||||
#if NACPI > 0
|
||||
#include <dev/acpi/acpivar.h>
|
||||
#endif
|
||||
|
||||
#if NMCA > 0
|
||||
#include <dev/mca/mcavar.h>
|
||||
#endif
|
||||
|
@ -85,6 +90,9 @@ union mainbus_attach_args {
|
|||
#if NPNPBIOS > 0
|
||||
struct pnpbios_attach_args mba_paa;
|
||||
#endif
|
||||
#if NACPI > 0
|
||||
struct acpibus_attach_args mba_acpi;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -132,7 +140,31 @@ mainbus_attach(parent, self, aux)
|
|||
|
||||
printf("\n");
|
||||
|
||||
#if NACPI > 0
|
||||
if (acpi_probe()) {
|
||||
mba.mba_acpi.aa_busname = "acpi";
|
||||
mba.mba_acpi.aa_iot = I386_BUS_SPACE_IO;
|
||||
mba.mba_acpi.aa_memt = I386_BUS_SPACE_MEM;
|
||||
mba.mba_acpi.aa_pc = NULL;
|
||||
mba.mba_acpi.aa_pciflags =
|
||||
PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
|
||||
config_found(self, &mba.mba_acpi, mainbus_print);
|
||||
#if 0 /* XXXJRT not yet */
|
||||
if (acpi_active) {
|
||||
/*
|
||||
* ACPI already did all the work for us, there
|
||||
* is nothing more for us to do.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NPNPBIOS > 0
|
||||
#if NACPI > 0
|
||||
if (acpi_active == 0)
|
||||
#endif
|
||||
if (pnpbios_probe()) {
|
||||
mba.mba_paa.paa_busname = "pnpbios";
|
||||
mba.mba_paa.paa_ic = &i386_isa_chipset;
|
||||
|
@ -189,6 +221,9 @@ mainbus_attach(parent, self, aux)
|
|||
#endif
|
||||
|
||||
#if NAPM > 0
|
||||
#if NACPI > 0
|
||||
if (acpi_active == 0)
|
||||
#endif
|
||||
if (apm_busprobe()) {
|
||||
mba.mba_aaa.aaa_busname = "apm";
|
||||
config_found(self, &mba.mba_aaa, mainbus_print);
|
||||
|
|
Loading…
Reference in New Issue