diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2008-05-16 06:50:56 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2008-05-16 06:50:56 +0000 |
commit | 1b882095f169e506c0d98c8ddbb86c6e2e8856af (patch) | |
tree | 4fd5ddca8f701a398926df6a1863a08e5606b9c9 /sys/dev/acpi/acpiprt.c | |
parent | 3093a6ff905bedc86e26f69bd1e69be1d02e5d46 (diff) |
back out jordans new parser.
it didnt have enough oks from the right people, it did break machines
that were previously working, and it bloated the RAMDISKS and install
media beyond the constraints of the media.
requested by deraadt@
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
-rw-r--r-- | sys/dev/acpi/acpiprt.c | 56 |
1 files changed, 3 insertions, 53 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c index e333bcf97f0..3051294b851 100644 --- a/sys/dev/acpi/acpiprt.c +++ b/sys/dev/acpi/acpiprt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiprt.c,v 1.23 2008/05/14 16:26:44 jordan Exp $ */ +/* $OpenBSD: acpiprt.c,v 1.24 2008/05/16 06:50:55 dlg Exp $ */ /* * Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org> * @@ -45,7 +45,6 @@ int acpiprt_match(struct device *, void *, void *); void acpiprt_attach(struct device *, struct device *, void *); int acpiprt_getirq(union acpi_resource *crs, void *arg); int acpiprt_getminbus(union acpi_resource *, void *); -int acpiprt_showprs(union acpi_resource *, void *); struct acpiprt_softc { @@ -120,35 +119,6 @@ acpiprt_attach(struct device *parent, struct device *self, void *aux) } int -acpiprt_showprs(union acpi_resource *crs, void *arg) -{ - int *irq = (int *)arg; - int typ; - - typ = AML_CRSTYPE(crs); - switch (typ) { - case SR_IRQ: - printf("possible irq:[ "); - for (typ = 0; typ < sizeof(crs->sr_irq.irq_mask) * 8; typ++) { - if (crs->sr_irq.irq_mask & (1L << typ)) - printf("%d%s ", typ, (typ == *irq) ? "*" : ""); - } - printf("]\n"); - break; - case LR_EXTIRQ: - printf("possible irq: [ "); - for (typ = 0; typ < crs->lr_extirq.irq_count; typ++) - printf("%d%s ", crs->lr_extirq.irq[typ], - crs->lr_extirq.irq[typ] == *irq ? "*" : ""); - printf("]\n"); - break; - default: - printf("Unknown interrupt : %x\n", typ); - } - return (0); -} - -int acpiprt_getirq(union acpi_resource *crs, void *arg) { int *irq = (int *)arg; @@ -196,16 +166,8 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v) } pp = v->v_package[2]; - if (pp->type == AML_OBJTYPE_STRING) { - node = aml_searchrel(sc->sc_devnode, pp->v_string); - if (node == NULL) { - printf("Invalid device\n"); - return; - } - pp = node->value; - } if (pp->type == AML_OBJTYPE_NAMEREF) { - node = aml_searchrel(sc->sc_devnode, pp->v_nameref); + node = aml_searchname(sc->sc_devnode, pp->v_nameref); if (node == NULL) { printf("Invalid device\n"); return; @@ -236,19 +198,6 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v) aml_parse_resource(res.length, res.v_buffer, acpiprt_getirq, &irq); aml_freevalue(&res); - -#if 0 - /* Get Possible IRQs */ - if (!aml_evalname(sc->sc_acpi, node, "_PRS.", 0, NULL, &res)){ - if (res.type == AML_OBJTYPE_BUFFER && - res.length >= 6) - { - aml_parse_resource(res.length, res.v_buffer, - acpiprt_showprs, &irq); - } - aml_freevalue(&res); - } -#endif } else { irq = aml_val2int(v->v_package[3]); } @@ -391,5 +340,6 @@ acpiprt_getpcibus(struct acpiprt_softc *sc, struct aml_node *node) return (PPB_BUSINFO_SECONDARY(reg)); } } + return (0); } |