Fix GIC interrupt decoding in INTRNG code

Bug was already fixed in not-INTRNG code, it needs to be corrected
   here as well.  Source: https://reviews.freebsd.org/rS294422

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           cognet, wma
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5029
This commit is contained in:
Wojciech Macek 2016-03-14 06:30:37 +00:00
parent 523210fbaf
commit 64f7e6aeee

View File

@ -755,7 +755,7 @@ gic_map_fdt(struct arm_gic_softc *sc, struct intr_irqsrc *isrc, u_int *irqp)
* The hardware only supports active-high-level or rising-edge.
*/
tripol = isrc->isrc_cells[2];
if (tripol & 0x0a) {
if (tripol & 0x0a && irq >= GIC_FIRST_SPI) {
device_printf(sc->gic_dev,
"unsupported trigger/polarity configuration "
"0x%02x\n", tripol & 0x0f);