public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP2: fix cpu_is_omap24* optimizations
@ 2010-03-05 23:37 Kevin Hilman
  2010-03-06  0:15 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hilman @ 2010-03-05 23:37 UTC (permalink / raw)
  To: linux-omap

Currently if omap2420 is defined but not omap2430, cpu_is_omap2430()
is still defined as a macro, instead of #define'd to zero.  This
results in conditional cpu_is_omap2430() code still being compiled,
and leads to possible compile/link errors.  In particular for hwmod
init calls in io.c

To fix, add extra #ifdefs to CPU check macros to ensure that the
is_omap* macros are zero for each OMAP2 if they are not configured
into the kernel.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/plat-omap/include/plat/cpu.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index ed8786c..7514174 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -167,10 +167,14 @@ IS_OMAP_SUBCLASS(443x, 0x443)
 #if defined(MULTI_OMAP2)
 # if defined(CONFIG_ARCH_OMAP2)
 #  undef  cpu_is_omap24xx
-#  undef  cpu_is_omap242x
-#  undef  cpu_is_omap243x
 #  define cpu_is_omap24xx()		is_omap24xx()
+# endif
+# if defined (CONFIG_ARCH_OMAP2420)
+#  undef  cpu_is_omap242x
 #  define cpu_is_omap242x()		is_omap242x()
+# endif
+# if defined (CONFIG_ARCH_OMAP2430)
+#  undef  cpu_is_omap243x
 #  define cpu_is_omap243x()		is_omap243x()
 # endif
 # if defined(CONFIG_ARCH_OMAP3)
-- 
1.6.6


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

* Re: [PATCH] OMAP2: fix cpu_is_omap24* optimizations
  2010-03-05 23:37 [PATCH] OMAP2: fix cpu_is_omap24* optimizations Kevin Hilman
@ 2010-03-06  0:15 ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2010-03-06  0:15 UTC (permalink / raw)
  To: linux-omap

Kevin Hilman <khilman@deeprootsystems.com> writes:

> Currently if omap2420 is defined but not omap2430, cpu_is_omap2430()
> is still defined as a macro, instead of #define'd to zero.  This
> results in conditional cpu_is_omap2430() code still being compiled,
> and leads to possible compile/link errors.  In particular for hwmod
> init calls in io.c
>
> To fix, add extra #ifdefs to CPU check macros to ensure that the
> is_omap* macros are zero for each OMAP2 if they are not configured
> into the kernel.
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---

I forgot to mention that this applies on top of omap-fixes branch.

Kevin

>  arch/arm/plat-omap/include/plat/cpu.h |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index ed8786c..7514174 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -167,10 +167,14 @@ IS_OMAP_SUBCLASS(443x, 0x443)
>  #if defined(MULTI_OMAP2)
>  # if defined(CONFIG_ARCH_OMAP2)
>  #  undef  cpu_is_omap24xx
> -#  undef  cpu_is_omap242x
> -#  undef  cpu_is_omap243x
>  #  define cpu_is_omap24xx()		is_omap24xx()
> +# endif
> +# if defined (CONFIG_ARCH_OMAP2420)
> +#  undef  cpu_is_omap242x
>  #  define cpu_is_omap242x()		is_omap242x()
> +# endif
> +# if defined (CONFIG_ARCH_OMAP2430)
> +#  undef  cpu_is_omap243x
>  #  define cpu_is_omap243x()		is_omap243x()
>  # endif
>  # if defined(CONFIG_ARCH_OMAP3)
> -- 
> 1.6.6

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

end of thread, other threads:[~2010-03-06  0:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 23:37 [PATCH] OMAP2: fix cpu_is_omap24* optimizations Kevin Hilman
2010-03-06  0:15 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox