All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] Add support for SUNXI boards
@ 2015-04-16  8:05 GP Orcullo
  2015-04-16 13:19 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: GP Orcullo @ 2015-04-16  8:05 UTC (permalink / raw)
  To: xenomai; +Cc: GP Orcullo

Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.

---
 arch/arm/mach-sunxi/Kconfig     |    1 +
 drivers/irqchip/irq-sunxi-nmi.c |    7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 0fbd4f1..96d76da8 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -6,6 +6,7 @@ menuconfig ARCH_SUNXI
 	select PINCTRL
 	select PINCTRL_SUNXI
 	select SUN4I_TIMER
+	select IPIPE_ARM_KUSER_TSC if IPIPE
 
 if ARCH_SUNXI
 
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 12f547a..d3e8da2 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -77,8 +77,9 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 	u32 ctrl_off = ct->regs.type;
 	unsigned int src_type;
 	unsigned int i;
+	unsigned long flags;
 
-	irq_gc_lock(gc);
+	flags = irq_gc_lock(gc);
 
 	switch (flow_type & IRQF_TRIGGER_MASK) {
 	case IRQ_TYPE_EDGE_FALLING:
@@ -95,7 +96,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 		src_type = SUNXI_SRC_TYPE_LEVEL_LOW;
 		break;
 	default:
-		irq_gc_unlock(gc);
+		irq_gc_unlock(gc, flags);
 		pr_err("%s: Cannot assign multiple trigger modes to IRQ %d.\n",
 			__func__, data->irq);
 		return -EBADR;
@@ -113,7 +114,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 	src_type_reg |= src_type;
 	sunxi_sc_nmi_write(gc, ctrl_off, src_type_reg);
 
-	irq_gc_unlock(gc);
+	irq_gc_unlock(gc, flags);
 
 	return IRQ_SET_MASK_OK;
 }
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-04-18 15:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16  8:05 [Xenomai] [PATCH] Add support for SUNXI boards GP Orcullo
2015-04-16 13:19 ` Gilles Chanteperdrix
2015-04-16 16:04   ` GP Orcullo
2015-04-16 16:16     ` Gilles Chanteperdrix
2015-04-16 16:37       ` Jan Kiszka
2015-04-16 16:43         ` Gilles Chanteperdrix
2015-04-16 16:53           ` Jan Kiszka
2015-04-16 16:56             ` Gilles Chanteperdrix
2015-04-18  6:56               ` Maxime Ripard
2015-04-18  9:34                 ` Jan Kiszka
2015-04-18 11:50                   ` Maxime Ripard
2015-04-16 22:29         ` GP Orcullo
2015-04-16 23:13           ` Gilles Chanteperdrix
2015-04-18  6:55     ` Maxime Ripard
2015-04-18  8:05       ` GP Orcullo
2015-04-18  8:16         ` Maxime Ripard
2015-04-18 14:45           ` GP Orcullo
2015-04-18 15:20             ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.