Use the new fdt_intr.h constants in the Allwinner NMI driver.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Andrew Turner 2016-10-26 16:03:26 +00:00
parent 5bdda834d5
commit f1ae17fb50
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307968

View File

@ -40,12 +40,11 @@ __FBSDID("$FreeBSD$");
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
#include <dev/fdt/fdt_intr.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "pic_if.h"
#define NMI_IRQ_CTRL_REG 0x0
@ -155,19 +154,19 @@ aw_nmi_map_fdt(device_t dev, u_int ncells, pcell_t *cells, u_int *irqp,
tripol = cells[1];
switch (tripol) {
case IRQ_TYPE_EDGE_RISING:
case FDT_INTR_EDGE_RISING:
trig = INTR_TRIGGER_EDGE;
pol = INTR_POLARITY_HIGH;
break;
case IRQ_TYPE_EDGE_FALLING:
case FDT_INTR_EDGE_FALLING:
trig = INTR_TRIGGER_EDGE;
pol = INTR_POLARITY_LOW;
break;
case IRQ_TYPE_LEVEL_HIGH:
case FDT_INTR_LEVEL_HIGH:
trig = INTR_TRIGGER_LEVEL;
pol = INTR_POLARITY_HIGH;
break;
case IRQ_TYPE_LEVEL_LOW:
case FDT_INTR_LEVEL_LOW:
trig = INTR_TRIGGER_LEVEL;
pol = INTR_POLARITY_LOW;
break;