Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2016 13:45:36 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r294422 - head/sys/arm/arm
Message-ID:  <201601201345.u0KDjaRB065060@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601201345.u0KDjaRB065060>