From patchwork Tue Dec 14 06:34:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 408941 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBE6ZdWF009825 for ; Tue, 14 Dec 2010 06:35:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754168Ab0LNGfb (ORCPT ); Tue, 14 Dec 2010 01:35:31 -0500 Received: from utopia.booyaka.com ([72.9.107.138]:50300 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753912Ab0LNGf2 (ORCPT ); Tue, 14 Dec 2010 01:35:28 -0500 Received: (qmail 13983 invoked by uid 1019); 14 Dec 2010 06:35:27 -0000 MBOX-Line: From nobody Mon Dec 13 23:34:55 2010 Subject: [PATCH 12/12] OMAP1: clock_data: use runtime cpu / machine checks To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Paul Walmsley Cc: Janusz Krzysztofik Date: Mon, 13 Dec 2010 23:34:55 -0700 Message-ID: <20101214063454.21555.37831.stgit@twilight.localdomain> In-Reply-To: <20101214063308.21555.76050.stgit@twilight.localdomain> References: <20101214063308.21555.76050.stgit@twilight.localdomain> 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 (demeter1.kernel.org [140.211.167.41]); Tue, 14 Dec 2010 06:35:58 +0000 (UTC) diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 423d21d..c7c2a52 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c @@ -823,12 +823,10 @@ int __init omap1_clk_init(void) crystal_type = info->system_clock_type; } -#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) - ck_ref.rate = 13000000; -#elif defined(CONFIG_ARCH_OMAP16XX) - if (crystal_type == 2) + if (cpu_is_omap7xx()) + ck_ref.rate = 13000000; + if (cpu_is_omap16xx() && crystal_type == 2) ck_ref.rate = 19200000; -#endif pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: " "0x%04x\n", omap_readw(ARM_SYSST), omap_readw(DPLL_CTL), @@ -883,10 +881,11 @@ int __init omap1_clk_init(void) ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); -#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE) - /* Select slicer output as OMAP input clock */ - omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, OMAP7XX_PCC_UPLD_CTRL); -#endif + if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { + /* Select slicer output as OMAP input clock */ + omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, + OMAP7XX_PCC_UPLD_CTRL); + } /* Amstrad Delta wants BCLK high when inactive */ if (machine_is_ams_delta())