From: viresh.kumar@st.com (Viresh KUMAR)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ST SPEAr: Adding support for shared irq layer
Date: Mon, 19 Apr 2010 16:42:07 +0530 [thread overview]
Message-ID: <4BCC3A87.2010505@st.com> (raw)
In-Reply-To: <20100419110243.GC6684@trinity.fluff.org>
On 4/19/2010 4:32 PM, Ben Dooks wrote:
>> > diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
>> > index 66e7fcd..3560f8c 100644
>> > --- a/arch/arm/mach-spear3xx/spear300.c
>> > +++ b/arch/arm/mach-spear3xx/spear300.c
>> > @@ -17,6 +17,7 @@
>> > #include <asm/irq.h>
>> > #include <mach/generic.h>
>> > #include <mach/spear.h>
>> > +#include <plat/shirq.h>
>> >
>> > /* pad multiplexing support */
>> > /* muxing registers */
>> > @@ -386,14 +387,78 @@ struct amba_device gpio1_device = {
>> > .end = SPEAR300_GPIO_BASE + SPEAR300_GPIO_SIZE - 1,
>> > .flags = IORESOURCE_MEM,
>> > },
>> > - .irq = {IRQ_GEN_RAS_1, NO_IRQ},
>> > + .irq = {VIRQ_GPIO1, NO_IRQ},
>> > +};
>> > +
>> > +/* spear3xx shared irq */
>> > +struct shirq_dev_config shirq_ras1_config[] = {
>> > + {
>> > + .virq = VIRQ_IT_PERS_S,
>> > + .enb_mask = IT_PERS_S_IRQ_MASK,
>> > + .status_mask = IT_PERS_S_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_IT_CHANGE_S,
>> > + .enb_mask = IT_CHANGE_S_IRQ_MASK,
>> > + .status_mask = IT_CHANGE_S_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_I2S,
>> > + .enb_mask = I2S_IRQ_MASK,
>> > + .status_mask = I2S_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_TDM,
>> > + .enb_mask = TDM_IRQ_MASK,
>> > + .status_mask = TDM_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_CAMERA_L,
>> > + .enb_mask = CAMERA_L_IRQ_MASK,
>> > + .status_mask = CAMERA_L_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_CAMERA_F,
>> > + .enb_mask = CAMERA_F_IRQ_MASK,
>> > + .status_mask = CAMERA_F_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_CAMERA_V,
>> > + .enb_mask = CAMERA_V_IRQ_MASK,
>> > + .status_mask = CAMERA_V_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_KEYBOARD,
>> > + .enb_mask = KEYBOARD_IRQ_MASK,
>> > + .status_mask = KEYBOARD_IRQ_MASK,
>> > + }, {
>> > + .virq = VIRQ_GPIO1,
>> > + .enb_mask = GPIO1_IRQ_MASK,
>> > + .status_mask = GPIO1_IRQ_MASK,
>> > + },
>> > +};
> Hmm, this seems to be an awful lot of data required. Why not just ensure
> that the each interrupt chip has a 1:1 mapping of bit to interrupt number?
>
I wanted to, but due to hardware design i was unable to do it the way you
suggested. In SPEAr all virqs have status register bits but may not have
enable/disable or clear bits. And they can be in arbitrary order too.
Due to this design, i was forced to have this much of data.
prev parent reply other threads:[~2010-04-19 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 9:06 [PATCH] ST SPEAr: Adding support for shared irq layer Viresh KUMAR
2010-04-19 11:02 ` Ben Dooks
2010-04-19 11:12 ` Viresh KUMAR [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=4BCC3A87.2010505@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.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.