From patchwork Mon May 10 13:49:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 98172 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4ADnbN7018436 for ; Mon, 10 May 2010 13:49:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754248Ab0EJNtg (ORCPT ); Mon, 10 May 2010 09:49:36 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:52339 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314Ab0EJNtf (ORCPT ); Mon, 10 May 2010 09:49:35 -0400 Received: by gwj19 with SMTP id 19so1910715gwj.19 for ; Mon, 10 May 2010 06:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jM0lRaiD4onjbLU/lI3So0CgNwv6QQUqJFeVOhyKKo8=; b=XyxbSfGu6srqazeqiR2EIG5BFI/xtlivtSt3BJS84Al4+SlTkecN6rgCVKNLUP0H02 TzYDYi5dkZ7CVpDJCuKjIQL4mBnvqCfAwNupjGw9GJcTu5PKjs4ocTivwW/kabx3H2kS mRSOQaGyfUyrtw1h7XVXbsTJiK//U702xlCcs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=w2U0KcrimiP7FJS/ShSzX0sNq0Uhw4hWPGMYgUAxSiVcE/dmmI1NjHMKnnRdlEB4No Oum+sS4NHq0rXsZkk+PY7pYjJYEUVV090fTlakPmK1Ikm7wlJddgd9zOISZbpSZkec5y tHg1n4Vaqky+Muj05zHrvutWp10EbL+mFab+Y= MIME-Version: 1.0 Received: by 10.231.161.75 with SMTP id q11mr2447473ibx.64.1273499374549; Mon, 10 May 2010 06:49:34 -0700 (PDT) Received: by 10.231.146.20 with HTTP; Mon, 10 May 2010 06:49:34 -0700 (PDT) Date: Mon, 10 May 2010 19:19:34 +0530 X-Google-Sender-Auth: 9df697eb85ddc43d Message-ID: Subject: [PATCH] update omap3 features bitmap and API to generic names From: Venkatraman S To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Nishanth Menon , Tony Lindgren Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 10 May 2010 13:49:38 +0000 (UTC) diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 9cba556..afa481d 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void) cpu_clkflg |= CK_3430ES2; } } - if (omap3_has_192mhz_clk()) + if (omap_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 37b8a1a..a095b87 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -28,7 +28,7 @@ static struct omap_chip_id omap_chip; static unsigned int omap_revision; -u32 omap3_features; +u32 omap_features; unsigned int omap_rev(void) { @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void) #define OMAP3_CHECK_FEATURE(status,feat) \ if (((status & OMAP3_ ##feat## _MASK) \ >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \ - omap3_features |= OMAP3_HAS_ ##feat; \ + omap_features |= OMAP_HAS_ ##feat; \ } void __init omap3_check_features(void) { u32 status; - omap3_features = 0; + omap_features = 0; status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS); @@ -178,7 +178,7 @@ void __init omap3_check_features(void) OMAP3_CHECK_FEATURE(status, NEON); OMAP3_CHECK_FEATURE(status, ISP); if (cpu_is_omap3630()) - omap3_features |= OMAP3_HAS_192MHZ_CLK; + omap_features |= OMAP_HAS_192MHZ_CLK; /* * TODO: Get additional info (where applicable) @@ -294,7 +294,7 @@ void __init omap4_check_revision(void) } #define OMAP3_SHOW_FEATURE(feat) \ - if (omap3_has_ ##feat()) \ + if (omap_has_ ##feat()) \ printk(#feat" "); void __init omap3_cpuinfo(void) @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void) /* * AM35xx devices */ - if (omap3_has_sgx()) { + if (omap_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_iva() && omap_has_sgx()) { /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ strcpy(cpu_name, "OMAP3430/3530"); - } else if (omap3_has_iva()) { + } else if (omap_has_iva()) { omap_revision = OMAP3525_REV(rev); strcpy(cpu_name, "OMAP3525"); - } else if (omap3_has_sgx()) { + } else if (omap_has_sgx()) { omap_revision = OMAP3515_REV(rev); strcpy(cpu_name, "OMAP3515"); } else { diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 7514174..80dc8e0 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci); void omap2_check_revision(void); /* - * Runtime detection of OMAP3 features + * Runtime detection of OMAP features */ -extern u32 omap3_features; +extern u32 omap_features; -#define OMAP3_HAS_L2CACHE BIT(0) -#define OMAP3_HAS_IVA BIT(1) -#define OMAP3_HAS_SGX BIT(2) -#define OMAP3_HAS_NEON BIT(3) -#define OMAP3_HAS_ISP BIT(4) -#define OMAP3_HAS_192MHZ_CLK BIT(5) +#define OMAP_HAS_L2CACHE BIT(0) +#define OMAP_HAS_IVA BIT(1) +#define OMAP_HAS_SGX BIT(2) +#define OMAP_HAS_NEON BIT(3) +#define OMAP_HAS_ISP BIT(4) +#define OMAP_HAS_192MHZ_CLK BIT(5) -#define OMAP3_HAS_FEATURE(feat,flag) \ -static inline unsigned int omap3_has_ ##feat(void) \ +#define OMAP_HAS_FEATURE(feat, flag) \ +static inline unsigned int omap_has_ ##feat(void) \ { \ - return (omap3_features & OMAP3_HAS_ ##flag); \ + return (omap_features & OMAP_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(l2cache, L2CACHE) +OMAP_HAS_FEATURE(sgx, SGX) +OMAP_HAS_FEATURE(iva, IVA) +OMAP_HAS_FEATURE(neon, NEON) +OMAP_HAS_FEATURE(isp, ISP) +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) #endif