From: Julien Grall Date: Sat, 28 Mar 2015 19:47:15 +0000 (+0000) Subject: arm/gic: Fix SPIs check X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=67d326be3c351db97754da13a168178c780c2012;p=people%2Fjulieng%2Ffreebsd.git arm/gic: Fix SPIs check --- diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 6baaf9cb8870..26d5a642af51 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -221,15 +221,16 @@ gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, * 2 = high-to-low edge triggered * 4 = active high level-sensitive * 8 = active low level-sensitive - * The hardware only supports active-high-level or rising-edge. + * The hardware only supports active-high-level or rising-edge + * for SPIs */ - if (fdt32_to_cpu(intr[2]) & 0x0a) { + if (*interrupt >= 32 && fdt32_to_cpu(intr[2]) & 0x0a) { printf("unsupported trigger/polarity configuration " "0x%2x\n", fdt32_to_cpu(intr[2]) & 0x0f); return (ENOTSUP); } *pol = INTR_POLARITY_CONFORM; - if (fdt32_to_cpu(intr[2]) & 0x01) + if (fdt32_to_cpu(intr[2]) & 0x03) *trig = INTR_TRIGGER_EDGE; else *trig = INTR_TRIGGER_LEVEL;