Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2016 07:39:56 +0000 (UTC)
From:      Michal Meloun <mmel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300951 - head/sys/arm/arm
Message-ID:  <201605290739.u4T7du6d031673@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmel
Date: Sun May 29 07:39:56 2016
New Revision: 300951
URL: https://svnweb.freebsd.org/changeset/base/300951

Log:
  ARM GIC: Allow to setup interrupt without configuration data.
  In some cases, like for PCI devices, only interrupt numbers are enumerated
  from HW. In this case, use INTR_foo_CONFORM as level and trigger values.

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

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c	Sun May 29 07:29:35 2016	(r300950)
+++ head/sys/arm/arm/gic.c	Sun May 29 07:39:56 2016	(r300951)
@@ -1128,8 +1128,11 @@ arm_gic_setup_intr(device_t dev, struct 
 
 		if (gi->gi_irq != irq)
 			return (EINVAL);
-	} else
-		return (ENOTSUP);
+	} else {
+		irq = gi->gi_irq;
+		pol = INTR_POLARITY_CONFORM;
+		trig = INTR_TRIGGER_CONFORM;
+	}
 
 	/* Compare config if this is not first setup. */
 	if (isrc->isrc_handlers != 0) {



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