* 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;