From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Subject: [PATCH 4/6] omap: improve OMAP3_HAS_FEATURE Date: Sat, 22 May 2010 22:36:37 -0500 Message-ID: <1274585799-16226-5-git-send-email-nm@ti.com> References: <1274585799-16226-1-git-send-email-nm@ti.com> <1274585799-16226-2-git-send-email-nm@ti.com> <1274585799-16226-3-git-send-email-nm@ti.com> <1274585799-16226-4-git-send-email-nm@ti.com> Return-path: Received: from devils.ext.ti.com ([198.47.26.153]:39313 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754444Ab0EWDgv (ORCPT ); Sat, 22 May 2010 23:36:51 -0400 In-Reply-To: <1274585799-16226-4-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org Cc: Nishanth Menon , Tony Lindgren , Angelo Arrifano , "Zebediah C. McClure" , Alistair Buxton , Paul Walmsley , Sanjeev Premi , Santosh Shilimkar , Senthilvadivu Gurusamy , Kevin Hilman , Tomi Valkeinen , Aaro Koskinen , Vikram Pandita , Vishwanath S , linux-omap@vger.kernel.org Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing us to support multiple chip features Cc: Tony Lindgren Cc: Angelo Arrifano Cc: "Zebediah C. McClure" Cc: Alistair Buxton Cc: Paul Walmsley Cc: Sanjeev Premi Cc: Santosh Shilimkar Cc: Senthilvadivu Gurusamy Cc: Kevin Hilman Cc: Tomi Valkeinen Cc: Aaro Koskinen Cc: Vikram Pandita Cc: Vishwanath S Cc: linux-omap@vger.kernel.org Signed-off-by: Nishanth Menon --- 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