All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] introduce generic OMAP SOC features
@ 2010-05-23  3:36 Nishanth Menon
  2010-05-23  3:36 ` [PATCH 1/6] omap1: rename check_revision Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

With OMAP4 we have the need to have SOC independent features
handling. This makes sense from a long run as other OMAP4
derivatives gets generated in parallel to OMAP3 generation
of chips.

Example usages:
	http://marc.info/?t=127376415000008&r=1&w=2
	http://marc.info/?t=127265012000008&r=1&w=2

This series attempts to introduce a framework which could
be used from OMAP1 onwards.

Caveat: this series just introduces the framework by reorganizing
the existing data, it does not attempt to define what the features
for OMAP1,2,3,4 would be. As usual, comments are welcome.

NOTE: Tested on OMAP3430, 3630, OMAP4. Requesting help to verify on
other platforms as well - OMAP1,2 etc..(only very limited change has
been done for these, expectation is for them to continue to function).

Nishanth Menon (6):
  omap1: rename check_revision
  omap2/3: id: fix sparse warning
  omap: generic: introduce a single check_revision
  omap: improve OMAP3_HAS_FEATURE
  omap: introduce OMAP_SHOW_FEATURE
  omap: move generic omap3 features to generic

 arch/arm/mach-omap1/id.c              |    2 +-
 arch/arm/mach-omap1/io.c              |    1 -
 arch/arm/mach-omap2/id.c              |   36 +++++++---------
 arch/arm/mach-omap2/io.c              |    2 +-
 arch/arm/plat-omap/common.c           |   14 ++++++
 arch/arm/plat-omap/include/plat/cpu.h |   72 ++++++++++++++++++++++-----------
 6 files changed, 80 insertions(+), 47 deletions(-)

scripts/bloat-o-meter vmlinux.master vmlinux
add/remove: 2/5 grow/shrink: 8/9 up/down: 1500/-1504 (-4)
function                                     old     new   delta
omap2_check_revision                         168    1528   +1360
omap_check_revision                            -      60     +60
ubifs_scan                                   632     676     +44
rd_load_image                               1340    1352     +12
test_hash                                   1088    1092      +4
omap_features                                  -       4      +4
in4_pton                                     360     364      +4
ieee80211_assoc_done                        1840    1844      +4
elf_core_dump                               3632    3636      +4
__posix_lock_file                           1264    1268      +4
ubifs_tnc_end_commit                        1468    1464      -4
nfs3_listxattr                               272     268      -4
jffs2_build_xattr_subsystem                 1428    1424      -4
generic_file_aio_read                       1692    1688      -4
do_task_stat                                1424    1420      -4
onenand_read_ops_nolock                     1016    1008      -8
musb_host_rx                                2672    2660     -12
arch_get_unmapped_area                       528     512     -16
scsi_io_completion                          1204    1184     -20
omap4_check_revision                         128       -    -128
omap3_check_features                         172       -    -172
omap24xx_check_revision                      252       -    -252
omap3_check_revision                         316       -    -316
omap3_cpuinfo                                560       -    -560

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Regards,
Nishanth Menon

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

* [PATCH 1/6] omap1: rename check_revision
  2010-05-23  3:36 [PATCH 0/6] introduce generic OMAP SOC features Nishanth Menon
@ 2010-05-23  3:36 ` Nishanth Menon
  2010-05-23  3:36   ` [PATCH 2/6] omap2/3: id: fix sparse warning Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

Rename omap_check_revision to omap1_check_revision to make it
evident that this is omap1 features to check. This will allow
us to introduce a omap generic check feature capability

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap1/id.c |    2 +-
 arch/arm/mach-omap1/io.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index a0e3560..91dbb71 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -118,7 +118,7 @@ static u8 __init omap_get_die_rev(void)
 	return die_rev;
 }
 
-void __init omap_check_revision(void)
+void __init omap1_check_revision(void)
 {
 	int i;
 	u16 jtag_id;
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index f872406..0178d33 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -21,7 +21,7 @@
 
 #include "clock.h"
 
-extern void omap_check_revision(void);
+extern void omap1_check_revision(void);
 extern void omap_sram_init(void);
 
 /*
@@ -103,7 +103,7 @@ void __init omap1_map_common_io(void)
 	/* We want to check CPU revision early for cpu_is_omapxxxx() macros.
 	 * IO space mapping must be initialized before we can do that.
 	 */
-	omap_check_revision();
+	omap1_check_revision();
 
 #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
 	if (cpu_is_omap7xx()) {
-- 
1.6.3.3


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

* [PATCH 2/6] omap2/3: id: fix sparse warning
  2010-05-23  3:36 ` [PATCH 1/6] omap1: rename check_revision Nishanth Menon
@ 2010-05-23  3:36   ` Nishanth Menon
  2010-05-23  3:36     ` [PATCH 3/6] omap: generic: introduce a single check_revision Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

omap24xx_check_revision, omap3_check_features,
omap3_check_revision, omap4_check_revision, omap3_cpuinfo
are not used elsewhere, it should be static

Also fixes the following sparse warnings:
arch/arm/mach-omap2/id.c:105:13: warning: symbol 'omap24xx_check_revision' was not declared. Should it be static?
arch/arm/mach-omap2/id.c:167:13: warning: symbol 'omap3_check_features' was not declared. Should it be static?
arch/arm/mach-omap2/id.c:189:13: warning: symbol 'omap3_check_revision' was not declared. Should it be static?
arch/arm/mach-omap2/id.c:270:13: warning: symbol 'omap4_check_revision' was not declared. Should it be static?
arch/arm/mach-omap2/id.c:300:13: warning: symbol 'omap3_cpuinfo' was not declared. Should it be static?

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/id.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37b8a1a..c7bf0e1 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -102,7 +102,7 @@ static struct omap_id omap_ids[] __initdata = {
 static void __iomem *tap_base;
 static u16 tap_prod_id;
 
-void __init omap24xx_check_revision(void)
+static void __init omap24xx_check_revision(void)
 {
 	int i, j;
 	u32 idcode, prod_id;
@@ -164,7 +164,7 @@ void __init omap24xx_check_revision(void)
 		omap3_features |= OMAP3_HAS_ ##feat;			\
 	}
 
-void __init omap3_check_features(void)
+static void __init omap3_check_features(void)
 {
 	u32 status;
 
@@ -186,7 +186,7 @@ void __init omap3_check_features(void)
 	 */
 }
 
-void __init omap3_check_revision(void)
+static void __init omap3_check_revision(void)
 {
 	u32 cpuid, idcode;
 	u16 hawkeye;
@@ -267,7 +267,7 @@ void __init omap3_check_revision(void)
 	}
 }
 
