From: "Cousson, Benoit" <b-cousson@ti.com>
To: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
linux-omap <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [RFC PATCH] gpio/omap: Fix IRQ handling for SPARSE_IRQ
Date: Fri, 24 Feb 2012 14:56:05 +0100 [thread overview]
Message-ID: <4F4796F5.7050404@ti.com> (raw)
In-Reply-To: <CAC83ZvJS8BoOD0GUE5UkgGz15e+wsgVv2CbRB5nnpBFZurJ18w@mail.gmail.com>
On 2/24/2012 2:53 PM, DebBarma, Tarun Kanti wrote:
> On Fri, Feb 24, 2012 at 7:02 PM, Cousson, Benoit<b-cousson@ti.com> wrote:
>> On 2/24/2012 2:24 PM, DebBarma, Tarun Kanti wrote:
>>>
>>> Hi Benoit,
>>>
>>> On Fri, Feb 24, 2012 at 4:07 PM, DebBarma, Tarun Kanti
>>> <tarun.kanti@ti.com> wrote:
>>>>
>>>> On Fri, Feb 24, 2012 at 3:41 PM, Cousson, Benoit<b-cousson@ti.com>
>>>> wrote:
>>>>>
>>>>> + Tarun
>>>>>
>>>>>
>>>>> On 2/24/2012 12:08 AM, Tony Lindgren wrote:
>>>>>>
>>>>>>
>>>>>> * Cousson, Benoit<b-cousson@ti.com> [120223 14:14]:
>>>>>>>
>>>>>>>
>>>>>>> The GPIO driver is still relying on internal OMAP IRQ defines that
>>>>>>> are not relevant anymore if OMAP is built with SPARSE_IRQ.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Great :)
>>>>>>
>>>>>>> Please note that this patch is still RFC, because I do not know
>>>>>>> how to fix properly the ugly cpu_class_is_omap1 and the dependency
>>>>>>> with IH_MPUIO_BASE to detect a MPUIO.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sounds like gpio_to_irq() needs to be set in the
>>>>>> arch/arm/*omap*/gpio*.c then.
>>>>>
>>>>>
>>>>>
>>>>> In fact, after a second thought, that might even work for OMAP1 because
>>>>> I'm
>>>>> using the proper base (IRQ and GPIO) to convert the IRQ number.
>>>>>
>>>>>
>>>>> static int irq_to_gpio(struct gpio_bank *bank, unsigned int gpio_irq)
>>>>> {
>>>>>
>>>>> return gpio_irq - bank->irq_base + bank->chip.base;
>>>>> }
>>>>>
>>>>> But it might be good to test it on OMAP1 platform.
>>>>>
>>>>>
>>>>> Tarun,
>>>>>
>>>>> Do you have an OMAP1 board to test that.
>>>>
>>>> Yes, I will test on OMAP1 board.
>>>
>>> I have booted the image on OMAP1 with following change.
>>> I guess bank->irq_base was a typo?
>>
>>
>> Not at all :-), it was done on purpose to get rid if the static IRQ
>> definition.
> BTW, it was giving me following compilation error...
> drivers/gpio/gpio-omap.c: In function 'irq_to_gpio':
> drivers/gpio/gpio-omap.c:90: error: 'struct gpio_bank' has no member
> named 'irq_base'
> make[2]: *** [drivers/gpio/gpio-omap.o] Error 1
Oh, that's different... you are missing the cleanup patches from the DT
series I did before this one:
eaabbb0 gpio/omap: Fix IRQ handling for SPARSE_IRQ
fa560a7 arm/dts: OMAP3: Add gpio nodes
bfeb298 arm/dts: OMAP4: Add gpio nodes
3062158 gpio/omap: Add DT support to GPIO driver
a140d12 gpio/omap: Use devm_ API and add request_mem_region
0416689 gpio/omap: Remove bank->id information and misc cleanup
249f60c Merge branch 'for_3.4/gpio_cleanup_fixes_v9' of
git://gitorious.org/~tarunkanti/omap-sw-deve
I'll push a temp branch for you.
Benoit
WARNING: multiple messages have this Message-ID (diff)
From: b-cousson@ti.com (Cousson, Benoit)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] gpio/omap: Fix IRQ handling for SPARSE_IRQ
Date: Fri, 24 Feb 2012 14:56:05 +0100 [thread overview]
Message-ID: <4F4796F5.7050404@ti.com> (raw)
In-Reply-To: <CAC83ZvJS8BoOD0GUE5UkgGz15e+wsgVv2CbRB5nnpBFZurJ18w@mail.gmail.com>
On 2/24/2012 2:53 PM, DebBarma, Tarun Kanti wrote:
> On Fri, Feb 24, 2012 at 7:02 PM, Cousson, Benoit<b-cousson@ti.com> wrote:
>> On 2/24/2012 2:24 PM, DebBarma, Tarun Kanti wrote:
>>>
>>> Hi Benoit,
>>>
>>> On Fri, Feb 24, 2012 at 4:07 PM, DebBarma, Tarun Kanti
>>> <tarun.kanti@ti.com> wrote:
>>>>
>>>> On Fri, Feb 24, 2012 at 3:41 PM, Cousson, Benoit<b-cousson@ti.com>
>>>> wrote:
>>>>>
>>>>> + Tarun
>>>>>
>>>>>
>>>>> On 2/24/2012 12:08 AM, Tony Lindgren wrote:
>>>>>>
>>>>>>
>>>>>> * Cousson, Benoit<b-cousson@ti.com> [120223 14:14]:
>>>>>>>
>>>>>>>
>>>>>>> The GPIO driver is still relying on internal OMAP IRQ defines that
>>>>>>> are not relevant anymore if OMAP is built with SPARSE_IRQ.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Great :)
>>>>>>
>>>>>>> Please note that this patch is still RFC, because I do not know
>>>>>>> how to fix properly the ugly cpu_class_is_omap1 and the dependency
>>>>>>> with IH_MPUIO_BASE to detect a MPUIO.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sounds like gpio_to_irq() needs to be set in the
>>>>>> arch/arm/*omap*/gpio*.c then.
>>>>>
>>>>>
>>>>>
>>>>> In fact, after a second thought, that might even work for OMAP1 because
>>>>> I'm
>>>>> using the proper base (IRQ and GPIO) to convert the IRQ number.
>>>>>
>>>>>
>>>>> static int irq_to_gpio(struct gpio_bank *bank, unsigned int gpio_irq)
>>>>> {
>>>>>
>>>>> return gpio_irq - bank->irq_base + bank->chip.base;
>>>>> }
>>>>>
>>>>> But it might be good to test it on OMAP1 platform.
>>>>>
>>>>>
>>>>> Tarun,
>>>>>
>>>>> Do you have an OMAP1 board to test that.
>>>>
>>>> Yes, I will test on OMAP1 board.
>>>
>>> I have booted the image on OMAP1 with following change.
>>> I guess bank->irq_base was a typo?
>>
>>
>> Not at all :-), it was done on purpose to get rid if the static IRQ
>> definition.
> BTW, it was giving me following compilation error...
> drivers/gpio/gpio-omap.c: In function 'irq_to_gpio':
> drivers/gpio/gpio-omap.c:90: error: 'struct gpio_bank' has no member
> named 'irq_base'
> make[2]: *** [drivers/gpio/gpio-omap.o] Error 1
Oh, that's different... you are missing the cleanup patches from the DT
series I did before this one:
eaabbb0 gpio/omap: Fix IRQ handling for SPARSE_IRQ
fa560a7 arm/dts: OMAP3: Add gpio nodes
bfeb298 arm/dts: OMAP4: Add gpio nodes
3062158 gpio/omap: Add DT support to GPIO driver
a140d12 gpio/omap: Use devm_ API and add request_mem_region
0416689 gpio/omap: Remove bank->id information and misc cleanup
249f60c Merge branch 'for_3.4/gpio_cleanup_fixes_v9' of
git://gitorious.org/~tarunkanti/omap-sw-deve
I'll push a temp branch for you.
Benoit
next prev parent reply other threads:[~2012-02-24 13:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 22:46 [RFC PATCH] gpio/omap: Fix IRQ handling for SPARSE_IRQ Cousson, Benoit
2012-02-23 22:46 ` Cousson, Benoit
2012-02-23 23:08 ` Tony Lindgren
2012-02-23 23:08 ` Tony Lindgren
2012-02-24 10:11 ` Cousson, Benoit
2012-02-24 10:11 ` Cousson, Benoit
2012-02-24 10:37 ` DebBarma, Tarun Kanti
2012-02-24 10:37 ` DebBarma, Tarun Kanti
2012-02-24 13:24 ` DebBarma, Tarun Kanti
2012-02-24 13:24 ` DebBarma, Tarun Kanti
2012-02-24 13:32 ` Cousson, Benoit
2012-02-24 13:32 ` Cousson, Benoit
2012-02-24 13:53 ` DebBarma, Tarun Kanti
2012-02-24 13:53 ` DebBarma, Tarun Kanti
2012-02-24 13:56 ` Cousson, Benoit [this message]
2012-02-24 13:56 ` Cousson, Benoit
2012-02-24 15:09 ` DebBarma, Tarun Kanti
2012-02-24 15:09 ` DebBarma, Tarun Kanti
2012-02-24 15:12 ` Cousson, Benoit
2012-02-24 15:12 ` Cousson, Benoit
2012-02-24 14:14 ` Rob Herring
2012-02-24 14:14 ` Rob Herring
2012-02-24 14:54 ` Cousson, Benoit
2012-02-24 14:54 ` Cousson, Benoit
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=4F4796F5.7050404@ti.com \
--to=b-cousson@ti.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tarun.kanti@ti.com \
--cc=tony@atomide.com \
/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.