From patchwork Mon Oct 7 13:19:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2997071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6F66FBF924 for ; Mon, 7 Oct 2013 13:20:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8D3B201DE for ; Mon, 7 Oct 2013 13:20:43 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6956E201BB for ; Mon, 7 Oct 2013 13:20:42 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTAjm-0004s9-25; Mon, 07 Oct 2013 13:20:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTAjj-0003rP-52; Mon, 07 Oct 2013 13:20:35 +0000 Received: from mail-we0-f169.google.com ([74.125.82.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTAjg-0003qw-Jj for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2013 13:20:33 +0000 Received: by mail-we0-f169.google.com with SMTP id q58so1875322wes.14 for ; Mon, 07 Oct 2013 06:20:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/0pSPZdEojMHyK88NMS+jrd4uCnox2zvnDAb2abizdo=; b=cr/wjRE7YtMnzrC6eed3XrqccMEDGKM7KbwUN03Qdm8wegVoUbEnYJ1GS3A68SpYfl aKhc49y5PokxOkxM3JF6RQCWXyzTJIOu238vrGbM8IaGSz+JxZFhfzGJH4japKl4Te3+ ZoFFdWVcKx4/SurWbOv6OE6nc7Ea6JSrA1ve5Cp2Yh5XRMe30STQH6mEVx+FRphOMW3n bIE6rkziC8SMUog7zldRiWVGmRyLdphurlpSmDiUCaJg+jV+nMtyda/l1nhAPTRWxNHi rgXuxXXufN1+3uqKcUrMqQj/F2mlWC4hLbp+LdLQO7OeIJxXt6iw8GVjUIvA6p7m91U2 raag== X-Gm-Message-State: ALoCoQnTyMHkS/+qv+pHhP40SBo0su/djzJuVyHfWwHbg08HyUMIV05iLdr7P3dNhmc4vjuBCEKf X-Received: by 10.194.5.35 with SMTP id p3mr1874017wjp.47.1381152009241; Mon, 07 Oct 2013 06:20:09 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id c13sm8569767wib.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 07 Oct 2013 06:20:08 -0700 (PDT) From: Linus Walleij To: arm@kernel.org Subject: [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP Date: Mon, 7 Oct 2013 15:19:53 +0200 Message-Id: <1381151993-5450-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131007_092032_766057_7B344E9D X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -2.6 (--) Cc: Russell King , Linus Walleij , Rob Herring , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes a long-standing Integrator/CP regression from commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e "ARM: integrator-cp: convert use CLKSRC_OF for timer init" When this code was introduced, the both aliases pointing the system to use timer1 as primary (clocksource) and timer2 as secondary (clockevent) was ignored, and the system would simply use the first two timers found as clocksource and clockevent. However this made the system timeline accelerate by a factor x25, as it turns out that the way the clocking actually works (totally undocumented and found after some trial-and-error) is that timer0 runs @ 25MHz and timer1 and timer2 runs @ 1MHz. Presumably this divider setting is a boot-on default and configurable albeit the way to configure it is not documented. So as a quick fix to the problem, let's mark timer0 as disabled, so the code will chose timer1 and timer2 as it used to. This also deletes the two aliases for the primary and secondary timer as they have been superceded by the auto-selection Cc: stable@vger.kernel.org Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij --- ARM SoC folks: can you please apply this directly for fixes if noone complains? Thanks. --- arch/arm/boot/dts/integratorcp.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts index ff1aea0..72693a6 100644 --- a/arch/arm/boot/dts/integratorcp.dts +++ b/arch/arm/boot/dts/integratorcp.dts @@ -9,11 +9,6 @@ model = "ARM Integrator/CP"; compatible = "arm,integrator-cp"; - aliases { - arm,timer-primary = &timer2; - arm,timer-secondary = &timer1; - }; - chosen { bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; }; @@ -24,14 +19,18 @@ }; timer0: timer@13000000 { + /* TIMER0 runs @ 25MHz */ compatible = "arm,integrator-cp-timer"; + status = "disabled"; }; timer1: timer@13000100 { + /* TIMER1 runs @ 1MHz */ compatible = "arm,integrator-cp-timer"; }; timer2: timer@13000200 { + /* TIMER2 runs @ 1MHz */ compatible = "arm,integrator-cp-timer"; };