From: Grant Likely <grant.likely@secretlab.ca>
To: Benoit Cousson <b-cousson@ti.com>
Cc: rob.herring@calxeda.com, tony@atomide.com,
devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/5] ARM: OMAP2/3: intc: Add irqdomain support
Date: Fri, 6 Jan 2012 14:22:30 -0700 [thread overview]
Message-ID: <20120106212230.GB7457@ponder.secretlab.ca> (raw)
In-Reply-To: <1324388398-2683-3-git-send-email-b-cousson@ti.com>
On Tue, Dec 20, 2011 at 02:39:55PM +0100, Benoit Cousson wrote:
> Introduce the usage of the irqdomain to prepare the DT support.
> The irq_base is still hard coded to 0 to allow non-DT drivers
> to work with the previous assumption that was hwirq = irq.
>
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/mach-omap2/irq.c | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
> index 42b1d65..2f65dfd 100644
> --- a/arch/arm/mach-omap2/irq.c
> +++ b/arch/arm/mach-omap2/irq.c
> @@ -17,6 +17,7 @@
> #include <mach/hardware.h>
> #include <asm/exception.h>
> #include <asm/mach/irq.h>
> +#include <linux/irqdomain.h>
>
>
> /* selected INTC register offsets */
> @@ -57,6 +58,8 @@ static struct omap_irq_bank {
> },
> };
>
> +static struct irq_domain domain;
> +
> /* Structure to save interrupt controller context */
> struct omap3_intc_regs {
> u32 sysconfig;
> @@ -158,6 +161,17 @@ static void __init omap_init_irq(u32 base, int nr_irqs)
> if (WARN_ON(!omap_irq_base))
> return;
>
> + /*
> + * XXX: Use a 0 irq_base for the moment since the legacy devices
> + * created statically are expected a hwirq = irq mapping.
> + * A proper offset will be added later, when IRQ resource creation
> + * will be handled by DT.
> + */
> + domain.irq_base = 0;
> + domain.nr_irq = nr_irqs;
> + domain.ops = &irq_domain_simple_ops;
> + irq_domain_add(&domain);
The omap doesn't need anything special from irq_domain. You can use
irq_domain_add_simple(). A recent patch was posted that makes
irq_domain_add_simple() accepts a nr_irqs parameter and returns the
allocated irq domain.
However, that isn't enough reason for me to reject this patch if there
is any opportunity to get it into v3.3 provided you promise to fix it
up later.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> +
> for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
> struct omap_irq_bank *bank = irq_banks + i;
>
> @@ -225,8 +239,10 @@ out:
> irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET);
> irqnr &= ACTIVEIRQ_MASK;
>
> - if (irqnr)
> + if (irqnr) {
> + irqnr = irq_domain_to_irq(&domain, irqnr);
> handle_IRQ(irqnr, regs);
> + }
> } while (irqnr);
> }
>
> --
> 1.7.0.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2012-01-06 21:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 13:39 [PATCH v2 0/5] ARM: OMAP2+: Interrupt controllers adaptation to DT Benoit Cousson
2011-12-20 13:39 ` [PATCH v2 1/5] arm/dts: OMAP4: Update DTS file with new GIC bindings Benoit Cousson
2012-01-06 21:15 ` Grant Likely
2012-01-06 21:30 ` Rob Herring
2012-01-09 13:31 ` Cousson, Benoit
2011-12-20 13:39 ` [PATCH v2 2/5] ARM: OMAP2/3: intc: Add irqdomain support Benoit Cousson
2012-01-06 21:22 ` Grant Likely [this message]
2012-01-09 9:56 ` Cousson, Benoit
2011-12-20 13:39 ` [PATCH v2 3/5] ARM: OMAP2/3: intc: Add DT support for TI interrupt controller Benoit Cousson
2012-01-06 21:24 ` Grant Likely
2011-12-20 13:39 ` [PATCH v2 4/5] arm/dts: OMAP3: Add interrupt-controller bindings for INTC Benoit Cousson
2012-01-06 21:24 ` Grant Likely
2012-01-13 6:14 ` Hiremath, Vaibhav
2012-01-13 11:03 ` Cousson, Benoit
2012-01-13 12:31 ` Hiremath, Vaibhav
2012-01-13 13:01 ` Cousson, Benoit
2012-01-13 14:27 ` Hiremath, Vaibhav
2011-12-20 13:39 ` [PATCH v2 5/5] ARM: OMAP2+: board-generic: Use of_irq_init API Benoit Cousson
2012-01-06 21:25 ` Grant Likely
2011-12-23 9:46 ` [PATCH v2 0/5] ARM: OMAP2+: Interrupt controllers adaptation to DT Cousson, Benoit
2012-01-06 16:38 ` Cousson, Benoit
2012-01-06 18:56 ` Rob Herring
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=20120106212230.GB7457@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rob.herring@calxeda.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 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).