[PATCH 4/6] omap: improve OMAP3_HAS_FEATURE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing
us to support multiple chip features

Cc: Tony Lindgren <tony@xxxxxxxxxxx>
Cc: Angelo Arrifano <miknix@xxxxxxxxx>
Cc: "Zebediah C. McClure" <zmc@xxxxxxxxxx>
Cc: Alistair Buxton <a.j.buxton@xxxxxxxxx>
Cc: Paul Walmsley <paul@xxxxxxxxx>
Cc: Sanjeev Premi <premi@xxxxxx>
Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
Cc: Senthilvadivu Gurusamy <svadivu@xxxxxx>
Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
Cc: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxx>
Cc: Aaro Koskinen <aaro.koskinen@xxxxxxxxx>
Cc: Vikram Pandita <vikram.pandita@xxxxxx>
Cc: Vishwanath S <vishwa.s@xxxxxx>
Cc: linux-omap@xxxxxxxxxxxxxxx

Signed-off-by: Nishanth Menon <nm@xxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux