All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Henri Roosen <henriroosen@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] ARM gpio pins interrupts
Date: Thu, 20 Jan 2011 17:25:06 +0100	[thread overview]
Message-ID: <4D3861E2.5020807@domain.hid> (raw)
In-Reply-To: <AANLkTimJzJpjKy2dowqzwrivCb86pkbt+tNQ5-h4=7xr@domain.hid>

Henri Roosen wrote:
> On Thu, Jan 20, 2011 at 4:12 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> Henri Roosen wrote:
>>> Hi,
>>>
>>> I have an ARM based platform which is similar to the at91sam9263ek
>>> eval board. One of the differences is that touchscreen irq is on pin
>>> PB31 instead of PA15. The 'arch/arm/mach-at91/board-sam9263ek.c' has
>>> been changed for this.
>>>
>>> Touch works when using the kernel without Xenomai.
>>> When using the same kernel with Xenomai patches, touch doesn't work. I
>>> get only 2 interrupts on the GPIO pin (cat /proc/interrupts).
>>>
>>> Anyone an idea why the Xenomai enabled kernel stops generating
>>> interrupts on the GPIO pins while the non-Xenomai enabled kernel
>>> doesn't?
>> Xenomai does not change anything. However, the I-pipe patch changes the
>> way interrupts are handled. Now, we have to figure out exactly how this
>> is an issue.
>>
>> Is this GPIO a muxed GPIO?
> 
> Pin PB31 is a muxed GPIO IRQ.
> 
>> As a first test, could you try commenting out the
>> #define __IPIPE_FEATURE_PIC_MUTE
>> in arch/arm/mach-at91/include/mach/irqs.h ?
>>
> 
> Commenting out the define has no difference; still get 2 irq's.
> 
>> Have you tried commenting out the line you show us which disables
>> interrupts? Can you explain why this interrupt line is using
>> handle_simple_IRQ if it is not a muxed GPIO?
> 
> I tried not disabling the IRQ and not setting the irq_disabled flag in
> the isr, but that unfortunately always resulted in unbalanced enables
> for the IRQ and finally a lock up of the system. Have to dig into the
> driver code a little deeper if I want to balance it.
> Interesting is that I get more IRQ's than just 2. Even many more than
> I expect for one touch (>100) which tells me the comment in the
> driver's isr makes sense. And which also indicates this problem is
> likely related to disabling the irq here.
> 
> (BTW: tried ipipe 1.18-01 which shows the same problem)

If you comment out the disable_irq, you should comment out the
"enable_irq" counterpart. You can also try and replace handle_simple_irq
with handle_level_irq, to see if it changes anything. Though,
handle_simple_irq seems to be the rule for muxed gpios, but other
drivers probably do not try and disable them in their handlers.

-- 
                                                                Gilles.


      reply	other threads:[~2011-01-20 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 10:28 [Xenomai-help] ARM gpio pins interrupts Henri Roosen
2011-01-20 15:12 ` Gilles Chanteperdrix
2011-01-20 16:11   ` Henri Roosen
2011-01-20 16:25     ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D3861E2.5020807@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=henriroosen@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.