Make sure we record the type of irq as well as its number.

This commit is contained in:
matt 2002-12-28 08:44:43 +00:00
parent d76a1d687e
commit da1df3d58f
2 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_resource.c,v 1.4 2002/06/15 18:03:42 thorpej Exp $ */
/* $NetBSD: acpi_resource.c,v 1.5 2002/12/28 08:44:43 matt Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.4 2002/06/15 18:03:42 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.5 2002/12/28 08:44:43 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -230,7 +230,8 @@ acpi_resource_parse(struct device *dev, struct acpi_devnode *ad,
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"IRQ %d\n", res->Data.Irq.Interrupts[i]));
(*ops->irq)(dev, context,
res->Data.Irq.Interrupts[i]);
res->Data.Irq.Interrupts[i],
res->Data.Irq.EdgeLevel);
}
break;
@ -455,7 +456,7 @@ static void acpi_res_parse_memory(struct device *, void *, uint32_t,
static void acpi_res_parse_memrange(struct device *, void *, uint32_t,
uint32_t, uint32_t, uint32_t);
static void acpi_res_parse_irq(struct device *, void *, uint32_t);
static void acpi_res_parse_irq(struct device *, void *, uint32_t, uint32_t);
static void acpi_res_parse_drq(struct device *, void *, uint32_t);
static void acpi_res_parse_start_dep(struct device *, void *, int);
@ -606,7 +607,7 @@ acpi_res_parse_memrange(struct device *dev, void *context, uint32_t low,
}
static void
acpi_res_parse_irq(struct device *dev, void *context, uint32_t irq)
acpi_res_parse_irq(struct device *dev, void *context, uint32_t irq, uint32_t type)
{
struct acpi_resources *res = context;
struct acpi_irq *ar;
@ -621,6 +622,7 @@ acpi_res_parse_irq(struct device *dev, void *context, uint32_t irq)
ar->ar_index = res->ar_nirq++;
ar->ar_irq = irq;
ar->ar_type = type;
SIMPLEQ_INSERT_TAIL(&res->ar_irq, ar, ar_list);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpivar.h,v 1.7 2002/12/28 06:14:07 jmcneill Exp $ */
/* $NetBSD: acpivar.h,v 1.8 2002/12/28 08:44:43 matt Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -189,6 +189,7 @@ struct acpi_irq {
SIMPLEQ_ENTRY(acpi_irq) ar_list;
int ar_index;
uint32_t ar_irq;
uint32_t ar_type;
};
struct acpi_drq {
@ -235,7 +236,7 @@ struct acpi_resource_parse_ops {
void (*memrange)(struct device *, void *, uint32_t, uint32_t,
uint32_t, uint32_t);
void (*irq)(struct device *, void *, uint32_t);
void (*irq)(struct device *, void *, uint32_t, uint32_t);
void (*drq)(struct device *, void *, uint32_t);
void (*start_dep)(struct device *, void *, int);