linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions
@ 2011-10-14 22:00 Javier Martinez Canillas
  2011-10-18 18:36 ` Kyle Manna
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2011-10-14 22:00 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, Javier Martinez Canillas

The definition for board specific initialization functions:
- omap2_set_globals_xxxx
- omapxxxx_powerdomains_init
- omapxxxx_clockdomains_init
- omapxxxx_hwmod_init

is conditionally compiled. So we also have to conditionally compile
the call to these functions or the linker will find undefined symbols.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
 arch/arm/mach-omap2/io.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index aa96538..d2d045b 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -359,6 +359,7 @@ static void __init omap_hwmod_init_postsetup(void)
 	omap_pm_if_early_init();
 }
 
+#ifdef CONFIG_SOC_OMAP2420
 void __init omap2420_init_early(void)
 {
 	omap2_set_globals_242x();
@@ -370,7 +371,9 @@ void __init omap2420_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap2420_clk_init();
 }
+#endif
 
+#ifdef CONFIG_SOC_OMAP2430
 void __init omap2430_init_early(void)
 {
 	omap2_set_globals_243x();
@@ -382,6 +385,7 @@ void __init omap2430_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap2430_clk_init();
 }
+#endif
 
 /*
  * Currently only board-omap3beagle.c should call this because of the
@@ -431,6 +435,7 @@ void __init ti816x_init_early(void)
 	omap3xxx_clk_init();
 }
 
+#ifdef CONFIG_ARCH_OMAP4
 void __init omap4430_init_early(void)
 {
 	omap2_set_globals_443x();
@@ -442,6 +447,7 @@ void __init omap4430_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap4xxx_clk_init();
 }
+#endif
 
 void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 				      struct omap_sdrc_params *sdrc_cs1)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions
  2011-10-14 22:00 [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
@ 2011-10-18 18:36 ` Kyle Manna
  2011-10-18 18:43   ` [PATCH] ARM: OMAP: Fix early init definitions Kyle Manna
  2011-10-18 20:01   ` [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
  0 siblings, 2 replies; 5+ messages in thread
From: Kyle Manna @ 2011-10-18 18:36 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: Tony Lindgren, linux-omap

Looks like you're missing one more section for OMAP3. Will reply with
a complete patch I was about to submit.

@@ -382,11 +387,14 @@ void __init omap2430_init_early(void)
        omap_hwmod_init_postsetup();
        omap2430_clk_init();
 }
+#endif

 /*
  * Currently only board-omap3beagle.c should call this because of the
  * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT.
  */
+#if defined(CONFIG_ARCH_OMAP3)
+
 void __init omap3_init_early(void)
 {
        omap2_set_globals_3xxx();
@@ -398,6 +406,7 @@ void __init omap3_init_early(void)
        omap_hwmod_init_postsetup();
        omap3xxx_clk_init();
 }
