Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-07-10 Thread Tony Lindgren
* Hiremath, Vaibhav  [120710 02:29]:
> On Tue, Jul 10, 2012 at 14:48:21, Tony Lindgren wrote:
> > 
> > We have quite a few initcalls that exit early with various soc_is, cpu_is,
> > cpu_class_is tests that would fail for multi zImage kernels. Some of these
> > have been patched away with additional calls in MACHINE_START, but some
> > still remain.
> > 
> Let me check on this inside code but if you have any quick reference, please 
> let me know, I can fix it and submit the patch.

Any initcall that returns early if (!cpu_class_is_omap2()) would continue
running on multi zImage kernel on other SoCs compiled in unless we check
for each cpu_is_omap() || soc_is_omap() tests like we currently
do.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-07-10 Thread Hiremath, Vaibhav
On Tue, Jul 10, 2012 at 14:48:21, Tony Lindgren wrote:
> * Hiremath, Vaibhav  [120710 02:15]:
> > On Tue, Jul 10, 2012 at 14:11:08, Tony Lindgren wrote:
> > > * Hiremath, Vaibhav  [120627 13:37]:
> > > > --- a/arch/arm/plat-omap/include/plat/cpu.h
> > > > +++ b/arch/arm/plat-omap/include/plat/cpu.h
> > > > @@ -42,7 +42,14 @@
> > > >  #define OMAP2_DEVICE_TYPE_GP   3
> > > >  #define OMAP2_DEVICE_TYPE_BAD  4
> > > > 
> > > > +#ifdef CONFIG_ARCH_OMAP2PLUS
> > > >  int omap_type(void);
> > > > +#else
> > > > +inline static int omap_type(void)
> > > > +{
> > > > +   /* Always return GP, since it is not being used anyway for 
> > > > omap1 */
> > > > +   return OMAP2_DEVICE_TYPE_GP;
> > > > +}
> > > > +#endif
> > > > 
> > > >  /*
> > > >   * omap_rev bits:
> > > 
> > > Just to follow-up on this, looks like we need to postpone this
> > > for v3.7. While at it, we need to make sure all soc_is_omap()
> > > are false by default.
> > > 
> > 
> > Just FYI, I had submitted V2 of this patch.
> > 
> > > What you're suggesting above would also depend on some MULTI_ARCH
> > > option set if multiple ARM architectures are selected. Above patch
> > > would only optimize things when ARCH_OMAP2PLUS alone is selected.
> > > 
> > 
> > Isn't this only applicable for ARCH_OMAP2PLUS and OMAP1?? And above patch 
> > take cares of both, as OMAP1 and 2 will not be build together, since 
> > compiler flags itself will be different.
> 
> Right, but we also need to deal with
>  
> > Can you elaborate on how things will break if multiple ARM architectures 
> > are 
> > selected?
> >
> > I am not sure whether I am following you completely.
> 
> We have quite a few initcalls that exit early with various soc_is, cpu_is,
> cpu_class_is tests that would fail for multi zImage kernels. Some of these
> have been patched away with additional calls in MACHINE_START, but some
> still remain.
> 

Let me check on this inside code but if you have any quick reference, please 
let me know, I can fix it and submit the patch.

> We probably always need to return false for all soc_is_omap() unless
> the SoC detection is initialized in id.c.
> 

Ditto...

Thanks,
Vaibhav

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-07-10 Thread Tony Lindgren
* Hiremath, Vaibhav  [120710 02:15]:
> On Tue, Jul 10, 2012 at 14:11:08, Tony Lindgren wrote:
> > * Hiremath, Vaibhav  [120627 13:37]:
> > > --- a/arch/arm/plat-omap/include/plat/cpu.h
> > > +++ b/arch/arm/plat-omap/include/plat/cpu.h
> > > @@ -42,7 +42,14 @@
> > >  #define OMAP2_DEVICE_TYPE_GP   3
> > >  #define OMAP2_DEVICE_TYPE_BAD  4
> > > 
> > > +#ifdef CONFIG_ARCH_OMAP2PLUS
> > >  int omap_type(void);
> > > +#else
> > > +inline static int omap_type(void)
> > > +{
> > > + /* Always return GP, since it is not being used anyway for omap1 */
> > > + return OMAP2_DEVICE_TYPE_GP;
> > > +}
> > > +#endif
> > > 
> > >  /*
> > >   * omap_rev bits:
> > 
> > Just to follow-up on this, looks like we need to postpone this
> > for v3.7. While at it, we need to make sure all soc_is_omap()
> > are false by default.
> > 
> 
> Just FYI, I had submitted V2 of this patch.
> 
> > What you're suggesting above would also depend on some MULTI_ARCH
> > option set if multiple ARM architectures are selected. Above patch
> > would only optimize things when ARCH_OMAP2PLUS alone is selected.
> > 
> 
> Isn't this only applicable for ARCH_OMAP2PLUS and OMAP1?? And above patch 
> take cares of both, as OMAP1 and 2 will not be build together, since 
> compiler flags itself will be different.

Right, but we also need to deal with
 
> Can you elaborate on how things will break if multiple ARM architectures are 
> selected?
>
> I am not sure whether I am following you completely.

We have quite a few initcalls that exit early with various soc_is, cpu_is,
cpu_class_is tests that would fail for multi zImage kernels. Some of these
have been patched away with additional calls in MACHINE_START, but some
still remain.

We probably always need to return false for all soc_is_omap() unless
the SoC detection is initialized in id.c.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-07-10 Thread Hiremath, Vaibhav
On Tue, Jul 10, 2012 at 14:11:08, Tony Lindgren wrote:
> * Hiremath, Vaibhav  [120627 13:37]:
> > --- a/arch/arm/plat-omap/include/plat/cpu.h
> > +++ b/arch/arm/plat-omap/include/plat/cpu.h
> > @@ -42,7 +42,14 @@
> >  #define OMAP2_DEVICE_TYPE_GP   3
> >  #define OMAP2_DEVICE_TYPE_BAD  4
> > 
> > +#ifdef CONFIG_ARCH_OMAP2PLUS
> >  int omap_type(void);
> > +#else
> > +inline static int omap_type(void)
> > +{
> > +   /* Always return GP, since it is not being used anyway for omap1 */
> > +   return OMAP2_DEVICE_TYPE_GP;
> > +}
> > +#endif
> > 
> >  /*
> >   * omap_rev bits:
> 
> Just to follow-up on this, looks like we need to postpone this
> for v3.7. While at it, we need to make sure all soc_is_omap()
> are false by default.
> 

Just FYI, I had submitted V2 of this patch.

> What you're suggesting above would also depend on some MULTI_ARCH
> option set if multiple ARM architectures are selected. Above patch
> would only optimize things when ARCH_OMAP2PLUS alone is selected.
> 

Isn't this only applicable for ARCH_OMAP2PLUS and OMAP1?? And above patch 
take cares of both, as OMAP1 and 2 will not be build together, since 
compiler flags itself will be different.

Can you elaborate on how things will break if multiple ARM architectures are 
selected?

I am not sure whether I am following you completely.

Thanks,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-07-10 Thread Tony Lindgren
* Hiremath, Vaibhav  [120627 13:37]:
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -42,7 +42,14 @@
>  #define OMAP2_DEVICE_TYPE_GP   3
>  #define OMAP2_DEVICE_TYPE_BAD  4
> 
> +#ifdef CONFIG_ARCH_OMAP2PLUS
>  int omap_type(void);
> +#else
> +inline static int omap_type(void)
> +{
> + /* Always return GP, since it is not being used anyway for omap1 */
> + return OMAP2_DEVICE_TYPE_GP;
> +}
> +#endif
> 
>  /*
>   * omap_rev bits:

Just to follow-up on this, looks like we need to postpone this
for v3.7. While at it, we need to make sure all soc_is_omap()
are false by default.

What you're suggesting above would also depend on some MULTI_ARCH
option set if multiple ARM architectures are selected. Above patch
would only optimize things when ARCH_OMAP2PLUS alone is selected.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Hiremath, Vaibhav
On Wed, Jun 27, 2012 at 21:47:45, Tony Lindgren wrote:
> * Tony Lindgren  [120627 06:44]:
> > * Hiremath, Vaibhav  [120614 07:37]:
> > > On Mon, Jun 11, 2012 at 18:52:54, Hiremath, Vaibhav wrote:
> > > > As omap1 and omap2 will never be compiled together, due to
> > > > different compiler flags, so we can simply make
> > > > cpu_class_is_omap2() = true, for all non-omap1 platforms.
> > > > 
> > > > Signed-off-by: Vaibhav Hiremath 
> > > > ---
> > > >  arch/arm/plat-omap/include/plat/cpu.h |3 +--
> > > >  1 files changed, 1 insertions(+), 2 deletions(-)
> > > > 
> > > 
> > > Tony,
> > > 
> > > Ping???
> > 
> > Thanks applying into devel-am33xx branch.
> 
> Actually looks like this fails for the dynamic detection
> case with omap1_defconfig.. Looks like you did not build
> test your patch with omap1_defconfig? Please do it for
> every patch!
> 
> It seems we need something better though for multi zImage
> too, we can't really rely on CONFIG_ARCH_OMAP1 or
> CONFIG_ARCH_OMAP2PLUS here to determine anything.
> 
> Anyways, dropping this for now, let's try to come up
> with something better.
> 

Yes Tony, you are right I did not test omap1 for this patch. My bad...

How about something like, considering the fact that, omap_type() is the 
culprit here and is not applicable to omap1 at all. In case of omap1, we 
don't use omap_type() function.


diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 6a42558..5900a3d 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -42,7 +42,14 @@
 #define OMAP2_DEVICE_TYPE_GP   3
 #define OMAP2_DEVICE_TYPE_BAD  4

+#ifdef CONFIG_ARCH_OMAP2PLUS
 int omap_type(void);
+#else
+inline static int omap_type(void)
+{
+   /* Always return GP, since it is not being used anyway for omap1 */
+   return OMAP2_DEVICE_TYPE_GP;
+}
+#endif

 /*
  * omap_rev bits:


Thanks,
Vaibhav

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Tony Lindgren
* Tony Lindgren  [120627 06:44]:
> * Hiremath, Vaibhav  [120614 07:37]:
> > On Mon, Jun 11, 2012 at 18:52:54, Hiremath, Vaibhav wrote:
> > > As omap1 and omap2 will never be compiled together, due to
> > > different compiler flags, so we can simply make
> > > cpu_class_is_omap2() = true, for all non-omap1 platforms.
> > > 
> > > Signed-off-by: Vaibhav Hiremath 
> > > ---
> > >  arch/arm/plat-omap/include/plat/cpu.h |3 +--
> > >  1 files changed, 1 insertions(+), 2 deletions(-)
> > > 
> > 
> > Tony,
> > 
> > Ping???
> 
> Thanks applying into devel-am33xx branch.

Actually looks like this fails for the dynamic detection
case with omap1_defconfig.. Looks like you did not build
test your patch with omap1_defconfig? Please do it for
every patch!

It seems we need something better though for multi zImage
too, we can't really rely on CONFIG_ARCH_OMAP1 or
CONFIG_ARCH_OMAP2PLUS here to determine anything.

Anyways, dropping this for now, let's try to come up
with something better.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Hiremath, Vaibhav
On Wed, Jun 27, 2012 at 19:28:17, Tony Lindgren wrote:
> * Hiremath, Vaibhav  [120627 06:54]:
> > 
> > There are few cleanup patches pending for your review, it would be good if 
> > you provide your review comments.
> 
> Hmm care to post the Subject: lines for those? I may have marked
> something as read accidentally..
> 

I will resubmit the patches again ontop of linux-omap/master, makes more sense.

These patches are,

ARM: OMAP2+: CLEANUP: All OMAP2PLUS uses omap-device.o target so add one entry
ARM: OMAP2+: CLEANUP: Move omap3 dpll ops to dpll3xxx.c
ARM: OMAP2+: CLEANUP: Remove ARCH_OMAPx ifdef from struct dpll_data

Thanks,
Vaibhav 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Tony Lindgren
* Hiremath, Vaibhav  [120627 06:54]:
> 
> There are few cleanup patches pending for your review, it would be good if 
> you provide your review comments.

Hmm care to post the Subject: lines for those? I may have marked
something as read accidentally..

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Hiremath, Vaibhav
On Wed, Jun 27, 2012 at 19:09:50, Tony Lindgren wrote:
> * Hiremath, Vaibhav  [120614 07:37]:
> > On Mon, Jun 11, 2012 at 18:52:54, Hiremath, Vaibhav wrote:
> > > As omap1 and omap2 will never be compiled together, due to
> > > different compiler flags, so we can simply make
> > > cpu_class_is_omap2() = true, for all non-omap1 platforms.
> > > 
> > > Signed-off-by: Vaibhav Hiremath 
> > > ---
> > >  arch/arm/plat-omap/include/plat/cpu.h |3 +--
> > >  1 files changed, 1 insertions(+), 2 deletions(-)
> > > 
> > 
> > Tony,
> > 
> > Ping???
> 
> Thanks applying into devel-am33xx branch.
> 

Thanks Tony,

There are few cleanup patches pending for your review, it would be good if 
you provide your review comments.

Thanks,
Vaibhav

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-27 Thread Tony Lindgren
* Hiremath, Vaibhav  [120614 07:37]:
> On Mon, Jun 11, 2012 at 18:52:54, Hiremath, Vaibhav wrote:
> > As omap1 and omap2 will never be compiled together, due to
> > different compiler flags, so we can simply make
> > cpu_class_is_omap2() = true, for all non-omap1 platforms.
> > 
> > Signed-off-by: Vaibhav Hiremath 
> > ---
> >  arch/arm/plat-omap/include/plat/cpu.h |3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> 
> Tony,
> 
> Ping???

Thanks applying into devel-am33xx branch.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-14 Thread Hiremath, Vaibhav
On Mon, Jun 11, 2012 at 18:52:54, Hiremath, Vaibhav wrote:
> As omap1 and omap2 will never be compiled together, due to
> different compiler flags, so we can simply make
> cpu_class_is_omap2() = true, for all non-omap1 platforms.
> 
> Signed-off-by: Vaibhav Hiremath 
> ---
>  arch/arm/plat-omap/include/plat/cpu.h |3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 

Tony,

Ping???

Thanks,
Vaibhav

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP2+: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms

2012-06-11 Thread Vaibhav Hiremath
As omap1 and omap2 will never be compiled together, due to
different compiler flags, so we can simply make
cpu_class_is_omap2() = true, for all non-omap1 platforms.

Signed-off-by: Vaibhav Hiremath 
---
 arch/arm/plat-omap/include/plat/cpu.h |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 14f050f..6a42558 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -374,8 +374,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 /* Macros to detect if we have OMAP1 or OMAP2 */
 #define cpu_class_is_omap1()   (cpu_is_omap7xx() || cpu_is_omap15xx() || \
cpu_is_omap16xx())
-#define cpu_class_is_omap2()   (cpu_is_omap24xx() || cpu_is_omap34xx() || \
-   cpu_is_omap44xx())
+#define cpu_class_is_omap2()   !cpu_class_is_omap1()
 
 /* Various silicon revisions for omap2 */
 #define OMAP242X_CLASS 0x24200024
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html