From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] irq: choose irq_domain type for generic-chip based on irq_base
Date: Wed, 15 Feb 2012 14:20:22 -0700 [thread overview]
Message-ID: <20120215212022.GK25779@ponder.secretlab.ca> (raw)
In-Reply-To: <4F3982F2.2030301@gmail.com>
On Mon, Feb 13, 2012 at 03:38:58PM -0600, Rob Herring wrote:
> On 02/11/2012 11:14 AM, Shawn Guo wrote:
> > Choosing irq_domain type for generic-chip based on device_node forces
> > non-DT users to use legacy irq_domain, which makes no sense, because
> > linear irq_domain is actually encouraged to be used by both DT and
> > non-DT users.
>
> NAK
>
> Encouraged by who? As we discussed in person at Connect, I said you
> should use legacy domain for non-DT case. Grant and I have discussed
> this as well and agree.
Yes. I'd *like* for everyone (DT and non-DT) to be able to use the
linear revmap, but I can't see any nice way to do it as long as
devices are registered with hard coded #define irq numbers.
>
> > The patch changes it to make the decision based on irq_base. If users
> > pass in a negative irq_base value, a linear irq_domain will be created,
> > otherwise a legacy irq_domain will be created.
>
> This allows DT users to decide as well and possibly use legacy domains
> which is explicitly what I was trying to prevent. DT users must use
> linear domains and non-DT must use legacy. Otherwise, we'll get more
> half done DT conversions like mx5 is.
>
> Getting linear domains to work for non-DT to work would be a worthwhile
> goal if we didn't plan to remove non-DT boards. I don't think we really
> need linear to work for non-DT case.
I agree with that.
>
> Rob
>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > ---
> > kernel/irq/generic-chip.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
> > index 3ac7fa1..839f882 100644
> > --- a/kernel/irq/generic-chip.c
> > +++ b/kernel/irq/generic-chip.c
> > @@ -346,7 +346,7 @@ int irq_setup_generic_chip_domain(const char *name, struct device_node *node,
> > irq_setup_generic_chip(gc[i], 0, flags, clr, set);
> > }
> >
> > - if (node)
> > + if ((int) irq_base < 0)
> > d = irq_domain_add_linear(node, hwirq_cnt,
> > &irq_gc_irq_domain_ops, gc);
> > else
>
next prev parent reply other threads:[~2012-02-15 21:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 17:14 [PATCH 0/8] irq_domain for imx tzic and gpio Shawn Guo
2012-02-11 17:14 ` [PATCH 1/8] irq: choose irq_domain type for generic-chip based on irq_base Shawn Guo
2012-02-13 21:38 ` Rob Herring
2012-02-15 21:20 ` Grant Likely [this message]
2012-02-11 17:14 ` [PATCH 2/8] dt: add empty of_find_compatible_node function Shawn Guo
2012-02-11 17:14 ` [PATCH 3/8] ARM: imx5: adopt generic_chip irq_domain support for tzic Shawn Guo
2012-02-12 3:31 ` Rob Herring
2012-02-13 13:51 ` Shawn Guo
2012-02-13 14:22 ` Rob Herring
2012-02-13 15:19 ` Shawn Guo
2012-02-13 15:34 ` Shawn Guo
2012-02-11 17:14 ` [PATCH 4/8] ARM: imx: eliminate macro IMX_GPIO_TO_IRQ() Shawn Guo
2012-02-11 17:14 ` [PATCH 5/8] ARM: imx: eliminate macro IOMUX_TO_IRQ() Shawn Guo
2012-02-11 17:14 ` [PATCH 6/8] ARM: imx: eliminate macro IRQ_GPIOx() Shawn Guo
2012-02-11 17:14 ` [PATCH 7/8] gpio/mxc: adopt irq_domain for gpio interrupt support Shawn Guo
2012-02-11 17:14 ` [PATCH 8/8] ARM: imx: remove macro MXC_GPIO_IRQ_START Shawn Guo
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=20120215212022.GK25779@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).