From: jordan Date: Wed, 4 Aug 2010 18:11:55 +0000 (+0000) Subject: Remove unused code, conditional in fixup node was never true X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=40107082c36274cf60ffd8657e060dcbbb5a21a8;p=openbsd Remove unused code, conditional in fixup node was never true ok deraadt --- diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index 345f222ffd4..dac3c74934f 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.176 2010/07/28 16:00:29 deraadt Exp $ */ +/* $OpenBSD: dsdt.c,v 1.177 2010/08/04 18:11:55 jordan Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave * @@ -1407,33 +1407,6 @@ aml_parseend(struct aml_scope *scope) * @@@: Opcode utility functions */ -u_int64_t -aml_getpciaddr(struct acpi_softc *sc, struct aml_node *root) -{ - int64_t tmpres; - u_int64_t pciaddr; - - /* PCI */ - pciaddr = 0; - if (!aml_evalinteger(acpi_softc, root, "_ADR", 0, NULL, &tmpres)) { - /* Device:Function are bits 16-31,32-47 */ - pciaddr += (tmpres << 16L); - dnprintf(20, "got _adr [%s]\n", aml_nodename(root)); - } else { - /* Mark invalid */ - pciaddr += (0xFFFF << 16L); - return pciaddr; - } - - if (!aml_evalinteger(acpi_softc, root, "_BBN", 0, NULL, &tmpres)) { - /* PCI bus is in bits 48-63 */ - pciaddr += (tmpres << 48L); - dnprintf(20, "got _bbn [%s]\n", aml_nodename(root)); - } - dnprintf(20, "got pciaddr: %s:%llx\n", aml_nodename(root), pciaddr); - return pciaddr; -} - /* * @@@: Opcode functions */ @@ -1685,16 +1658,6 @@ int aml_fixup_node(struct aml_node *node, void *arg) } else if (val->type == AML_OBJTYPE_PACKAGE) { for (i = 0; i < val->length; i++) aml_fixup_node(node, val->v_package[i]); - } else if (val->type == AML_OBJTYPE_OPREGION) { - if (val->v_opregion.iospace != GAS_PCI_CFG_SPACE) - return (0); - if (ACPI_PCI_FN(val->v_opregion.iobase) != 0xFFFF) - return (0); - val->v_opregion.iobase = - ACPI_PCI_REG(val->v_opregion.iobase) + - aml_getpciaddr(acpi_softc, node); - dnprintf(20, "late ioaddr : %s:%llx\n", - aml_nodename(node), val->v_opregion.iobase); } return (0); } diff --git a/sys/dev/acpi/dsdt.h b/sys/dev/acpi/dsdt.h index 72f916b9df8..0c58b1cccf8 100644 --- a/sys/dev/acpi/dsdt.h +++ b/sys/dev/acpi/dsdt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.h,v 1.54 2010/07/22 14:19:47 deraadt Exp $ */ +/* $OpenBSD: dsdt.h,v 1.55 2010/08/04 18:11:56 jordan Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * @@ -63,8 +63,6 @@ void aml_register_notify(struct aml_node *, const char *, int (*)(struct aml_node *, int, void *), void *, int); -u_int64_t aml_getpciaddr(struct acpi_softc *, struct aml_node *); - int aml_evalnode(struct acpi_softc *, struct aml_node *, int , struct aml_value *, struct aml_value *); int aml_evalname(struct acpi_softc *, struct aml_node *,