-void __init omap4_check_revision(void)
+static void __init omap4_check_revision(void)
 {
 	u32 idcode;
 	u16 hawkeye;
@@ -297,7 +297,7 @@ void __init omap4_check_revision(void)
 	if (omap3_has_ ##feat())		\
 		printk(#feat" ");
 
-void __init omap3_cpuinfo(void)
+static void __init omap3_cpuinfo(void)
 {
 	u8 rev = GET_OMAP_REVISION();
 	char cpu_name[16], cpu_rev[16];
-- 
1.6.3.3


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

* [PATCH 3/6] omap: generic: introduce a single check_revision
  2010-05-23  3:36   ` [PATCH 2/6] omap2/3: id: fix sparse warning Nishanth Menon
@ 2010-05-23  3:36     ` Nishanth Menon
  2010-05-23  3:36       ` [PATCH 4/6] omap: improve OMAP3_HAS_FEATURE Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

Introduce a single omap generic check_revision that routes the
request to the right revision of check_revision.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap1/io.c              |    3 +--
 arch/arm/mach-omap2/io.c              |    2 +-
 arch/arm/plat-omap/common.c           |   11 +++++++++++
 arch/arm/plat-omap/include/plat/cpu.h |   13 ++++++++++++-
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 0178d33..aad837b 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -21,7 +21,6 @@
 
 #include "clock.h"
 
-extern void omap1_check_revision(void);
 extern void omap_sram_init(void);
 
 /*
@@ -103,7 +102,7 @@ void __init omap1_map_common_io(void)
 	/* We want to check CPU revision early for cpu_is_omapxxxx() macros.
 	 * IO space mapping must be initialized before we can do that.
 	 */
-	omap1_check_revision();
+	omap_check_revision();
 
 #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
 	if (cpu_is_omap7xx()) {
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index b4860b6..e7fe326 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -239,7 +239,7 @@ static void __init _omap2_map_common_io(void)
 	local_flush_tlb_all();
 	flush_cache_all();
 
-	omap2_check_revision();
+	omap_check_revision();
 	omap_sram_init();
 	omap_vram_reserve_sdram();
 }
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 219c01e..459a45f 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -81,6 +81,17 @@ const void *omap_get_var_config(u16 tag, size_t *len)
 }
 EXPORT_SYMBOL(omap_get_var_config);
 
+void __init omap_check_revision()
+{
+#ifdef CONFIG_ARCH_OMAP1
+	if (cpu_is_omap7xx() || cpu_is_omap15xx() || cpu_is_omap16xx())
+		omap1_check_revision();
+#endif
+#ifdef CONFIG_ARCH_OMAP2PLUS
+	if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx())
+		omap2_check_revision();
+#endif
+}
 /*
  * 32KHz clocksource ... always available, on pretty most chips except
  * OMAP 730 and 1510.  Other timers could be used as clocksources, with
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 7514174..5f12a0b 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-void omap2_check_revision(void);
+#ifdef CONFIG_ARCH_OMAP2PLUS
+extern void omap2_check_revision(void);
+#else
+static inline void omap2_check_revision(void) {}
+#endif
+
+#ifdef CONFIG_ARCH_OMAP1
+extern void omap1_check_revision(void);
+#else
+static inline void omap1_check_revision(void) {}
+#endif
+void omap_check_revision(void);
 
 /*
  * Runtime detection of OMAP3 features
-- 
1.6.3.3


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

* [PATCH 4/6] omap: improve OMAP3_HAS_FEATURE
  2010-05-23  3:36     ` [PATCH 3/6] omap: generic: introduce a single check_revision Nishanth Menon
@ 2010-05-23  3:36       ` Nishanth Menon
  2010-05-23  3:36         ` [PATCH 5/6] omap: introduce OMAP_SHOW_FEATURE Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing
us to support multiple chip features

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/plat-omap/include/plat/cpu.h |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 5f12a0b..c71dbf4 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -444,6 +444,12 @@ static inline void omap1_check_revision(void) {}
 #endif
 void omap_check_revision(void);
 
+#define OMAP_HAS_FEATURE(rev, feat, flag)				\
+static inline unsigned int omap##rev##_has_ ##feat(void)		\
+{									\
+	return omap##rev##_features & OMAP##rev##_HAS_ ##flag;		\
+}									\
+
 /*
  * Runtime detection of OMAP3 features
  */
@@ -456,17 +462,11 @@ extern u32 omap3_features;
 #define OMAP3_HAS_ISP			BIT(4)
 #define OMAP3_HAS_192MHZ_CLK		BIT(5)
 
-#define OMAP3_HAS_FEATURE(feat,flag)			\
-static inline unsigned int omap3_has_ ##feat(void)	\
-{							\
-	return (omap3_features & OMAP3_HAS_ ##flag);	\
-}							\
-
-OMAP3_HAS_FEATURE(l2cache, L2CACHE)
-OMAP3_HAS_FEATURE(sgx, SGX)
-OMAP3_HAS_FEATURE(iva, IVA)
-OMAP3_HAS_FEATURE(neon, NEON)
-OMAP3_HAS_FEATURE(isp, ISP)
-OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
+OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
+OMAP_HAS_FEATURE(3, sgx, SGX)
+OMAP_HAS_FEATURE(3, iva, IVA)
+OMAP_HAS_FEATURE(3, neon, NEON)
+OMAP_HAS_FEATURE(3, isp, ISP)
+OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
 
 #endif
-- 
1.6.3.3


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

* [PATCH 5/6] omap: introduce OMAP_SHOW_FEATURE
  2010-05-23  3:36       ` [PATCH 4/6] omap: improve OMAP3_HAS_FEATURE Nishanth Menon
@ 2010-05-23  3:36         ` Nishanth Menon
  2010-05-23  3:36           ` [PATCH 6/6] omap: move generic omap3 features to generic Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

change OMAP3_SHOW_FEATURE into OMAP_SHOW_FEATURE to make the usage
generic.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/id.c              |   16 ++++++----------
 arch/arm/plat-omap/include/plat/cpu.h |    6 ++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index c7bf0e1..809e13a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -293,10 +293,6 @@ static void __init omap4_check_revision(void)
 	pr_err("Unknown OMAP4 CPU id\n");
 }
 
-#define OMAP3_SHOW_FEATURE(feat)		\
-	if (omap3_has_ ##feat())		\
-		printk(#feat" ");
-
 static void __init omap3_cpuinfo(void)
 {
 	u8 rev = GET_OMAP_REVISION();
@@ -358,12 +354,12 @@ static void __init omap3_cpuinfo(void)
 	/* Print verbose information */
 	pr_info("%s ES%s (", cpu_name, cpu_rev);
 
-	OMAP3_SHOW_FEATURE(l2cache);
-	OMAP3_SHOW_FEATURE(iva);
-	OMAP3_SHOW_FEATURE(sgx);
-	OMAP3_SHOW_FEATURE(neon);
-	OMAP3_SHOW_FEATURE(isp);
-	OMAP3_SHOW_FEATURE(192mhz_clk);
+	OMAP_SHOW_FEATURE(3, l2cache);
+	OMAP_SHOW_FEATURE(3, iva);
+	OMAP_SHOW_FEATURE(3, sgx);
+	OMAP_SHOW_FEATURE(3, neon);
+	OMAP_SHOW_FEATURE(3, isp);
+	OMAP_SHOW_FEATURE(3, 192mhz_clk);
 
 	printk(")\n");
 }
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index c71dbf4..f8ecbc4 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -450,6 +450,12 @@ static inline unsigned int omap##rev##_has_ ##feat(void)		\
 	return omap##rev##_features & OMAP##rev##_HAS_ ##flag;		\
 }									\
 
+#define OMAP_SHOW_FEATURE(rev, feat)					\
+{									\
+	if (omap##rev##_has_ ##feat())					\
+		printk(#feat" ");					\
+}									\
+
 /*
  * Runtime detection of OMAP3 features
  */
-- 
1.6.3.3


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

* [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-23  3:36         ` [PATCH 5/6] omap: introduce OMAP_SHOW_FEATURE Nishanth Menon
@ 2010-05-23  3:36           ` Nishanth Menon
  2010-05-27 11:24             ` Venkatraman S
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-23  3:36 UTC (permalink / raw)
  Cc: Nishanth Menon, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley,
	Sanjeev Premi, Santosh Shilimkar, Senthilvadivu Gurusamy,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Vikram Pandita,
	Vishwanath S, linux-omap

sgx, iva, l2cache, sgx, neon, isp are generic features, make
them generic features, current OMAP3 detection mechanism
is still retained. 192Mhz is more specific OMAP3 feature
so it is retained as is

Cc: Tony Lindgren <tony@atomide.com>
Cc: Angelo Arrifano <miknix@gmail.com>
Cc: "Zebediah C. McClure" <zmc@lurian.net>
Cc: Alistair Buxton <a.j.buxton@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Vishwanath S <vishwa.s@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/id.c              |   20 ++++++++--------
 arch/arm/plat-omap/common.c           |    3 ++
 arch/arm/plat-omap/include/plat/cpu.h |   39 +++++++++++++++++++-------------
 3 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 809e13a..01555b6 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
 #define OMAP3_CHECK_FEATURE(status,feat)				\
 	if (((status & OMAP3_ ##feat## _MASK) 				\
 		>> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { 	\
-		omap3_features |= OMAP3_HAS_ ##feat;			\
+		omap_features |= OMAP_HAS_ ##feat;			\
 	}
 
 static void __init omap3_check_features(void)
@@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
 		/*
 		 * AM35xx devices
 		 */
-		if (omap3_has_sgx()) {
+		if (omap_has_sgx()) {
 			omap_revision = OMAP3517_REV(rev);
 			strcpy(cpu_name, "AM3517");
 		} else {
 			/* Already set in omap3_check_revision() */
 			strcpy(cpu_name, "AM3505");
 		}
-	} else if (omap3_has_iva() && omap3_has_sgx()) {
+	} else if (omap_has_iva() && omap_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		strcpy(cpu_name, "OMAP3430/3530");
-	} else if (omap3_has_iva()) {
+	} else if (omap_has_iva()) {
 		omap_revision = OMAP3525_REV(rev);
 		strcpy(cpu_name, "OMAP3525");
-	} else if (omap3_has_sgx()) {
+	} else if (omap_has_sgx()) {
 		omap_revision = OMAP3515_REV(rev);
 		strcpy(cpu_name, "OMAP3515");
 	} else {
@@ -354,11 +354,11 @@ static void __init omap3_cpuinfo(void)
 	/* Print verbose information */
 	pr_info("%s ES%s (", cpu_name, cpu_rev);
 
-	OMAP_SHOW_FEATURE(3, l2cache);
-	OMAP_SHOW_FEATURE(3, iva);
-	OMAP_SHOW_FEATURE(3, sgx);
-	OMAP_SHOW_FEATURE(3, neon);
-	OMAP_SHOW_FEATURE(3, isp);
+	OMAP_SHOW_FEATURE(, l2cache);
+	OMAP_SHOW_FEATURE(, iva);
+	OMAP_SHOW_FEATURE(, sgx);
+	OMAP_SHOW_FEATURE(, neon);
+	OMAP_SHOW_FEATURE(, isp);
 	OMAP_SHOW_FEATURE(3, 192mhz_clk);
 
 	printk(")\n");
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 459a45f..259adc7 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -81,6 +81,9 @@ const void *omap_get_var_config(u16 tag, size_t *len)
 }
 EXPORT_SYMBOL(omap_get_var_config);
 
+/* OMAP Generic features */
+u32 omap_features;
+
 void __init omap_check_revision()
 {
 #ifdef CONFIG_ARCH_OMAP1
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index f8ecbc4..3cc4947 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -331,14 +331,14 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_omap3517
 # define cpu_is_omap3430()		is_omap3430()
 # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\
-						(!omap3_has_iva()) &&	\
-						(!omap3_has_sgx()))
+						(!omap_has_iva()) &&	\
+						(!omap_has_sgx()))
 # define cpu_is_omap3515()		(cpu_is_omap3430() &&		\
-						(!omap3_has_iva()) &&	\
-						(omap3_has_sgx()))
+						(!omap_has_iva()) &&	\
+						(omap_has_sgx()))
 # define cpu_is_omap3525()		(cpu_is_omap3430() &&		\
-						(!omap3_has_sgx()) &&	\
-						(omap3_has_iva()))
+						(!omap_has_sgx()) &&	\
+						(omap_has_iva()))
 # define cpu_is_omap3530()		(cpu_is_omap3430())
 # define cpu_is_omap3505()		is_omap3505()
 # define cpu_is_omap3517()		is_omap3517()
@@ -457,22 +457,29 @@ static inline unsigned int omap##rev##_has_ ##feat(void)		\
 }									\
 
 /*
+ * Runtime detection of Generic OMAP features
+ */
+extern u32 omap_features;
+
+#define OMAP_HAS_L2CACHE		BIT(0)
+#define OMAP_HAS_IVA			BIT(1)
+#define OMAP_HAS_SGX			BIT(2)
+#define OMAP_HAS_NEON			BIT(3)
+#define OMAP_HAS_ISP			BIT(4)
+
+OMAP_HAS_FEATURE(, l2cache, L2CACHE)
+OMAP_HAS_FEATURE(, sgx, SGX)
+OMAP_HAS_FEATURE(, iva, IVA)
+OMAP_HAS_FEATURE(, neon, NEON)
+OMAP_HAS_FEATURE(, isp, ISP)
+
+/*
  * Runtime detection of OMAP3 features
  */
 extern u32 omap3_features;
 
-#define OMAP3_HAS_L2CACHE		BIT(0)
-#define OMAP3_HAS_IVA			BIT(1)
-#define OMAP3_HAS_SGX			BIT(2)
-#define OMAP3_HAS_NEON			BIT(3)
-#define OMAP3_HAS_ISP			BIT(4)
 #define OMAP3_HAS_192MHZ_CLK		BIT(5)
 
-OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
-OMAP_HAS_FEATURE(3, sgx, SGX)
-OMAP_HAS_FEATURE(3, iva, IVA)
-OMAP_HAS_FEATURE(3, neon, NEON)
-OMAP_HAS_FEATURE(3, isp, ISP)
 OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
 
 #endif
-- 
1.6.3.3


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

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-23  3:36           ` [PATCH 6/6] omap: move generic omap3 features to generic Nishanth Menon
@ 2010-05-27 11:24             ` Venkatraman S
  2010-05-27 16:21               ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Venkatraman S @ 2010-05-27 11:24 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: linux omap, Tony Lindgren, Angelo Arrifano, Zebediah C. McClure,
	Alistair Buxton, Paul Walmsley, Sanjeev Premi, Santosh Shilimkar,
	Senthilvadivu Gurusamy, Kevin Hilman, Tomi Valkeinen,
	Aaro Koskinen, Vikram Pandita, Vishwanath S

Nishanth Menon <nm@ti.com> wrote:
> sgx, iva, l2cache, sgx, neon, isp are generic features, make
> them generic features, current OMAP3 detection mechanism
> is still retained. 192Mhz is more specific OMAP3 feature
> so it is retained as is
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Angelo Arrifano <miknix@gmail.com>
> Cc: "Zebediah C. McClure" <zmc@lurian.net>
> Cc: Alistair Buxton <a.j.buxton@gmail.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Sanjeev Premi <premi@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
> Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
> Cc: Vikram Pandita <vikram.pandita@ti.com>
> Cc: Vishwanath S <vishwa.s@ti.com>
> Cc: linux-omap@vger.kernel.org
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  arch/arm/mach-omap2/id.c              |   20 ++++++++--------
>  arch/arm/plat-omap/common.c           |    3 ++
>  arch/arm/plat-omap/include/plat/cpu.h |   39 +++++++++++++++++++-------------
>  3 files changed, 36 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 809e13a..01555b6 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
>  #define OMAP3_CHECK_FEATURE(status,feat)                               \
>        if (((status & OMAP3_ ##feat## _MASK)                           \
>                >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {   \
> -               omap3_features |= OMAP3_HAS_ ##feat;                    \
> +               omap_features |= OMAP_HAS_ ##feat;                      \
>        }

"CHECK" sounds like a querying API, whereas the macro populates data.
Maybe UPDATE or SET ?

>  static void __init omap3_check_features(void)
> @@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
>                /*
>                 * AM35xx devices
>                 */
> -               if (omap3_has_sgx()) {
> +               if (omap_has_sgx()) {
>                        omap_revision = OMAP3517_REV(rev);
>                        strcpy(cpu_name, "AM3517");
>                } else {
>                        /* Already set in omap3_check_revision() */
>                        strcpy(cpu_name, "AM3505");
>                }
> -       } else if (omap3_has_iva() && omap3_has_sgx()) {
> +       } else if (omap_has_iva() && omap_has_sgx()) {
>                /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
>                strcpy(cpu_name, "OMAP3430/3530");
> -       } else if (omap3_has_iva()) {
> +       } else if (omap_has_iva()) {
>                omap_revision = OMAP3525_REV(rev);
>                strcpy(cpu_name, "OMAP3525");
> -       } else if (omap3_has_sgx()) {
> +       } else if (omap_has_sgx()) {
>                omap_revision = OMAP3515_REV(rev);
>                strcpy(cpu_name, "OMAP3515");
>        } else {
> @@ -354,11 +354,11 @@ static void __init omap3_cpuinfo(void)
>        /* Print verbose information */
>        pr_info("%s ES%s (", cpu_name, cpu_rev);
>
> -       OMAP_SHOW_FEATURE(3, l2cache);
> -       OMAP_SHOW_FEATURE(3, iva);
> -       OMAP_SHOW_FEATURE(3, sgx);
> -       OMAP_SHOW_FEATURE(3, neon);
> -       OMAP_SHOW_FEATURE(3, isp);
> +       OMAP_SHOW_FEATURE(, l2cache);
> +       OMAP_SHOW_FEATURE(, iva);
> +       OMAP_SHOW_FEATURE(, sgx);
> +       OMAP_SHOW_FEATURE(, neon);
> +       OMAP_SHOW_FEATURE(, isp);
>        OMAP_SHOW_FEATURE(3, 192mhz_clk);
>
>        printk(")\n");
> diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
> index 459a45f..259adc7 100644
> --- a/arch/arm/plat-omap/common.c
> +++ b/arch/arm/plat-omap/common.c
> @@ -81,6 +81,9 @@ const void *omap_get_var_config(u16 tag, size_t *len)
>  }
>  EXPORT_SYMBOL(omap_get_var_config);
>
> +/* OMAP Generic features */
> +u32 omap_features;
> +
>  void __init omap_check_revision()
>  {
>  #ifdef CONFIG_ARCH_OMAP1
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index f8ecbc4..3cc4947 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -331,14 +331,14 @@ IS_OMAP_TYPE(3517, 0x3517)
>  # undef cpu_is_omap3517
>  # define cpu_is_omap3430()             is_omap3430()
>  # define cpu_is_omap3503()             (cpu_is_omap3430() &&           \
> -                                               (!omap3_has_iva()) &&   \
> -                                               (!omap3_has_sgx()))
> +                                               (!omap_has_iva()) &&    \
> +                                               (!omap_has_sgx()))
>  # define cpu_is_omap3515()             (cpu_is_omap3430() &&           \
> -                                               (!omap3_has_iva()) &&   \
> -                                               (omap3_has_sgx()))
> +                                               (!omap_has_iva()) &&    \
> +                                               (omap_has_sgx()))
>  # define cpu_is_omap3525()             (cpu_is_omap3430() &&           \
> -                                               (!omap3_has_sgx()) &&   \
> -                                               (omap3_has_iva()))
> +                                               (!omap_has_sgx()) &&    \
> +                                               (omap_has_iva()))
>  # define cpu_is_omap3530()             (cpu_is_omap3430())
>  # define cpu_is_omap3505()             is_omap3505()
>  # define cpu_is_omap3517()             is_omap3517()
> @@ -457,22 +457,29 @@ static inline unsigned int omap##rev##_has_ ##feat(void)          \
>  }                                                                      \
>
>  /*
> + * Runtime detection of Generic OMAP features
> + */
> +extern u32 omap_features;
> +
> +#define OMAP_HAS_L2CACHE               BIT(0)
> +#define OMAP_HAS_IVA                   BIT(1)
> +#define OMAP_HAS_SGX                   BIT(2)
> +#define OMAP_HAS_NEON                  BIT(3)
> +#define OMAP_HAS_ISP                   BIT(4)
> +
> +OMAP_HAS_FEATURE(, l2cache, L2CACHE)
> +OMAP_HAS_FEATURE(, sgx, SGX)
> +OMAP_HAS_FEATURE(, iva, IVA)
> +OMAP_HAS_FEATURE(, neon, NEON)
> +OMAP_HAS_FEATURE(, isp, ISP)
> +
> +/*
>  * Runtime detection of OMAP3 features
>  */
>  extern u32 omap3_features;
>
> -#define OMAP3_HAS_L2CACHE              BIT(0)
> -#define OMAP3_HAS_IVA                  BIT(1)
> -#define OMAP3_HAS_SGX                  BIT(2)
> -#define OMAP3_HAS_NEON                 BIT(3)
> -#define OMAP3_HAS_ISP                  BIT(4)
>  #define OMAP3_HAS_192MHZ_CLK           BIT(5)
>
> -OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
> -OMAP_HAS_FEATURE(3, sgx, SGX)
> -OMAP_HAS_FEATURE(3, iva, IVA)
> -OMAP_HAS_FEATURE(3, neon, NEON)
> -OMAP_HAS_FEATURE(3, isp, ISP)
>  OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
>
>  #endif
> --

What about feature detection for OMAP2 and OMAP4 (similar to
omap3_check_features) ?
At least a dummy implementation with warning messages would be good,
so that they are not used without initialization.

Regards,
Venkat.
--
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] 15+ messages in thread

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-27 11:24             ` Venkatraman S
@ 2010-05-27 16:21               ` Nishanth Menon
  2010-05-31 16:06                 ` Venkatraman S
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-27 16:21 UTC (permalink / raw)
  To: S, Venkatraman
  Cc: linux omap, Tony Lindgren, Angelo Arrifano, Zebediah C. McClure,
	Alistair Buxton, Paul Walmsley, Premi, Sanjeev, Shilimkar,
	Santosh, Guruswamy, Senthilvadivu, Kevin Hilman, Tomi Valkeinen,
	Aaro Koskinen, Pandita, Vikram, S, Vishwanath

On 05/27/2010 01:24 PM, S, Venkatraman wrote:
> Nishanth Menon<nm@ti.com>  wrote:

[..]
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index 809e13a..01555b6 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
>> @@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
>>   #define OMAP3_CHECK_FEATURE(status,feat)                               \
>>         if (((status&  OMAP3_ ##feat## _MASK)                           \
>>                 >>  OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {   \
>> -               omap3_features |= OMAP3_HAS_ ##feat;                    \
>> +               omap_features |= OMAP_HAS_ ##feat;                      \
>>         }
>
> "CHECK" sounds like a querying API, whereas the macro populates data.
> Maybe UPDATE or SET ?
>
Depends on where you are looking at it from: overall it is checking the 
status bits from OMAP and deciding what features it has - this is 
specifically important for 35xx series of processors. it is indeed a 
check in that sense. if you look at it from features variable, yeah it 
is updating it, but the idea of usage of the Macro is: check in status 
if feature X is available.. which is what it does ;). btw, the intent of 
the current patch was not meant to rename CHECK_FEATURE as it was very 
OMAP3 specific ;)

>>   static void __init omap3_check_features(void)
>> @@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
>>                 /*
[...]

>> +OMAP_HAS_FEATURE(, l2cache, L2CACHE)
>> +OMAP_HAS_FEATURE(, sgx, SGX)
>> +OMAP_HAS_FEATURE(, iva, IVA)
>> +OMAP_HAS_FEATURE(, neon, NEON)
>> +OMAP_HAS_FEATURE(, isp, ISP)
>> +
>> +/*
>>   * Runtime detection of OMAP3 features
>>   */
>>   extern u32 omap3_features;
>>
>> -#define OMAP3_HAS_L2CACHE              BIT(0)
>> -#define OMAP3_HAS_IVA                  BIT(1)
>> -#define OMAP3_HAS_SGX                  BIT(2)
>> -#define OMAP3_HAS_NEON                 BIT(3)
>> -#define OMAP3_HAS_ISP                  BIT(4)
>>   #define OMAP3_HAS_192MHZ_CLK           BIT(5)
>>
>> -OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
>> -OMAP_HAS_FEATURE(3, sgx, SGX)
>> -OMAP_HAS_FEATURE(3, iva, IVA)
>> -OMAP_HAS_FEATURE(3, neon, NEON)
>> -OMAP_HAS_FEATURE(3, isp, ISP)
>>   OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
>>
>>   #endif
>> --
>
> What about feature detection for OMAP2 and OMAP4 (similar to
> omap3_check_features) ?
> At least a dummy implementation with warning messages would be good,
> so that they are not used without initialization.

there is no need for warning messages, they will return as feature not 
present. cpu.h is a common header and variable omap_features is in 
common.c, the check_feature and id.c has not set that bit, the variable 
will remain 0, hence omap_has_sgx() will return 0 unless someone enables 
that for lets say OMAP4 -> feel free to do it, as I mentioned in 0/6, 
this series was meant solely to reorganize and provide an infrastructure 
for further development.

Regards,
Nishanth Menon

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

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-27 16:21               ` Nishanth Menon
@ 2010-05-31 16:06                 ` Venkatraman S
  2010-05-31 17:09                   ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Venkatraman S @ 2010-05-31 16:06 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: linux omap, Tony Lindgren, Angelo Arrifano, Zebediah C. McClure,
	Alistair Buxton, Paul Walmsley, Premi, Sanjeev, Shilimkar,
	Santosh, Guruswamy, Senthilvadivu, Kevin Hilman, Tomi Valkeinen,
	Aaro Koskinen, Pandita, Vikram, S, Vishwanath

Nishanth Menon <nm@ti.com> wrote:
> On 05/27/2010 01:24 PM, S, Venkatraman wrote:
>>
>> Nishanth Menon<nm@ti.com>  wrote:
>
> [..]
>>>
>>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>>> index 809e13a..01555b6 100644
>>> --- a/arch/arm/mach-omap2/id.c
>>> +++ b/arch/arm/mach-omap2/id.c
>>> @@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
>>>  #define OMAP3_CHECK_FEATURE(status,feat)                               \
>>>        if (((status&  OMAP3_ ##feat## _MASK)                           \
>>>                >>  OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {   \
>>> -               omap3_features |= OMAP3_HAS_ ##feat;                    \
>>> +               omap_features |= OMAP_HAS_ ##feat;                      \
>>>        }
>>
>> "CHECK" sounds like a querying API, whereas the macro populates data.
>> Maybe UPDATE or SET ?
>>
> Depends on where you are looking at it from: overall it is checking the
> status bits from OMAP and deciding what features it has - this is
> specifically important for 35xx series of processors. it is indeed a check
> in that sense. if you look at it from features variable, yeah it is updating
> it, but the idea of usage of the Macro is: check in status if feature X is
> available.. which is what it does ;). btw, the intent of the current patch
> was not meant to rename CHECK_FEATURE as it was very OMAP3 specific ;)
>

It's ok.  I don't want to worry too much about the name.

>>>  static void __init omap3_check_features(void)
>>> @@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
>>>                /*
>
> [...]
>
>>> +OMAP_HAS_FEATURE(, l2cache, L2CACHE)
>>> +OMAP_HAS_FEATURE(, sgx, SGX)
>>> +OMAP_HAS_FEATURE(, iva, IVA)
>>> +OMAP_HAS_FEATURE(, neon, NEON)
>>> +OMAP_HAS_FEATURE(, isp, ISP)
>>> +
>>> +/*
>>>  * Runtime detection of OMAP3 features
>>>  */
>>>  extern u32 omap3_features;
>>>
>>> -#define OMAP3_HAS_L2CACHE              BIT(0)
>>> -#define OMAP3_HAS_IVA                  BIT(1)
>>> -#define OMAP3_HAS_SGX                  BIT(2)
>>> -#define OMAP3_HAS_NEON                 BIT(3)
>>> -#define OMAP3_HAS_ISP                  BIT(4)
>>>  #define OMAP3_HAS_192MHZ_CLK           BIT(5)
>>>
>>> -OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
>>> -OMAP_HAS_FEATURE(3, sgx, SGX)
>>> -OMAP_HAS_FEATURE(3, iva, IVA)
>>> -OMAP_HAS_FEATURE(3, neon, NEON)
>>> -OMAP_HAS_FEATURE(3, isp, ISP)
>>>  OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
>>>
>>>  #endif
>>> --
>>
>> What about feature detection for OMAP2 and OMAP4 (similar to
>> omap3_check_features) ?
>> At least a dummy implementation with warning messages would be good,
>> so that they are not used without initialization.
>
> there is no need for warning messages, they will return as feature not
> present. cpu.h is a common header and variable omap_features is in common.c,
> the check_feature and id.c has not set that bit, the variable will remain 0,
> hence omap_has_sgx() will return 0 unless someone enables that for lets say
> OMAP4 -> feel free to do it, as I mentioned in 0/6, this series was meant
> solely to reorganize and provide an infrastructure for further development.
>

I don't agree. The patch / series is about making them 'generic', where generic
is, to the minimum, "making the features exposed for major silicon versions".
If they are not usable beyond OMAP3, it's not generic.

[Apologies for the delayed reply, seem to have a delayed delivery issue]
-Venkat.
--
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] 15+ messages in thread

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-31 16:06                 ` Venkatraman S
@ 2010-05-31 17:09                   ` Nishanth Menon
  2010-05-31 18:46                     ` Venkatraman S
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-31 17:09 UTC (permalink / raw)
  To: Venkatraman S
  Cc: Nishanth Menon, linux omap, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley, Premi,
	Sanjeev, Shilimkar, Santosh, Guruswamy, Senthilvadivu,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Pandita, Vikram, S,
	Vishwanath

On 05/31/2010 07:06 PM, Venkatraman S wrote:
> Nishanth Menon<nm@ti.com>  wrote:
>> On 05/27/2010 01:24 PM, S, Venkatraman wrote:
>>>
>>> Nishanth Menon<nm@ti.com>    wrote:
>>
>> [..]
>>>>
>>>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>>>> index 809e13a..01555b6 100644
>>>> --- a/arch/arm/mach-omap2/id.c
>>>> +++ b/arch/arm/mach-omap2/id.c
>>>> @@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
>>>>   #define OMAP3_CHECK_FEATURE(status,feat)                               \
>>>>         if (((status&    OMAP3_ ##feat## _MASK)                           \
>>>>                 >>    OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {   \
>>>> -               omap3_features |= OMAP3_HAS_ ##feat;                    \
>>>> +               omap_features |= OMAP_HAS_ ##feat;                      \
>>>>         }
>>>
>>> "CHECK" sounds like a querying API, whereas the macro populates data.
>>> Maybe UPDATE or SET ?
>>>
>> Depends on where you are looking at it from: overall it is checking the
>> status bits from OMAP and deciding what features it has - this is
>> specifically important for 35xx series of processors. it is indeed a check
>> in that sense. if you look at it from features variable, yeah it is updating
>> it, but the idea of usage of the Macro is: check in status if feature X is
>> available.. which is what it does ;). btw, the intent of the current patch
>> was not meant to rename CHECK_FEATURE as it was very OMAP3 specific ;)
>>
>
> It's ok.  I don't want to worry too much about the name.
Thanks.
>
>>>>   static void __init omap3_check_features(void)
>>>> @@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
>>>>                 /*
>>
>> [...]
>>
>>>> +OMAP_HAS_FEATURE(, l2cache, L2CACHE)
>>>> +OMAP_HAS_FEATURE(, sgx, SGX)
>>>> +OMAP_HAS_FEATURE(, iva, IVA)
>>>> +OMAP_HAS_FEATURE(, neon, NEON)
>>>> +OMAP_HAS_FEATURE(, isp, ISP)
>>>> +
>>>> +/*
>>>>   * Runtime detection of OMAP3 features
>>>>   */
>>>>   extern u32 omap3_features;
>>>>
>>>> -#define OMAP3_HAS_L2CACHE              BIT(0)
>>>> -#define OMAP3_HAS_IVA                  BIT(1)
>>>> -#define OMAP3_HAS_SGX                  BIT(2)
>>>> -#define OMAP3_HAS_NEON                 BIT(3)
>>>> -#define OMAP3_HAS_ISP                  BIT(4)
>>>>   #define OMAP3_HAS_192MHZ_CLK           BIT(5)
>>>>
>>>> -OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
>>>> -OMAP_HAS_FEATURE(3, sgx, SGX)
>>>> -OMAP_HAS_FEATURE(3, iva, IVA)
>>>> -OMAP_HAS_FEATURE(3, neon, NEON)
>>>> -OMAP_HAS_FEATURE(3, isp, ISP)
>>>>   OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
>>>>
>>>>   #endif
>>>> --
>>>
>>> What about feature detection for OMAP2 and OMAP4 (similar to
>>> omap3_check_features) ?
>>> At least a dummy implementation with warning messages would be good,
>>> so that they are not used without initialization.
>>
>> there is no need for warning messages, they will return as feature not
>> present. cpu.h is a common header and variable omap_features is in common.c,
>> the check_feature and id.c has not set that bit, the variable will remain 0,
>> hence omap_has_sgx() will return 0 unless someone enables that for lets say
>> OMAP4 ->  feel free to do it, as I mentioned in 0/6, this series was meant
>> solely to reorganize and provide an infrastructure for further development.
>>
>
> I don't agree. The patch / series is about making them 'generic', where generic
> is, to the minimum, "making the features exposed for major silicon versions".
> If they are not usable beyond OMAP3, it's not generic.
>
Which part is not generic? I am unable to comprehend your contention 
here. Are you contending that ISP, l2cache, neon, isp are *not* generic 
OMAP features? or are you contending that since I did not add the 
OMAP2,4 logic to detect the same, this patch is not valid?
all silicon revisions CAN use the function omap_has_sgx() now, even 
though I have not added detection logic to actually populate the same. 
if you do have a patch for detecting actual OMAP4/2 features feel free 
to add to the patch list, I am more than happy to ack them, if they look 
good - I personally dont have a omap4 platform at the very moment to 
write and post a patch - however trivial it may be.

Regards,
Nishanth Menon

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

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-31 17:09                   ` Nishanth Menon
@ 2010-05-31 18:46                     ` Venkatraman S
  2010-05-31 19:18                       ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Venkatraman S @ 2010-05-31 18:46 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Nishanth Menon, linux omap, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley, Premi,
	Sanjeev, Shilimkar, Santosh, Guruswamy, Senthilvadivu,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Pandita, Vikram, S,
	Vishwanath

Nishanth Menon <menon.nishanth@gmail.com> wrote:
> On 05/31/2010 07:06 PM, Venkatraman S wrote:
>>
>> Nishanth Menon<nm@ti.com>  wrote:
>>>
>>> On 05/27/2010 01:24 PM, S, Venkatraman wrote:
>>>>
>>>> Nishanth Menon<nm@ti.com>    wrote:
>>>
>>> [..]
>>>>>
>>>>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>>>>> index 809e13a..01555b6 100644
>>>>> --- a/arch/arm/mach-omap2/id.c
>>>>> +++ b/arch/arm/mach-omap2/id.c
>>>>> @@ -161,7 +161,7 @@ static void __init omap24xx_check_revision(void)
>>>>>  #define OMAP3_CHECK_FEATURE(status,feat)
>>>>> \
>>>>>        if (((status&    OMAP3_ ##feat## _MASK)
>>>>>   \
>>>>>                >>    OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {
>>>>>   \
>>>>> -               omap3_features |= OMAP3_HAS_ ##feat;
>>>>>  \
>>>>> +               omap_features |= OMAP_HAS_ ##feat;
>>>>>  \
>>>>>        }
>>>>
>>>> "CHECK" sounds like a querying API, whereas the macro populates data.
>>>> Maybe UPDATE or SET ?
>>>>
>>> Depends on where you are looking at it from: overall it is checking the
>>> status bits from OMAP and deciding what features it has - this is
>>> specifically important for 35xx series of processors. it is indeed a
>>> check
>>> in that sense. if you look at it from features variable, yeah it is
>>> updating
>>> it, but the idea of usage of the Macro is: check in status if feature X
>>> is
>>> available.. which is what it does ;). btw, the intent of the current
>>> patch
>>> was not meant to rename CHECK_FEATURE as it was very OMAP3 specific ;)
>>>
>>
>> It's ok.  I don't want to worry too much about the name.
>
> Thanks.
>>
>>>>>  static void __init omap3_check_features(void)
>>>>> @@ -310,20 +310,20 @@ static void __init omap3_cpuinfo(void)
>>>>>                /*
>>>
>>> [...]
>>>
>>>>> +OMAP_HAS_FEATURE(, l2cache, L2CACHE)
>>>>> +OMAP_HAS_FEATURE(, sgx, SGX)
>>>>> +OMAP_HAS_FEATURE(, iva, IVA)
>>>>> +OMAP_HAS_FEATURE(, neon, NEON)
>>>>> +OMAP_HAS_FEATURE(, isp, ISP)
>>>>> +
>>>>> +/*
>>>>>  * Runtime detection of OMAP3 features
>>>>>  */
>>>>>  extern u32 omap3_features;
>>>>>
>>>>> -#define OMAP3_HAS_L2CACHE              BIT(0)
>>>>> -#define OMAP3_HAS_IVA                  BIT(1)
>>>>> -#define OMAP3_HAS_SGX                  BIT(2)
>>>>> -#define OMAP3_HAS_NEON                 BIT(3)
>>>>> -#define OMAP3_HAS_ISP                  BIT(4)
>>>>>  #define OMAP3_HAS_192MHZ_CLK           BIT(5)
>>>>>
>>>>> -OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
>>>>> -OMAP_HAS_FEATURE(3, sgx, SGX)
>>>>> -OMAP_HAS_FEATURE(3, iva, IVA)
>>>>> -OMAP_HAS_FEATURE(3, neon, NEON)
>>>>> -OMAP_HAS_FEATURE(3, isp, ISP)
>>>>>  OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)
>>>>>
>>>>>  #endif
>>>>> --
>>>>
>>>> What about feature detection for OMAP2 and OMAP4 (similar to
>>>> omap3_check_features) ?
>>>> At least a dummy implementation with warning messages would be good,
>>>> so that they are not used without initialization.
>>>
>>> there is no need for warning messages, they will return as feature not
>>> present. cpu.h is a common header and variable omap_features is in
>>> common.c,
>>> the check_feature and id.c has not set that bit, the variable will remain
>>> 0,
>>> hence omap_has_sgx() will return 0 unless someone enables that for lets
>>> say
>>> OMAP4 ->  feel free to do it, as I mentioned in 0/6, this series was
>>> meant
>>> solely to reorganize and provide an infrastructure for further
>>> development.
>>>
>>
>> I don't agree. The patch / series is about making them 'generic', where
>> generic
>> is, to the minimum, "making the features exposed for major silicon
>> versions".
>> If they are not usable beyond OMAP3, it's not generic.
>>
> Which part is not generic? I am unable to comprehend your contention here.
> Are you contending that ISP, l2cache, neon, isp are *not* generic OMAP
> features? or are you contending that since I did not add the OMAP2,4 logic
> to detect the same, this patch is not valid?
> all silicon revisions CAN use the function omap_has_sgx() now, even though I
> have not added detection logic to actually populate the same. if you do have
> a patch for detecting actual OMAP4/2 features feel free to add to the patch
> list, I am more than happy to ack them, if they look good - I personally
> dont have a omap4 platform at the very moment to write and post a patch -
> however trivial it may be.
>

It is this..
> or are you contending that since I did not add the OMAP2,4 logic
> to detect the same, this patch is not valid?

I understand that you might not have all platforms to test with, but
let's not provide a
'generic feature api' without it being available for the supported platforms.
It's incomplete without it.

Regards,
Venkat.
--
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] 15+ messages in thread

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-31 18:46                     ` Venkatraman S
@ 2010-05-31 19:18                       ` Nishanth Menon
  2010-06-01  5:34                         ` Venkatraman S
  0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2010-05-31 19:18 UTC (permalink / raw)
  To: S, Venkatraman
  Cc: Nishanth Menon, linux omap, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley, Premi,
	Sanjeev, Shilimkar, Santosh, Guruswamy, Senthilvadivu,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Pandita, Vikram, S,
	Vishwanath

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

On 05/31/2010 09:46 PM, S, Venkatraman wrote:
> I understand that you might not have all platforms to test with, but
> let's not provide a
> 'generic feature api' without it being available for the supported platforms.
> It's incomplete without it.
well.. if you did read 0/6
http://marc.info/?l=linux-omap&m=127458581708411&w=2
"Caveat: this series just introduces the framework by reorganizing
the existing data, it does not attempt to define what the features
for OMAP1,2,3,4 would be. As usual, comments are welcome.
"
:) anyways, these are how the three follow on patches will look like 
(sample omap1,2,4 patches are attached), feel free to ack them after 
testing - but this patch 6/6 needs to be done prior to the remaining 
being added - that is one more reason why i stopped where I did.

Feel free to modify to rectify my patches and post good ones, as you 
see, you will need to do 6/6 before doing anything further anyways..

Regards,
Nishanth Menon

[-- Attachment #2: 0001-id-omap-introduce-omap4-feature.patch --]
[-- Type: text/x-patch, Size: 1227 bytes --]

>From a4f7d23139f8ccfc6b0e910017a759faa0d59578 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Mon, 31 May 2010 14:03:28 -0500
Subject: [PATCH 1/3] omap: id: introduce omap4 feature

introduce basic omap4 feature framework

Signed-off-by: Nishanth Menon <nm@ti.com>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap2/id.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 01555b6..e3f5994 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -267,6 +267,19 @@ static void __init omap3_check_revision(void)
 	}
 }
 
+static void __init omap4_check_features(void)
+{
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	if (cpu_is_omap4430())
+		omap_features |= OMAP_HAS_L2CACHE |
+			OMAP_HAS_IVA |
+			OMAP_HAS_SGX |
+			OMAP_HAS_NEON;
+}
+
 static void __init omap4_check_revision(void)
 {
 	u32 idcode;
@@ -382,6 +395,7 @@ void __init omap2_check_revision(void)
 		return;
 	} else if (cpu_is_omap44xx()) {
 		omap4_check_revision();
+		omap4_check_features();
 		return;
 	} else {
 		pr_err("OMAP revision unknown, please fix!\n");
-- 
1.6.3.3


[-- Attachment #3: 0002-omap-id-introduce-omap24xx-generic-features.patch --]
[-- Type: text/x-patch, Size: 1314 bytes --]

>From 0e4c9df9870c29da19234a1f4be5227a289b6463 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Mon, 31 May 2010 14:10:31 -0500
Subject: [PATCH 2/3] omap: id: introduce omap24xx generic features

introduce generic features for omap2. omap2 uses mbx, not sgx, and
it still has a dsp, though not iva2 as omap3 uses..

Signed-off-by: Nishanth Menon <nm@ti.com>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap2/id.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f5994..fe634dd 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -102,6 +102,16 @@ static struct omap_id omap_ids[] __initdata = {
 static void __iomem *tap_base;
 static u16 tap_prod_id;
 
+static void __init omap24xx_check_features(void)
+{
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	omap_features |= OMAP_HAS_L2CACHE |
+		OMAP_HAS_IVA;
+}
+
 static void __init omap24xx_check_revision(void)
 {
 	int i, j;
@@ -388,6 +398,7 @@ void __init omap2_check_revision(void)
 	 */
 	if (cpu_is_omap24xx()) {
 		omap24xx_check_revision();
+		omap24xx_check_features();
 	} else if (cpu_is_omap34xx()) {
 		omap3_check_revision();
 		omap3_check_features();
-- 
1.6.3.3


[-- Attachment #4: 0003-omap-id-add-feature-check-for-omap1.patch --]
[-- Type: text/x-patch, Size: 942 bytes --]

>From c297e29bfd27c373af8d9bdc428f72cad2ef4e7a Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Mon, 31 May 2010 14:13:57 -0500
Subject: [PATCH 3/3] omap: id: add feature check for omap1

add a minimalist feature - l2cache for omap1.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap1/id.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 91dbb71..b98a17f 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -200,5 +200,11 @@ void __init omap1_check_revision(void)
 	printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
 	       die_rev, omap_revision & 0xff, system_serial_low,
 	       system_serial_high);
+
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	omap_features |= OMAP_HAS_L2CACHE;
 }
 
-- 
1.6.3.3


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

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-05-31 19:18                       ` Nishanth Menon
@ 2010-06-01  5:34                         ` Venkatraman S
  2010-06-01  6:23                           ` Nishanth Menon
  0 siblings, 1 reply; 15+ messages in thread
From: Venkatraman S @ 2010-06-01  5:34 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Nishanth Menon, linux omap, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley, Premi,
	Sanjeev, Shilimkar, Santosh, Guruswamy, Senthilvadivu,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Pandita, Vikram, S,
	Vishwanath

On Tue, Jun 1, 2010 at 12:48 AM, Nishanth Menon <nm@ti.com> wrote:
> On 05/31/2010 09:46 PM, S, Venkatraman wrote:
>>
>> I understand that you might not have all platforms to test with, but
>> let's not provide a
>> 'generic feature api' without it being available for the supported
>> platforms.
>> It's incomplete without it.
>
> well.. if you did read 0/6
> http://marc.info/?l=linux-omap&m=127458581708411&w=2
> "Caveat: this series just introduces the framework by reorganizing
> the existing data, it does not attempt to define what the features
> for OMAP1,2,3,4 would be. As usual, comments are welcome.
> "

I did see this. My point was the 6/6 claims to do $foo (where $foo=
make it generic)
doesn't fit with a caveat description (My patch doesn't do $foo)

> :) anyways, these are how the three follow on patches will look like (sample
> omap1,2,4 patches are attached), feel free to ack them after testing - but
> this patch 6/6 needs to be done prior to the remaining being added - that is
> one more reason why i stopped where I did.

If you can post them formally as part of the series, I can test and
ack them (with OMAP3, OMAP4)
My original comment was even if these were not implemented due to some
constraints, they should be
mentioned in the code (as TODO / FIXME etc). The caveat description is
not going to show up in
commit logs or printks

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

* Re: [PATCH 6/6] omap: move generic omap3 features to generic
  2010-06-01  5:34                         ` Venkatraman S
@ 2010-06-01  6:23                           ` Nishanth Menon
  0 siblings, 0 replies; 15+ messages in thread
From: Nishanth Menon @ 2010-06-01  6:23 UTC (permalink / raw)
  To: Venkatraman S
  Cc: Nishanth Menon, linux omap, Tony Lindgren, Angelo Arrifano,
	Zebediah C. McClure, Alistair Buxton, Paul Walmsley, Premi,
	Sanjeev, Shilimkar, Santosh, Guruswamy, Senthilvadivu,
	Kevin Hilman, Tomi Valkeinen, Aaro Koskinen, Pandita, Vikram, S,
	Vishwanath

On 06/01/2010 08:34 AM, Venkatraman S wrote:
> If you can post them formally as part of the series, I can test and
> ack them (with OMAP3, OMAP4)
> My original comment was even if these were not implemented due to some
> constraints, they should be
> mentioned in the code (as TODO / FIXME etc). The caveat description is
> not going to show up in
> commit logs or printks
okie.. the 3 RFC patches following to the list.
Regards,
Nishanth Menon

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

end of thread, other threads:[~2010-06-01  6:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-23  3:36 [PATCH 0/6] introduce generic OMAP SOC features Nishanth Menon
2010-05-23  3:36 ` [PATCH 1/6] omap1: rename check_revision Nishanth Menon
2010-05-23  3:36   ` [PATCH 2/6] omap2/3: id: fix sparse warning Nishanth Menon
2010-05-23  3:36     ` [PATCH 3/6] omap: generic: introduce a single check_revision Nishanth Menon
2010-05-23  3:36       ` [PATCH 4/6] omap: improve OMAP3_HAS_FEATURE Nishanth Menon
2010-05-23  3:36         ` [PATCH 5/6] omap: introduce OMAP_SHOW_FEATURE Nishanth Menon
2010-05-23  3:36           ` [PATCH 6/6] omap: move generic omap3 features to generic Nishanth Menon
2010-05-27 11:24             ` Venkatraman S
2010-05-27 16:21               ` Nishanth Menon
2010-05-31 16:06                 ` Venkatraman S
2010-05-31 17:09                   ` Nishanth Menon
2010-05-31 18:46                     ` Venkatraman S
2010-05-31 19:18                       ` Nishanth Menon
2010-06-01  5:34                         ` Venkatraman S
2010-06-01  6:23                           ` Nishanth Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.