summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpiprt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
-rw-r--r--sys/dev/acpi/acpiprt.c56
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);
}