Don't use ACPI CA internal functions
This commit is contained in:
parent
fdc32973e7
commit
2b5897d796
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mpacpi.c,v 1.17 2003/11/13 23:00:54 fvdl Exp $ */
|
||||
/* $NetBSD: mpacpi.c,v 1.18 2004/03/23 14:07:42 kochi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.17 2003/11/13 23:00:54 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.18 2004/03/23 14:07:42 kochi Exp $");
|
||||
|
||||
#include "opt_acpi.h"
|
||||
#include "opt_mpbios.h"
|
||||
|
@ -67,9 +67,6 @@ __KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.17 2003/11/13 23:00:54 fvdl Exp $");
|
|||
|
||||
#include <dev/acpi/acpivar.h>
|
||||
#include <dev/acpi/acpi_madt.h>
|
||||
/* XXX */
|
||||
#include <dev/acpi/acpica/Subsystem/actables.h>
|
||||
#include <dev/acpi/acpica/Subsystem/acnamesp.h>
|
||||
|
||||
#include "pci.h"
|
||||
|
||||
|
@ -384,9 +381,8 @@ static ACPI_STATUS
|
|||
mpacpi_pcibus_cb(ACPI_HANDLE handle, UINT32 level, void *ct, void **status)
|
||||
{
|
||||
ACPI_STATUS ret;
|
||||
ACPI_NAMESPACE_NODE *node;
|
||||
ACPI_BUFFER buf;
|
||||
ACPI_INTEGER val;
|
||||
int val;
|
||||
struct mpacpi_pcibus *mpr;
|
||||
|
||||
ret = acpi_get(handle, &buf, AcpiGetIrqRoutingTable);
|
||||
|
@ -397,10 +393,8 @@ mpacpi_pcibus_cb(ACPI_HANDLE handle, UINT32 level, void *ct, void **status)
|
|||
mpr = malloc(sizeof (struct mpacpi_pcibus), M_TEMP, M_WAITOK|M_ZERO);
|
||||
if (mpr == NULL)
|
||||
return AE_NO_MEMORY;
|
||||
node = AcpiNsMapHandleToNode(handle);
|
||||
if (level == 1) {
|
||||
ret = AcpiUtEvaluateNumericObject(METHOD_NAME__BBN,
|
||||
node, &val);
|
||||
ret = acpi_eval_integer(handle, METHOD_NAME__BBN, &val);
|
||||
if (ACPI_FAILURE(ret)) {
|
||||
mpr->mpr_bus = mpacpi_npciroots;
|
||||
if (mp_verbose)
|
||||
|
@ -433,7 +427,7 @@ static ACPI_STATUS
|
|||
mpacpi_pcihier_cb(ACPI_HANDLE handle, UINT32 level, void *ct, void **status)
|
||||
{
|
||||
ACPI_STATUS ret;
|
||||
ACPI_INTEGER val;
|
||||
int val;
|
||||
pcireg_t binf, class;
|
||||
pcitag_t tag;
|
||||
struct acpi_softc *acpi;
|
||||
|
@ -444,7 +438,7 @@ mpacpi_pcihier_cb(ACPI_HANDLE handle, UINT32 level, void *ct, void **status)
|
|||
mparent = mpw->mpw_mpr;
|
||||
acpi = mpw->mpw_acpi;
|
||||
|
||||
ret = AcpiUtEvaluateNumericObject(METHOD_NAME__ADR, handle, &val);
|
||||
ret = acpi_eval_integer(handle, METHOD_NAME__ADR, &val);
|
||||
if (ACPI_FAILURE(ret))
|
||||
return AE_OK;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpi.c,v 1.57 2003/11/03 18:51:31 mycroft Exp $ */
|
||||
/* $NetBSD: acpi.c,v 1.58 2004/03/23 14:08:17 kochi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -77,7 +77,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.57 2003/11/03 18:51:31 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.58 2004/03/23 14:08:17 kochi Exp $");
|
||||
|
||||
#include "opt_acpi.h"
|
||||
|
||||
|
@ -97,7 +97,6 @@ __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.57 2003/11/03 18:51:31 mycroft Exp $");
|
|||
#endif
|
||||
|
||||
#ifdef ACPI_PCI_FIXUP
|
||||
#include <dev/acpi/acpica/Subsystem/acnamesp.h> /* AcpiNsGetNodeByPath() */
|
||||
#include <dev/pci/pcidevs.h>
|
||||
#endif
|
||||
|
||||
|
@ -1011,21 +1010,6 @@ acpi_pci_fixup(struct acpi_softc *sc)
|
|||
acpi_pci_fixup_bus, sc, NULL);
|
||||
}
|
||||
|
||||
static ACPI_HANDLE
|
||||
acpi_get_node(char *name)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *ObjDesc;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
Status = AcpiNsGetNodeByPath(name, NULL, 0, &ObjDesc);
|
||||
if (ACPI_FAILURE (Status)) {
|
||||
printf("acpi_get_node: could not find: %s\n",
|
||||
AcpiFormatException (Status));
|
||||
return NULL;
|
||||
}
|
||||
return ObjDesc;
|
||||
}
|
||||
|
||||
static uint
|
||||
acpi_get_intr(ACPI_HANDLE handle)
|
||||
{
|
||||
|
@ -1119,7 +1103,6 @@ acpi_pci_fixup_bus(ACPI_HANDLE handle, UINT32 level, void *context,
|
|||
ACPI_PCI_ROUTING_TABLE *PrtElement;
|
||||
ACPI_HANDLE link;
|
||||
uint line;
|
||||
ACPI_NAMESPACE_NODE *node;
|
||||
ACPI_INTEGER val;
|
||||
|
||||
rv = acpi_get(handle, &buf, AcpiGetIrqRoutingTable);
|
||||
|
@ -1134,8 +1117,7 @@ acpi_pci_fixup_bus(ACPI_HANDLE handle, UINT32 level, void *context,
|
|||
* case should be ok, so we'll ignore that.
|
||||
*/
|
||||
if (level == 1) {
|
||||
node = AcpiNsMapHandleToNode(handle);
|
||||
rv = AcpiUtEvaluateNumericObject(METHOD_NAME__BBN, node, &val);
|
||||
rv = acpi_eval_integer(handle, METHOD_NAME__BBN, &val);
|
||||
if (!ACPI_FAILURE(rv)) {
|
||||
#ifdef ACPI_DEBUG
|
||||
printf("%s: fixup: _BBN success, bus # was %d now %d\n",
|
||||
|
@ -1159,8 +1141,8 @@ acpi_pci_fixup_bus(ACPI_HANDLE handle, UINT32 level, void *context,
|
|||
if (PrtElement->Source[0] == 0)
|
||||
continue;
|
||||
|
||||
link = acpi_get_node(PrtElement->Source);
|
||||
if (link == NULL)
|
||||
rv = AcpiGetHandle(NULL, PrtElement->Source, &link);
|
||||
if (ACPI_FAILURE(rv))
|
||||
continue;
|
||||
line = acpi_get_intr(link);
|
||||
if (line == -1) {
|
||||
|
|
Loading…
Reference in New Issue