Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing
us to support multiple chip features

Cc: Tony Lindgren <t...@atomide.com>
Cc: Angelo Arrifano <mik...@gmail.com>
Cc: "Zebediah C. McClure" <z...@lurian.net>
Cc: Alistair Buxton <a.j.bux...@gmail.com>
Cc: Paul Walmsley <p...@pwsan.com>
Cc: Sanjeev Premi <pr...@ti.com>
Cc: Santosh Shilimkar <santosh.shilim...@ti.com>
Cc: Senthilvadivu Gurusamy <svad...@ti.com>
Cc: Kevin Hilman <khil...@deeprootsystems.com>
Cc: Tomi Valkeinen <tomi.valkei...@nokia.com>
Cc: Aaro Koskinen <aaro.koski...@nokia.com>
Cc: Vikram Pandita <vikram.pand...@ti.com>
Cc: Vishwanath S <vishw...@ti.com>
Cc: linux-omap@vger.kernel.org

Signed-off-by: Nishanth Menon <n...@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

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

Reply via email to