Skip to contentSkip to conversation

omap: 3630: default cpu_is_omap3630 to zero

RFC PATCH In review Vikram Pandita 5 participants 12 messages Oct 12, 2009 – Oct 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 omap: 3630: default cpu_is_omap3630 to zero

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +2 -0
index da9e8f8..940946e 100644
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif
 
Signature · 1 line
1.6.5.rc1.19.g8426
#1 lore raw
Quoted 25 lines

-----Original Message-----
From: Pandita, Vikram
Sent: Monday, October 12, 2009 3:51 PM

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/mach/cpu.h +0 -0

omap/include/mach/cpu.h
index da9e8f8..940946e 100644

arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 6 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

Dumb question: why is this needed? cpu_is_omap3530,15,25,03 don't seems to declare these..

Regards,
Nishanth Menon

#2 lore raw
Quoted 31 lines

-----Original Message-----
From: Menon, Nishanth
Sent: Monday, October 12, 2009 4:05 PM
To: Pandita, Vikram
Cc: [email protected]
Subject: RE: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero

Quoted 22 lines

-----Original Message-----
From: Pandita, Vikram
Sent: Monday, October 12, 2009 3:51 PM

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/mach/cpu.h +0 -0

omap/include/mach/cpu.h
index da9e8f8..940946e 100644

arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 10 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

Dumb question: why is this needed? cpu_is_omap3530,15,25,03 don't seems to declare these..

If in some file, you want to distinguish between 3630 vs 3430, and the build is for 3430 only, then cpu_is_omap3630() should return 0.

Eg: opp table allocation based on run time check

Omap35xx may also need it for the opp in future I guess.

Quoted 3 lines

Regards,
Nishanth Menon

#3 lore raw
Quoted 37 lines

-----Original Message-----
From: Pandita, Vikram
Sent: Monday, October 12, 2009 4:08 PM

Quoted 23 lines
Quoted 23 lines

-----Original Message-----
From: Pandita, Vikram
Sent: Monday, October 12, 2009 3:51 PM

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/mach/cpu.h +0 -0

omap/include/mach/cpu.h
index da9e8f8..940946e 100644

arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 10 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

Dumb question: why is this needed? cpu_is_omap3530,15,25,03 don't seems

Quoted 8 lines

to declare these..

If in some file, you want to distinguish between 3630 vs 3430, and the build is for 3430 only, then cpu_is_omap3630() should return 0.

Eg: opp table allocation based on run time check

Omap35xx may also need it for the opp in future I guess.

Could you add them in a single patch please?

Regards,
Nishanth Menon

#4 lore raw
In reply to Pandita, Vikram

Has anybody tried building latest linux-omap master ? The build is breaking for other OMAP processors.

