linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: nm@ti.com
Subject: [PATCH 3/5] omap: Replace omap3_has_ macros with omap_has_feature
Date: Thu, 08 Jul 2010 12:37:58 +0300	[thread overview]
Message-ID: <20100708093758.16352.93682.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100708093405.16352.11814.stgit@baageli.muru.com>

Replace omap3_has_ macros with omap_has_feature

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
 arch/arm/mach-omap2/id.c              |   22 +++++++++++-----------
 arch/arm/mach-omap2/pm34xx.c          |    2 +-
 arch/arm/plat-omap/include/plat/cpu.h |   12 ++++++------
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index c226798..2d2248f 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3435,7 +3435,7 @@ int __init omap3xxx_clk_init(void)
 		cpu_clkflg |= CK_3505;
 	}
 
-	if (omap3_has_192mhz_clk())
+	if (omap_has_feature(OMAP3_HAS_192MHZ_CLK))
 		omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
 
 	if (cpu_is_omap3630()) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index a2e5965..11184cf 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -336,7 +336,7 @@ static void __init omap4_check_revision(void)
 }
 
 #define OMAP3_SHOW_FEATURE(feat)		\
-	if (omap3_has_ ##feat())		\
+	if (omap_has_feature(feat))		\
 		printk(#feat" ");
 
 static void __init omap3_cpuinfo(void)
@@ -356,20 +356,20 @@ static void __init omap3_cpuinfo(void)
 		/*
 		 * AM35xx devices
 		 */
-		if (omap3_has_sgx()) {
+		if (omap_has_feature(OMAP3_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_feature(OMAP3_HAS_IVA | OMAP3_HAS_SGX)) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		strcpy(cpu_name, "OMAP3430/3530");
-	} else if (omap3_has_iva()) {
+	} else if (omap_has_feature(OMAP3_HAS_IVA)) {
 		omap_revision = OMAP3525_REV(rev);
 		strcpy(cpu_name, "OMAP3525");
-	} else if (omap3_has_sgx()) {
+	} else if (omap_has_feature(OMAP3_HAS_SGX)) {
 		omap_revision = OMAP3515_REV(rev);
 		strcpy(cpu_name, "OMAP3515");
 	} else {
@@ -400,12 +400,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);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_L2CACHE);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_IVA);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_SGX);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_NEON);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_ISP);
+	OMAP3_SHOW_FEATURE(OMAP3_HAS_192MHZ_CLK);
 
 	printk(")\n");
 }
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fb4994a..32e1005 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -385,7 +385,7 @@ void omap_sram_idle(void)
 	/* Enable IO-PAD and IO-CHAIN wakeups */
 	per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
 	core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
-	if (omap3_has_io_wakeup() && \
+	if (omap_has_feature(OMAP3_HAS_IO_WAKEUP) &&		\
 			(per_next_state < PWRDM_POWER_ON ||
 			core_next_state < PWRDM_POWER_ON)) {
 		prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 127df06..efee323 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -334,14 +334,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_feature(OMAP3_HAS_IVA) &&	\
+						(!omap_has_feature(OMAP3_HAS_SGX)))
 # define cpu_is_omap3515()		(cpu_is_omap3430() &&		\
-						(!omap3_has_iva()) &&	\
-						(omap3_has_sgx()))
+						(!omap_has_feature(OMAP3_HAS_IVA)) &&	\
+						(omap_has_feature(OMAP3_HAS_SGX)))
 # define cpu_is_omap3525()		(cpu_is_omap3430() &&		\
-						(!omap3_has_sgx()) &&	\
-						(omap3_has_iva()))
+						(!omap_has_feature(OMAP3_HAS_SGX)) &&	\
+						(omap_has_feature(OMAP3_HAS_IVA)))
 # define cpu_is_omap3530()		(cpu_is_omap3430())
 # define cpu_is_omap3505()		is_omap3505()
 # define cpu_is_omap3517()		is_omap3517()


  parent reply	other threads:[~2010-07-08  9:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08  9:37 [RFC 0/5] Introduce omap_has_feature Tony Lindgren
2010-07-08  9:37 ` [PATCH 1/5] omap2/3: id: fix sparse warning Tony Lindgren
2010-07-08  9:37 ` [PATCH 2/5] omap: Implement common omap_has_feature Tony Lindgren
2010-07-08 14:52   ` Nishanth Menon
2010-07-09  7:08     ` Tony Lindgren
2010-07-09 16:53       ` Nishanth Menon
2010-07-08  9:37 ` Tony Lindgren [this message]
2010-07-08 14:53   ` [PATCH 3/5] omap: Replace omap3_has_ macros with omap_has_feature Nishanth Menon
2010-07-08  9:38 ` [PATCH 4/5] omap: Remove old omap3_has_ macros Tony Lindgren
2010-07-08 14:54   ` Nishanth Menon
2010-07-08  9:38 ` [PATCH 5/5] omap: Allow testing for omap type with omap_has_feature Tony Lindgren
2010-07-08 15:03   ` Nishanth Menon
2010-07-08 16:15     ` Venkatraman S
2010-07-08 16:28       ` Nishanth Menon
2010-07-08 19:28         ` Venkatraman S
2010-07-08 19:37           ` Nishanth Menon
2010-07-09  7:04             ` Tony Lindgren
2010-07-09 16:53               ` 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=20100708093758.16352.93682.stgit@baageli.muru.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    /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).