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 5/5] ARM: OMAP2+: board-generic: Use of_irq_init API
Date: Fri, 6 Jan 2012 14:25:09 -0700 [thread overview]
Message-ID: <20120106212509.GE7457@ponder.secretlab.ca> (raw)
In-Reply-To: <1324388398-2683-6-git-send-email-b-cousson@ti.com>
On Tue, Dec 20, 2011 at 02:39:58PM +0100, Benoit Cousson wrote:
> Use the of_irq_init API introduced in 3.2 to handle
> interrupt-controller with DT.
> Update the irq_match table to map the proper XXX_of_init
> functions for INTC and GIC drivers.
>
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/mach-omap2/board-generic.c | 30 ++++++++++++++++--------------
> 1 files changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index e493877..2529017 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -12,6 +12,7 @@
> * published by the Free Software Foundation.
> */
> #include <linux/io.h>
> +#include <linux/of_irq.h>
> #include <linux/of_platform.h>
> #include <linux/irqdomain.h>
> #include <linux/i2c/twl.h>
> @@ -24,6 +25,17 @@
> #include "common.h"
> #include "common-board-devices.h"
>
> +static struct of_device_id irq_match[] __initdata = {
> + { .compatible = "ti,omap2-intc", .data = intc_of_init, },
> + { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
> + { }
> +};
> +
> +static void __init omap_init_irq(void)
> +{
> + of_irq_init(irq_match);
> +}
> +
> /*
> * XXX: Still needed to boot until the i2c & twl driver is adapted to
> * device-tree
> @@ -58,18 +70,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
> { }
> };
>
> -static struct of_device_id intc_match[] __initdata = {
> - { .compatible = "ti,omap3-intc", },
> - { .compatible = "arm,cortex-a9-gic", },
> - { }
> -};
> -
> static void __init omap_generic_init(void)
> {
> - struct device_node *node = of_find_matching_node(NULL, intc_match);
> - if (node)
> - irq_domain_add_simple(node, 0);
> -
> omap_serial_init();
> omap_sdrc_init(NULL, NULL);
>
> @@ -103,7 +105,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
> .reserve = omap_reserve,
> .map_io = omap242x_map_io,
> .init_early = omap2420_init_early,
> - .init_irq = omap2_init_irq,
> + .init_irq = omap_init_irq,
> .handle_irq = omap2_intc_handle_irq,
> .init_machine = omap_generic_init,
> .timer = &omap2_timer,
> @@ -122,7 +124,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
> .reserve = omap_reserve,
> .map_io = omap243x_map_io,
> .init_early = omap2430_init_early,
> - .init_irq = omap2_init_irq,
> + .init_irq = omap_init_irq,
> .handle_irq = omap2_intc_handle_irq,
> .init_machine = omap_generic_init,
> .timer = &omap2_timer,
> @@ -141,7 +143,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
> .reserve = omap_reserve,
> .map_io = omap3_map_io,
> .init_early = omap3430_init_early,
> - .init_irq = omap3_init_irq,
> + .init_irq = omap_init_irq,
> .handle_irq = omap3_intc_handle_irq,
> .init_machine = omap3_init,
> .timer = &omap3_timer,
> @@ -160,7 +162,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
> .reserve = omap_reserve,
> .map_io = omap4_map_io,
> .init_early = omap4430_init_early,
> - .init_irq = gic_init_irq,
> + .init_irq = omap_init_irq,
> .handle_irq = gic_handle_irq,
> .init_machine = omap4_init,
> .timer = &omap4_timer,
> --
> 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:25 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
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 [this message]
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=20120106212509.GE7457@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).