From patchwork Fri Nov 30 17:45:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 1826141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1DD1540E12 for ; Fri, 30 Nov 2012 17:49:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TeUfc-0002FP-JV; Fri, 30 Nov 2012 17:46:36 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TeUfQ-0002E4-7h for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2012 17:46:25 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 30 Nov 2012 17:46:22 +0000 Received: from localhost.localdomain ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 30 Nov 2012 17:46:20 +0000 From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/10] arm: arch_timer: remove redundant available check Date: Fri, 30 Nov 2012 17:45:59 +0000 Message-Id: <1354297568-26366-2-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1354297568-26366-1-git-send-email-mark.rutland@arm.com> References: <1354297568-26366-1-git-send-email-mark.rutland@arm.com> X-OriginalArrivalTime: 30 Nov 2012 17:46:20.0540 (UTC) FILETIME=[9B53A3C0:01CDCF22] X-MC-Unique: 112113017462219701 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121130_124624_537198_33D0E89E X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [91.220.42.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mark Rutland X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This check is a holdover from the pre-devicetree days. As the timer is not probed except by platforms which register it via devicetree, it's not strictly necessary. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier --- arch/arm/kernel/arch_timer.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c index c8ef207..a4d3b5c 100644 --- a/arch/arm/kernel/arch_timer.c +++ b/arch/arm/kernel/arch_timer.c @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include static unsigned long arch_timer_rate; @@ -259,20 +257,10 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk) return 0; } -/* Is the optional system timer available? */ -static int local_timer_is_architected(void) -{ - return (cpu_architecture() >= CPU_ARCH_ARMv7) && - ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1; -} - static int arch_timer_available(void) { unsigned long freq; - if (!local_timer_is_architected()) - return -ENXIO; - if (arch_timer_rate == 0) { freq = arch_timer_reg_read(ARCH_TIMER_PHYS_ACCESS, ARCH_TIMER_REG_FREQ);