CC arch/arm/mach-omap2/id.o
arch/arm/mach-omap2/id.c: In function 'omap3_cpuinfo':
arch/arm/mach-omap2/id.c:269: error: implicit declaration of function 'cpu_is_omap3630' make[1]: *** [arch/arm/mach-omap2/id.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

This is because of " 0a9b95f21995aa3cdda82ebc6e77b0b2ab401861"
omap: Introduce OMAP3630

Below patch from Vikram fixes the build break.

Quoted 58 lines

-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Pandita, Vikram
Sent: Tuesday, October 13, 2009 2:38 AM
To: Menon, Nishanth
Cc: [email protected]
Subject: RE: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero

Quoted 29 lines

-----Original Message-----
From: Menon, Nishanth
Sent: Monday, October 12, 2009 4:05 PM
To: Pandita, Vikram
Cc: [email protected]
Subject: RE: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero

Quoted 22 lines

-----Original Message-----
From: Pandita, Vikram
Sent: Monday, October 12, 2009 3:51 PM

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/mach/cpu.h +0 -0

omap/include/mach/cpu.h
index da9e8f8..940946e 100644

arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 10 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

Dumb question: why is this needed? cpu_is_omap3530,15,25,03 don't seems

to declare these..

If in some file, you want to distinguish between 3630 vs 3430, and the build is for 3430 only, then cpu_is_omap3630() should return 0.

Eg: opp table allocation based on run time check

Omap35xx may also need it for the opp in future I guess.

#5 lore raw

Shilimkar, Santosh said the following on 10/13/2009 05:03 AM:

Quoted 8 lines

Has anybody tried building latest linux-omap master ? The build is breaking for other OMAP processors.

CC arch/arm/mach-omap2/id.o
arch/arm/mach-omap2/id.c: In function 'omap3_cpuinfo':
arch/arm/mach-omap2/id.c:269: error: implicit declaration of function 'cpu_is_omap3630' make[1]: *** [arch/arm/mach-omap2/id.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Quoted 5 lines

This is because of " 0a9b95f21995aa3cdda82ebc6e77b0b2ab401861"
omap: Introduce OMAP3630

Below patch from Vikram fixes the build break.

ouch.. my bad.. thanks for answering my question. I am guessing we need this coz of is_omap3630() translation..
Ack for the patch from me.
Regards,
Nishanth Menon

#6 lore raw
Quoted 9 lines · Nishanth Menon

Shilimkar, Santosh said the following on 10/13/2009 05:03 AM:

Quoted 8 lines

Has anybody tried building latest linux-omap master ? The build is breaking for other OMAP processors.

CC arch/arm/mach-omap2/id.o
arch/arm/mach-omap2/id.c: In function 'omap3_cpuinfo':
arch/arm/mach-omap2/id.c:269: error: implicit declaration of function 'cpu_is_omap3630' make[1]: *** [arch/arm/mach-omap2/id.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Quoted 8 lines
Quoted 5 lines

This is because of " 0a9b95f21995aa3cdda82ebc6e77b0b2ab401861"
omap: Introduce OMAP3630

Below patch from Vikram fixes the build break.

ouch.. my bad.. thanks for answering my question. I am guessing we need this coz of is_omap3630() translation..
Ack for the patch from me.

To me it looks like all the 35x defines need the same treatment.

Tony

#7 lore raw

PATCH 1/1 omap: Fix cpu_is_omap35xx default defines (Re: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero)

Quoted 13 lines · Tony Lindgren
Quoted 12 lines · Nishanth Menon

Shilimkar, Santosh said the following on 10/13/2009 05:03 AM:

Quoted 11 lines

Has anybody tried building latest linux-omap master ? The build is breaking for other OMAP processors.

CC arch/arm/mach-omap2/id.o
arch/arm/mach-omap2/id.c: In function 'omap3_cpuinfo':
arch/arm/mach-omap2/id.c:269: error: implicit declaration of function 'cpu_is_omap3630' make[1]: *** [arch/arm/mach-omap2/id.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

This is because of " 0a9b95f21995aa3cdda82ebc6e77b0b2ab401861"
omap: Introduce OMAP3630

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Below patch from Vikram fixes the build break.

ouch.. my bad.. thanks for answering my question. I am guessing we need this coz of is_omap3630() translation..
Ack for the patch from me.

To me it looks like all the 35x defines need the same treatment.

And here's the patch to do that.

omap: Fix cpu_is_omap35xx default defines

Otherwise compilation on other processors
will fail if these are used in the code.

arch/arm/plat-omap/include/mach/cpu.h +4 -0
index a67a95c..770cb60 100644
@@ -322,6 +322,10 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3503()		0
+#define cpu_is_omap3515()		0
+#define cpu_is_omap3525()		0
+#define cpu_is_omap3530()		0
 #define cpu_is_omap3630()		0
 
 /*
#8 lore raw
In reply to Vikram Pandita
Quoted 20 lines · Vikram Pandita

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +1 -0
index da9e8f8..940946e 100644
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 6 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

This undef should be just undef cpu_is_omap3630 instead of cpu_is_omap3630().

Tony

#9 lore raw

PATCH 1/1 omap: Fix 35xx detection (Re: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero)

Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Vikram Pandita

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +1 -0
index da9e8f8..940946e 100644
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 12 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

This undef should be just undef cpu_is_omap3630 instead of cpu_is_omap3630().

Also looking at the 35xx detection code, should it not be like this?

omap: Fix 35xx detection

Should use && instead of &

arch/arm/plat-omap/include/mach/cpu.h +6 -6
index 111f29a..a67a95c 100644
@@ -377,14 +377,14 @@ IS_OMAP_TYPE(3430, 0x3430)
 # undef cpu_is_omap3525
 # undef cpu_is_omap3530
 # define cpu_is_omap3430()		is_omap3430()
-# define cpu_is_omap3503		(cpu_is_omap3430() &		\
-						(!omap3_has_iva()) &	\
+# define cpu_is_omap3503		(cpu_is_omap3430() &&		\
+						(!omap3_has_iva()) &&	\
 						(!omap3_has_sgx()))
-# define cpu_is_omap3515		(cpu_is_omap3430() &		\
-						(omap3_has_iva()) &	\
+# define cpu_is_omap3515		(cpu_is_omap3430() &&		\
+						(omap3_has_iva()) &&	\
 						(!omap3_has_sgx()))
-# define cpu_is_omap3525		(cpu_is_omap3430() &		\
-						(omap3_has_sgx()) &	\
+# define cpu_is_omap3525		(cpu_is_omap3430() &&		\
+						(omap3_has_sgx()) &&	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
 # undef cpu_is_omap3630
#10 lore raw

Re: [PATCH] omap: Fix 35xx detection (Re: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero)

Tony Lindgren had written, on 10/13/2009 12:32 PM, the following:

Quoted 19 lines · Tony Lindgren
Quoted 18 lines · Vikram Pandita
Quoted 17 lines

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +1 -0
index da9e8f8..940946e 100644
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 8 lines
Quoted 8 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 391

Quoted 8 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()

wondering what the standard is:

 # define cpu_is_omap3430()		is_omap3430()
so is it
 #define cpu_is_omapXXXX() 		blah blah
or
 #define cpu_is_omapXXXX		blah blah
would have though it is  cpu_is_omapXXXX()

Regards,
Nishanth Menon

#11 lore raw

Re: [PATCH] omap: Fix 35xx detection (Re: [PATCH] [RFC] omap: 3630: default cpu_is_omap3630 to zero)

In reply to Tony Lindgren
Quoted 32 lines · Tony Lindgren
Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Vikram Pandita

make default cpu_is_omap3630() return zero

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +1 -0
index da9e8f8..940946e 100644
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()		0
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
+#define cpu_is_omap3630()		0
 
Quoted 12 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 392

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +1 -0
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 						(omap3_has_sgx()) &	\
 						(!omap3_has_iva()))
 # define cpu_is_omap3530		(cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630()		is_omap363x()
 #endif

This undef should be just undef cpu_is_omap3630 instead of cpu_is_omap3630().

Quoted 1 line

Also looking at the 35xx detection code, should it not be like this?

I've merged all these fixes into the 35xx and 36xx detection patches in omap for-next branch, can you guys please check?

Regards,

Tony