From patchwork Thu Jul 8 09:37:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 110806 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o689c3rI005083 for ; Thu, 8 Jul 2010 09:38:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755662Ab0GHJiA (ORCPT ); Thu, 8 Jul 2010 05:38:00 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:53441 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755628Ab0GHJiA (ORCPT ); Thu, 8 Jul 2010 05:38:00 -0400 Received: from muru.com ([72.249.23.125] helo=baageli.muru.com) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1OWnYN-000IL3-Gt; Thu, 08 Jul 2010 09:37:59 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 72.249.23.125 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/gzzLVe3IJ2WsNn+lTDP7V Subject: [PATCH 3/5] omap: Replace omap3_has_ macros with omap_has_feature To: linux-omap@vger.kernel.org From: Tony Lindgren Cc: nm@ti.com Date: Thu, 08 Jul 2010 12:37:58 +0300 Message-ID: <20100708093758.16352.93682.stgit@baageli.muru.com> In-Reply-To: <20100708093405.16352.11814.stgit@baageli.muru.com> References: <20100708093405.16352.11814.stgit@baageli.muru.com> User-Agent: StGit/0.15 MIME-Version: 1.0 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]); Thu, 08 Jul 2010 09:38:04 +0000 (UTC) diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index c226798..2d2248f 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -3435,7 +3435,7 @@ int __init omap3xxx_clk_init(void) cpu_clkflg |= CK_3505; } - if (omap3_has_192mhz_clk()) + if (omap_has_feature(OMAP3_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 a2e5965..11184cf 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -336,7 +336,7 @@ static void __init omap4_check_revision(void) } #define OMAP3_SHOW_FEATURE(feat) \ - if (omap3_has_ ##feat()) \ + if (omap_has_feature(feat)) \ printk(#feat" "); static void __init omap3_cpuinfo(void) @@ -356,20 +356,20 @@ static void __init omap3_cpuinfo(void) /* * AM35xx devices */ - if (omap3_has_sgx()) { + if (omap_has_feature(OMAP3_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_feature(OMAP3_HAS_IVA | OMAP3_HAS_SGX)) { /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ strcpy(cpu_name, "OMAP3430/3530"); - } else if (omap3_has_iva()) { + } else if (omap_has_feature(OMAP3_HAS_IVA)) { omap_revision = OMAP3525_REV(rev); strcpy(cpu_name, "OMAP3525"); - } else if (omap3_has_sgx()) { + } else if (omap_has_feature(OMAP3_HAS_SGX)) { omap_revision = OMAP3515_REV(rev); strcpy(cpu_name, "OMAP3515"); } else { @@ -400,12 +400,12 @@ static void __init omap3_cpuinfo(void) /* Print verbose information */ pr_info("%s ES%s (", cpu_name, cpu_rev); - OMAP3_SHOW_FEATURE(l2cache); - OMAP3_SHOW_FEATURE(iva); - OMAP3_SHOW_FEATURE(sgx); - OMAP3_SHOW_FEATURE(neon); - OMAP3_SHOW_FEATURE(isp); - OMAP3_SHOW_FEATURE(192mhz_clk); + OMAP3_SHOW_FEATURE(OMAP3_HAS_L2CACHE); + OMAP3_SHOW_FEATURE(OMAP3_HAS_IVA); + OMAP3_SHOW_FEATURE(OMAP3_HAS_SGX); + OMAP3_SHOW_FEATURE(OMAP3_HAS_NEON); + OMAP3_SHOW_FEATURE(OMAP3_HAS_ISP); + OMAP3_SHOW_FEATURE(OMAP3_HAS_192MHZ_CLK); printk(")\n"); } diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fb4994a..32e1005 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -385,7 +385,7 @@ void omap_sram_idle(void) /* Enable IO-PAD and IO-CHAIN wakeups */ per_next_state = pwrdm_read_next_pwrst(per_pwrdm); core_next_state = pwrdm_read_next_pwrst(core_pwrdm); - if (omap3_has_io_wakeup() && \ + if (omap_has_feature(OMAP3_HAS_IO_WAKEUP) && \ (per_next_state < PWRDM_POWER_ON || core_next_state < PWRDM_POWER_ON)) { prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 127df06..efee323 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -334,14 +334,14 @@ IS_OMAP_TYPE(3517, 0x3517) # undef cpu_is_omap3517 # define cpu_is_omap3430() is_omap3430() # define cpu_is_omap3503() (cpu_is_omap3430() && \ - (!omap3_has_iva()) && \ - (!omap3_has_sgx())) + (!omap_has_feature(OMAP3_HAS_IVA) && \ + (!omap_has_feature(OMAP3_HAS_SGX))) # define cpu_is_omap3515() (cpu_is_omap3430() && \ - (!omap3_has_iva()) && \ - (omap3_has_sgx())) + (!omap_has_feature(OMAP3_HAS_IVA)) && \ + (omap_has_feature(OMAP3_HAS_SGX))) # define cpu_is_omap3525() (cpu_is_omap3430() && \ - (!omap3_has_sgx()) && \ - (omap3_has_iva())) + (!omap_has_feature(OMAP3_HAS_SGX)) && \ + (omap_has_feature(OMAP3_HAS_IVA))) # define cpu_is_omap3530() (cpu_is_omap3430()) # define cpu_is_omap3505() is_omap3505() # define cpu_is_omap3517() is_omap3517()