+#endif

 void __init omap3430_init_early(void)
 {


On Fri, Oct 14, 2011 at 5:00 PM, Javier Martinez Canillas
<martinez.javier@gmail.com> wrote:
>
> The definition for board specific initialization functions:
> - omap2_set_globals_xxxx
> - omapxxxx_powerdomains_init
> - omapxxxx_clockdomains_init
> - omapxxxx_hwmod_init
>
> is conditionally compiled. So we also have to conditionally compile
> the call to these functions or the linker will find undefined symbols.
>
> Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
> ---
>  arch/arm/mach-omap2/io.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index aa96538..d2d045b 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -359,6 +359,7 @@ static void __init omap_hwmod_init_postsetup(void)
>        omap_pm_if_early_init();
>  }
>
> +#ifdef CONFIG_SOC_OMAP2420
>  void __init omap2420_init_early(void)
>  {
>        omap2_set_globals_242x();
> @@ -370,7 +371,9 @@ void __init omap2420_init_early(void)
>        omap_hwmod_init_postsetup();
>        omap2420_clk_init();
>  }
> +#endif
>
> +#ifdef CONFIG_SOC_OMAP2430
>  void __init omap2430_init_early(void)
>  {
>        omap2_set_globals_243x();
> @@ -382,6 +385,7 @@ void __init omap2430_init_early(void)
>        omap_hwmod_init_postsetup();
>        omap2430_clk_init();
>  }
> +#endif
>
>  /*
>  * Currently only board-omap3beagle.c should call this because of the
> @@ -431,6 +435,7 @@ void __init ti816x_init_early(void)
>        omap3xxx_clk_init();
>  }
>
> +#ifdef CONFIG_ARCH_OMAP4
>  void __init omap4430_init_early(void)
>  {
>        omap2_set_globals_443x();
> @@ -442,6 +447,7 @@ void __init omap4430_init_early(void)
>        omap_hwmod_init_postsetup();
>        omap4xxx_clk_init();
>  }
> +#endif
>
>  void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
>                                      struct omap_sdrc_params *sdrc_cs1)
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: OMAP: Fix early init definitions
  2011-10-18 18:36 ` Kyle Manna
@ 2011-10-18 18:43   ` Kyle Manna
  2011-10-18 20:01   ` [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
  1 sibling, 0 replies; 5+ messages in thread
From: Kyle Manna @ 2011-10-18 18:43 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Kyle Manna, Russell King, linux-kernel, linux-arm-kernel

Depending on the archs defined in the config, some functions are
referenced without being defined. This fixes compile time errors that
would otherwise result.

Signed-off-by: Kyle Manna <kyle.manna@fuel7.com>
---
 arch/arm/mach-omap2/io.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index aa96538..f1d18a2 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -359,6 +359,8 @@ static void __init omap_hwmod_init_postsetup(void)
 	omap_pm_if_early_init();
 }
 
+#if defined(CONFIG_SOC_OMAP2420)
+
 void __init omap2420_init_early(void)
 {
 	omap2_set_globals_242x();
@@ -370,6 +372,9 @@ void __init omap2420_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap2420_clk_init();
 }
+#endif
+
+#if defined(CONFIG_SOC_OMAP2430)
 
 void __init omap2430_init_early(void)
 {
@@ -382,11 +387,14 @@ void __init omap2430_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap2430_clk_init();
 }
+#endif
 
 /*
  * Currently only board-omap3beagle.c should call this because of the
  * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT.
  */
+#if defined(CONFIG_ARCH_OMAP3)
+
 void __init omap3_init_early(void)
 {
 	omap2_set_globals_3xxx();
@@ -398,6 +406,7 @@ void __init omap3_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap3xxx_clk_init();
 }
+#endif
 
 void __init omap3430_init_early(void)
 {
@@ -431,6 +440,8 @@ void __init ti816x_init_early(void)
 	omap3xxx_clk_init();
 }
 
+#if defined(CONFIG_ARCH_OMAP4)
+
 void __init omap4430_init_early(void)
 {
 	omap2_set_globals_443x();
@@ -442,6 +453,8 @@ void __init omap4430_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap4xxx_clk_init();
 }
+#endif
+
 
 void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 				      struct omap_sdrc_params *sdrc_cs1)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions
  2011-10-18 18:36 ` Kyle Manna
  2011-10-18 18:43   ` [PATCH] ARM: OMAP: Fix early init definitions Kyle Manna
@ 2011-10-18 20:01   ` Javier Martinez Canillas
  2011-11-03 19:16     ` Tony Lindgren
  1 sibling, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2011-10-18 20:01 UTC (permalink / raw)
  To: Kyle Manna; +Cc: Tony Lindgren, linux-omap

On Tue, Oct 18, 2011 at 8:36 PM, Kyle Manna <kyle.manna@gmail.com> wrote:
> Looks like you're missing one more section for OMAP3. Will reply with
> a complete patch I was about to submit.
>

Yes, I added all the ones I need to compile my board correctly, but I
could have missed one of them.

Perfect, feel free to add this fix on your patch.

Best regards,

-- 
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions
  2011-10-18 20:01   ` [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
@ 2011-11-03 19:16     ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2011-11-03 19:16 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: Kyle Manna, linux-omap

* Javier Martinez Canillas <martinez.javier@gmail.com> [111018 12:27]:
> On Tue, Oct 18, 2011 at 8:36 PM, Kyle Manna <kyle.manna@gmail.com> wrote:
> > Looks like you're missing one more section for OMAP3. Will reply with
> > a complete patch I was about to submit.
> >
> 
> Yes, I added all the ones I need to compile my board correctly, but I
> could have missed one of them.
> 
> Perfect, feel free to add this fix on your patch.

FYI, I've applied this patch to fix this issue:

http://marc.info/?l=linux-omap&m=132034503812225&w=2

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-03 19:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-14 22:00 [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
2011-10-18 18:36 ` Kyle Manna
2011-10-18 18:43   ` [PATCH] ARM: OMAP: Fix early init definitions Kyle Manna
2011-10-18 20:01   ` [PATCH 1/1] ARM: OMAP: Add conditional compilation for board specific init functions Javier Martinez Canillas
2011-11-03 19:16     ` Tony Lindgren

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).