From: b-cousson@ti•com (Cousson, Benoit)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 10/13] ARM: OMAP5: board-generic: Add device tree support.
Date: Mon, 7 May 2012 15:27:29 +0200 [thread overview]
Message-ID: <4FA7CDC1.9050301@ti.com> (raw)
In-Reply-To: <1336029982-31898-11-git-send-email-r.sricharan@ti.com>
Hi Sricharan,
On 5/3/2012 9:26 AM, R Sricharan wrote:
> Adding the minimal support for OMAP5 soc with device tree.
You should probably split that patch since you are doing several things
that are not OMAP5 related.
Do a patch that move the omap_init_irq into the INTC and GIC code first.
Then, you can add a patch to add the OMAP5_DT machine entry.
> Signed-off-by: R Sricharan<r.sricharan@ti•com>
> ---
> arch/arm/mach-omap2/board-generic.c | 39 +++++++++++++++++++++-------------
> arch/arm/mach-omap2/common.h | 2 +
> arch/arm/mach-omap2/irq.c | 11 +++++++++
> arch/arm/mach-omap2/omap4-common.c | 14 ++++++++++++
> 4 files changed, 51 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 098d183..0dd9e3f 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -20,6 +20,7 @@
> #include<mach/hardware.h>
> #include<asm/hardware/gic.h>
> #include<asm/mach/arch.h>
> +#include<mach/omap-wakeupgen.h>
>
> #include<plat/board.h>
> #include "common.h"
> @@ -32,17 +33,6 @@
> #define gic_of_init NULL
> #endif
>
> -static struct of_device_id irq_match[] __initdata = {
> - { .compatible = "ti,omap2-intc", .data = omap_intc_of_init, },
> - { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
> - { }
> -};
> -
> -static void __init omap_init_irq(void)
> -{
> - of_irq_init(irq_match);
> -}
> -
> static struct of_device_id omap_dt_match_table[] __initdata = {
> { .compatible = "simple-bus", },
> { .compatible = "ti,omap-infra", },
> @@ -66,7 +56,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 = omap_init_irq,
> + .init_irq = omap_of_init_irq,
> .handle_irq = omap2_intc_handle_irq,
> .init_machine = omap_generic_init,
> .timer =&omap2_timer,
> @@ -85,7 +75,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 = omap_init_irq,
> + .init_irq = omap_of_init_irq,
> .handle_irq = omap2_intc_handle_irq,
> .init_machine = omap_generic_init,
> .timer =&omap2_timer,
> @@ -120,7 +110,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 = omap_init_irq,
> + .init_irq = omap_of_init_irq,
> .handle_irq = omap3_intc_handle_irq,
> .init_machine = omap3_init,
> .timer =&omap3_timer,
> @@ -155,7 +145,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 = omap_init_irq,
> + .init_irq = omap_gic_of_init,
> .handle_irq = gic_handle_irq,
> .init_machine = omap4_init,
> .timer =&omap4_timer,
> @@ -163,3 +153,22 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
> .restart = omap_prcm_restart,
> MACHINE_END
> #endif
> +
> +#ifdef CONFIG_ARCH_OMAP5
> +static const char *omap5_boards_compat[] __initdata = {
> + "ti,omap5",
> + NULL,
> +};
> +
> +DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
> + .reserve = omap_reserve,
> + .map_io = omap5_map_io,
> + .init_early = omap5_init_early,
> + .init_irq = omap_gic_of_init,
> + .handle_irq = gic_handle_irq,
> + .init_machine = omap_generic_init,
> + .timer =&omap5_timer,
> + .dt_compat = omap5_boards_compat,
> + .restart = omap_prcm_restart,
> +MACHINE_END
> +#endif
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> index 0771d22..e66859d 100644
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -185,6 +185,8 @@ void omap3_intc_prepare_idle(void);
> void omap3_intc_resume_idle(void);
> void omap2_intc_handle_irq(struct pt_regs *regs);
> void omap3_intc_handle_irq(struct pt_regs *regs);
> +void omap_of_init_irq(void);
In order to be consistent with the GIC function and even the previous
ones, you should name the exported one:
+void omap_intc_of_init(void);
> +void omap_gic_of_init(void);
>
> #ifdef CONFIG_CACHE_L2X0
> extern void __iomem *omap4_get_l2cache_base(void);
> diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
> index 65f0d25..d316c68 100644
> --- a/arch/arm/mach-omap2/irq.c
> +++ b/arch/arm/mach-omap2/irq.c
> @@ -21,6 +21,7 @@
> #include<linux/irqdomain.h>
> #include<linux/of.h>
> #include<linux/of_address.h>
> +#include<linux/of_irq.h>
>
> #include<mach/hardware.h>
>
> @@ -279,6 +280,16 @@ int __init omap_intc_of_init(struct device_node *node,
And thus rename that one that become a private function without the
omap_ prefix.
> return 0;
> }
>
> +static struct of_device_id irq_match[] __initdata = {
> + { .compatible = "ti,omap2-intc", .data = omap_intc_of_init, },
+ { .compatible = "ti,omap2-intc", .data = intc_of_init, },
> + { }
> +};
> +
> +void __init omap_of_init_irq(void)
+void __init omap_intc_of_init(void)
> +{
> + of_irq_init(irq_match);
> +}
Regards,
Benoit
next prev parent reply other threads:[~2012-05-07 13:27 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 7:26 [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support R Sricharan
2012-05-03 7:26 ` [PATCH 01/13] ARM: OMAP5: id: Add cpu id for ES versions R Sricharan
2012-05-10 11:18 ` Roger Quadros
2012-05-10 11:22 ` R, Sricharan
2012-05-10 13:06 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-10 13:15 ` R, Sricharan
2012-05-03 7:26 ` [PATCH 02/13] ARM: OMAP5: Add minimal support for OMAP5430 SOC R Sricharan
2012-05-04 22:39 ` Tony Lindgren
2012-05-04 22:47 ` Tony Lindgren
2012-05-06 7:36 ` R, Sricharan
2012-05-07 17:33 ` Tony Lindgren
2012-05-09 9:06 ` R, Sricharan
2012-05-09 16:00 ` Tony Lindgren
2012-05-10 9:49 ` R, Sricharan
2012-05-07 19:07 ` Paul Walmsley
2012-05-07 19:18 ` Tony Lindgren
2012-05-07 19:35 ` Tony Lindgren
2012-05-08 5:32 ` Paul Walmsley
2012-05-08 5:49 ` Hiremath, Vaibhav
2012-05-08 15:48 ` Tony Lindgren
2012-05-08 17:00 ` Hiremath, Vaibhav
2012-05-08 19:07 ` Tony Lindgren
2012-05-08 5:31 ` Paul Walmsley
2012-05-08 15:47 ` Tony Lindgren
2012-05-10 11:58 ` Roger Quadros
2012-05-03 7:26 ` [PATCH 03/13] TEMP: ARM: OMAP5: Add cpu_is_omap54xx() checks R Sricharan
2012-05-03 7:26 ` [PATCH 04/13] ARM: OMAP5: timer: Add clocksource, clockevent support R Sricharan
2012-05-03 7:26 ` [PATCH 05/13] TEMP: ARM: OMAP5: Update the base address of the 32k-counter R Sricharan
2012-05-03 7:26 ` [PATCH 06/13] ARM: OMAP5: gpmc: Update gpmc_init() R Sricharan
2012-05-03 7:26 ` [PATCH 07/13] ARM: OMAP5: l3: Add l3 error handler support for omap5 R Sricharan
2012-05-04 22:51 ` Tony Lindgren
2012-05-06 7:38 ` R, Sricharan
2012-05-07 17:34 ` Tony Lindgren
2012-05-08 6:04 ` R, Sricharan
2012-05-03 7:26 ` [PATCH 08/13] ARM: OMAP5: Add the WakeupGen IP updates R Sricharan
2012-05-04 22:55 ` Tony Lindgren
2012-05-07 9:06 ` Santosh Shilimkar
2012-05-10 11:36 ` Roger Quadros
2012-05-10 11:42 ` Shilimkar, Santosh
2012-05-10 11:48 ` Roger Quadros
2012-05-10 11:52 ` Santosh Shilimkar
2012-05-03 7:26 ` [PATCH 09/13] ARM: OMAP5: Add SMP support R Sricharan
2012-05-08 12:47 ` Will Deacon
2012-05-08 13:00 ` Santosh Shilimkar
2012-05-03 7:26 ` [PATCH 10/13] ARM: OMAP5: board-generic: Add device tree support R Sricharan
2012-05-07 13:27 ` Cousson, Benoit [this message]
2012-05-07 14:08 ` R, Sricharan
2012-05-07 17:35 ` Tony Lindgren
2012-05-03 7:26 ` [PATCH 11/13] arm/dts: OMAP5: Add omap5 dts files R Sricharan
2012-05-03 7:26 ` [PATCH 12/13] ARM: OMAP5: Add the build support R Sricharan
2012-05-04 22:58 ` Tony Lindgren
2012-05-07 3:35 ` R, Sricharan
2012-05-07 17:37 ` Tony Lindgren
2012-05-08 9:19 ` Cousson, Benoit
2012-05-08 15:57 ` Tony Lindgren
2012-05-03 7:26 ` [PATCH 13/13] ARM: Kconfig update to support additional GPIOs in OMAP5 R Sricharan
2012-05-07 9:49 ` [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support Santosh Shilimkar
2012-05-07 22:26 ` Tony Lindgren
2012-05-08 7:24 ` Santosh Shilimkar
2012-05-08 15:58 ` Tony Lindgren
2012-05-10 17:43 ` Sricharan R
2012-05-11 20:11 ` Tony Lindgren
2012-05-14 4:50 ` R, Sricharan
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=4FA7CDC1.9050301@ti.com \
--to=b-cousson@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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