svn commit: r294422 - head/sys/arm/arm

Zbigniew Bodek zbb at FreeBSD.org
Wed Jan 20 13:45:37 UTC 2016


Author: zbb
Date: Wed Jan 20 13:45:35 2016
New Revision: 294422
URL: https://svnweb.freebsd.org/changeset/base/294422

Log:
  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 at semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4215

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c	Wed Jan 20 13:42:54 2016	(r294421)
+++ head/sys/arm/arm/gic.c	Wed Jan 20 13:45:35 2016	(r294422)
@@ -336,9 +336,11 @@ gic_decode_fdt(phandle_t iparent, pcell_
 		 *   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);
 		}


More information about the svn-src-head mailing list