From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Taneja, Archit" <archit@ti.com>
Cc: "Balbi, Felipe" <balbi@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 09:27:06 +0200 [thread overview]
Message-ID: <1297754826.2289.9.camel@deskari> (raw)
In-Reply-To: <4D5A00E8.4060701@ti.com>
On Mon, 2011-02-14 at 22:28 -0600, Taneja, Archit wrote:
> Hi,
>
> On Monday 14 February 2011 08:00 PM, Balbi, Felipe wrote:
> > Hi,
> >
> > On Mon, Feb 14, 2011 at 04:21:47PM +0200, Tomi Valkeinen wrote:
> >> On Wed, 2011-02-02 at 08:56 +0000, archit taneja wrote:
> >>> OMAP2 has an irq line dedicated for DISPC interrupts, there is no DSI
> >>> on omap2.
> >>> OMAP3 has a common irq line for DISPC and DSI interrupts.
> >>> OMAP4 has seperate irq lines for DISPC and DSI Interrupts.
> >>>
> >>> Use dss_features to have a common DSS irq handler for all OMAP revisions.
> >>>
> >>> Also, use a member of the global dss structure to store the irq number
> >>> as it is used in 2 functions.
> >>
> >> It's good to remove the cpu_is_xxxx() calls, but I'm not quite sure
> >> about this patch...
> >>
> >> Could we use shared interrupt handlers here, so that dss.c would handle
> >> only DISPC interrupts (or should it be even in dispc.c?) and dsi.c would
> >> handle DSI interrupts?
>
> Could you elaborate this a bit more?
I meant something like this:
dispc.c:
dispc_init()
{
/* did we have a pdev for dispc? if not, this needs to be dss.pdev */
request_irq(platform_get_irq(dispc.pdev, 0), irq_handler, IRQF_SHARED, "dispc irq", foo);
}
irq_handler()
{
if (irq_can_be_shared) {
check if the irq is for us. exit if not;
}
handle;
}
dsi.c:
dsi_init()
{
request_irq(platform_get_irq(dsi.pdev, 0), irq_handler, IRQF_SHARED, "dsi irq", foo);
}
irq_handler()
{
if (irq_can_be_shared) {
check if the irq is for us. exit if not;
}
handle;
}
>
> >>
> >> On OMAP3 both dss.c and dsi.c would register to the same interrupt, and
> >> they would need to check if the interrupt was really for them. On OMAP4
> >> the code could be the same, even though the check is unnecessary.
>
> The code can't be exactly the same. The DSS_IRQSTATUS register used on
> OMAP3 doesn't exist on OMAP4. A read to this register on OMAP4 would
> cause a hang/crash.
Ok, we need a dss_feature bit for this then.
Tomi
next prev parent reply other threads:[~2011-02-15 7:27 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 [this message]
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
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=1297754826.2289.9.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=archit@ti.com \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox