From: "Terry Fryar" References: <4F19B046.6090504@domain.hid> <4F19B324.8080001@domain.hid> In-Reply-To: <4F19B324.8080001@domain.hid> Date: Fri, 20 Jan 2012 13:37:21 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] rtdm difficulties List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Gilles Chanteperdrix' Cc: xenomai@xenomai.org Ok, I'll try the patch. A question though...on the beagle, there is a OMAP register GPIO_IRQSTATUSx that I am not manually clearing out. This is the only place to ack an irq I know of...I assumed that was being handled by the kernel? Or is this what the patch is adding?? I'm very new to writing irq handlers, as you can tell! Honestly, all that's in my current handler is this: int irqdrv_rtdm_isr(rtdm_irq_t* handle) { return(RTDM_IRQ_HANDLED); } And here's the register func: if ((err = rtdm_irq_request(&irqdrv_isr_handle, irqno, irqdrv_rtdm_isr, RTDM_IRQTYPE_EDGE, IRQDRV_NAME, NULL)) == 0) rtdm_irq_enable(&irqdrv_isr_handle); And I'm running against a square waveform and getting this: [ 56.522948] WARNING: at kernel/softirq.c:137 __local_bh_enable+0x44/0xac() [ 56.530153] Modules linked in: vme_pd_drv [ 56.534399] [] (unwind_backtrace+0x0/0xe0) from [] (warn_slowpath_common+0x4c/0x64) [ 56.574419] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c) [ 56.584568] [] (warn_slowpath_null+0x18/0x1c) from [] (__local_bh_enable+0x44/0xac) [ 56.594425] [] (__local_bh_enable+0x44/0xac) from [] (irq_enter+0x44/0x60) [ 56.623476] [] (irq_enter+0x44/0x60) from [] (asm_do_IRQ+0x18/0x98) [ 56.631880] [] (asm_do_IRQ+0x18/0x98) from [] (__ipipe_sync_stage+0x154/0x188) -----Original Message----- From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org] Sent: Friday, January 20, 2012 12:32 PM To: Terry Fryar Cc: xenomai@xenomai.org Subject: Re: [Xenomai-help] rtdm difficulties On 01/20/2012 07:24 PM, Terry Fryar wrote: > Yeh, omap and gpio.....edge irq from a square wave pulse.... Try this patch: diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 30cb7d4..114ccf0 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -1272,7 +1272,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) u32 retrigger = 0; int unmasked = 0; - desc->irq_data.chip->irq_ack(&desc->irq_data); + desc->irq_data.chip->irq_mask_ack(&desc->irq_data); bank = get_irq_data(irq); #ifdef CONFIG_ARCH_OMAP1 -- Gilles.