svn commit: r269818 - projects/arm64/sys/dev/fdt
Andrew Turner
andrew at FreeBSD.org
Mon Aug 11 16:57:42 UTC 2014
Author: andrew
Date: Mon Aug 11 16:57:42 2014
New Revision: 269818
URL: http://svnweb.freebsd.org/changeset/base/269818
Log:
Hack to get the correct value for the interrupt from the vendor supplied
device tree. The GIC used the format <type irq flags> where the type is
0 for Shared Peripheral Interrupts (SPI), and 1 for Private Peripheral
Interrupts. The SPIs start at 32 in the GIc so we need to adjust their
values to match this.
Modified:
projects/arm64/sys/dev/fdt/simplebus.c
Modified: projects/arm64/sys/dev/fdt/simplebus.c
==============================================================================
--- projects/arm64/sys/dev/fdt/simplebus.c Mon Aug 11 16:44:06 2014 (r269817)
+++ projects/arm64/sys/dev/fdt/simplebus.c Mon Aug 11 16:57:42 2014 (r269818)
@@ -310,10 +310,18 @@ simplebus_setup_dinfo(device_t dev, phan
icells = 1;
}
for (i = 0, k = 0; i < nintr; i += icells, k++) {
+ u_int irq;
+
+ if (icells == 3) {
+ irq = intr[i + 1];
+ if (intr[i] == 0)
+ irq += 32;
+ } else
+ irq = intr[i];
intr[i] = ofw_bus_map_intr(dev, iparent, icells,
&intr[i]);
- resource_list_add(&ndi->rl, SYS_RES_IRQ, k, intr[i],
- intr[i], 1);
+ resource_list_add(&ndi->rl, SYS_RES_IRQ, k, irq,
+ irq, 1);
}
free(intr, M_OFWPROP);
}
More information about the svn-src-projects
mailing list