1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

Fix GIC FDT interrupts decoding

Interrupt type in FDT was interpreted incorrectly.
Patch taken from freebsd-arm thread 'GIC - interrupts interpretation in
DTS/FDT':
https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012145.html

Reviewed by:    ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4215
This commit is contained in:
Zbigniew Bodek 2016-01-20 13:45:35 +00:00
parent 81c8a263d6
commit 90c1c677af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294422

View File

@ -336,9 +336,11 @@ gic_decode_fdt(phandle_t iparent, pcell_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 >= GIC_FIRST_SPI &&
fdt32_to_cpu(intr[2]) & 0x0a) {
printf("unsupported trigger/polarity configuration "
"0x%02x\n", fdt32_to_cpu(intr[2]) & 0x0f);
}