From: archit taneja <archit@ti.com>
To: "Balbi, Felipe" <balbi@ti.com>
Cc: "Valkeinen, Tomi" <tomi.valkeinen@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: OMAP: DSS2: Common IRQ handler for all OMAPs
Date: Tue, 15 Feb 2011 13:50:49 +0530 [thread overview]
Message-ID: <4D5A3761.2090103@ti.com> (raw)
In-Reply-To: <20110215080555.GB2570@legolas.emea.dhcp.ti.com>
Hi,
On Tuesday 15 February 2011 01:35 PM, Balbi, Felipe wrote:
> Hi,
>
> On Tue, Feb 15, 2011 at 09:58:24AM +0530, archit taneja wrote:
>>> does it make sense to install an irq_chip for that ? I mean, can you
>>> mask/unmask dss and or dsi IRQs ? If you can, then it might make sense
>>> to take a look into GENIRQ and install an irq_chip for that. Then both
>>> dsi and dss would be able to use standard request_irq() API.
>>>
>>
>> We could disable dsi IRQs by masking all the possible interrupt
>> events in DSI_IRQSTATUS. The same goes for dispc. Is this what you
>> meant by masking/unmasking irqs?
>
> yes it is. Then it makes sense to have an irq_chip for those two irqs, I
> think.
>
> /proc/interrupt will reflect how the hardware works (DSI and DISPC IRQs
> being handled by DSS), both dsi and dispc can use normal request_irq()
> without setting IRQF_SHARED, etc etc. All you need to do is:
>
> static struct irq_chip dss_irq_chip = {
> .name = "DSS",
> .irq_bus_lock = dss_bus_lock,
> .irq_bus_sync_unlock = dss_bus_sync_unlock,
> .irq_mask = dss_irq_mask,
> .irq_unmask = dss_irq_unmask,
> .irq_ack = dss_irq_ack,
> };
>
> then, somewhere during probe() you have to:
>
> for (irq = irq_base; irq< irq_end; irq++) {
> #ifdef CONFIG_ARM
> set_irq_flags(irq, IRQF_VALID)
> #else
> set_irq_noprobe(irq);
> #endif
>
> set_irq_data(irq, dss_device_structure_pointer);
> set_irq_chip_and_handler(irq,&dss_irq_chip,
> handle_simple_irq);
> }
>
> and on exit() you just need to cleanup:
>
> for (irq = irq_base; irq< irq_end; irq++) {
> #ifdef CONFIG_ARM
> set_irq_flags(irq, 0)
> #endif
>
> set_irq_chip_and_handler(irq, NULL, NULL);
> set_irq_data(irq, NULL);
> }
>
Thanks for the info, but this seems to be suitable for the case
when there are multiple irq events coming from the same interrupt line.
On OMAP4 we have 4 different IRQ lines going to ARM, i.e 4 lines defined
in irqs-44xx.h.
We are looking for a common irq handler located somewhere centrally, and
each module can hook their irq line to this handler.
Does irq_chip do this? what does irq_base and irq_end signify?
Regards,
Archit
next prev parent reply other threads:[~2011-02-15 8:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 8:56 [PATCH] OMAP: DSS2: Common IRQ handler for all OMAPs Archit Taneja
2011-02-14 14:21 ` Tomi Valkeinen
2011-02-14 14:30 ` Felipe Balbi
2011-02-15 4:28 ` archit taneja
2011-02-15 7:27 ` Tomi Valkeinen
2011-02-15 8:30 ` archit taneja
2011-02-15 8:37 ` Tomi Valkeinen
2011-02-15 8:47 ` archit taneja
2011-02-15 9:25 ` archit taneja
2011-02-15 10:23 ` Cousson, Benoit
2011-02-15 10:28 ` Semwal, Sumit
2011-02-15 10:50 ` Cousson, Benoit
2011-02-15 12:43 ` archit taneja
2011-02-15 12:56 ` Cousson, Benoit
2011-02-15 10:57 ` Felipe Balbi
2011-02-15 11:25 ` Tomi Valkeinen
2011-02-15 11:42 ` Felipe Balbi
2011-02-15 8:05 ` Felipe Balbi
2011-02-15 8:20 ` archit taneja [this message]
2011-02-15 8:23 ` Felipe Balbi
2011-02-15 7:45 ` Tomi Valkeinen
2011-02-15 8:03 ` archit taneja
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=4D5A3761.2090103@ti.com \
--to=archit@ti.com \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox