linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
Cc: Nishanth Menon <nm@ti.com>, Tony Lindgren <tony@atomide.com>,
	Angelo Arrifano <miknix@gmail.com>,
	"Zebediah C. McClure" <zmc@lurian.net>,
	Alistair Buxton <a.j.buxton@gmail.com>,
	Paul Walmsley <paul@pwsan.com>, Sanjeev Premi <premi@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Senthilvadivu Gurusamy <svadivu@ti.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Tomi Valkeinen <tomi.valkeinen@nokia.com>,
	Aaro Koskinen <aaro.koskinen@nokia.com>,
	Vikram Pandita <vikram.pandita@ti.com>,
	Vishwanath S <vishwa.s@ti.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH 5/6] omap: introduce OMAP_SHOW_FEATURE
Date: Sat, 22 May 2010 22:36:38 -0500	[thread overview]
Message-ID: <1274585799-16226-6-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1274585799-16226-5-git-send-email-nm@ti.com>

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


  reply	other threads:[~2010-05-23  3:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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         ` Nishanth Menon [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274585799-16226-6-git-send-email-nm@ti.com \
    --to=nm@ti.com \
    --cc=a.j.buxton@gmail.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=miknix@gmail.com \
    --cc=paul@pwsan.com \
    --cc=premi@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=svadivu@ti.com \
    --cc=tomi.valkeinen@nokia.com \
    --cc=tony@atomide.com \
    --cc=vikram.pandita@ti.com \
    --cc=vishwa.s@ti.com \
    --cc=zmc@lurian.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).