Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing
us to support multiple chip features
Cc: Tony Lindgren <[email protected]>
Cc: Angelo Arrifano <[email protected]>
Cc: "Zebediah C. McClure" <[email protected]>
Cc: Alistair Buxton <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Sanjeev Premi <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Senthilvadivu Gurusamy <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Aaro Koskinen <[email protected]>
Cc: Vikram Pandita <[email protected]>
Cc: Vishwanath S <[email protected]>
Cc: [email protected]
Signed-off-by: Nishanth Menon <[email protected]>
---
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)