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: 20858 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F68225DFC for ; Mon, 7 Oct 2013 13:20:11 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf12649757vcb.1 for ; Mon, 07 Oct 2013 06:20:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/0pSPZdEojMHyK88NMS+jrd4uCnox2zvnDAb2abizdo=; b=RTau3I/vBksSqJHJPlQe8WMGd7TVnv5lm3fEp6U/PXH5Lm4JVlHtJ2vNDoKBkRiRFV GOJKX+pXxEC6k2f6dtL1goGWAO4sTMaUwfa0oJ4RggTrse4ODHro6TzyERfLZ+awB9kX PwjKH5Mfkmhj8oaX0OgGvXsOPPLkIjS9+rsqazfUYrmmuXOxdNS+SN6xG+ayRBysQL+n L5awLLQi/cixvYDkTPeP00IxNO/V+aZt/sBkQhEWfNT+AzvkTBsDfeJjAm0Bcwszs688 n0XJGMvBa9cvnxRz1lU0cbLx6kUp7yNa/7yX0O4D+mZOQFcsLCgWYpJdVY4Qig1vHjAN mwFw== X-Received: by 10.236.6.134 with SMTP id 6mr27095586yhn.7.1381152010960; Mon, 07 Oct 2013 06:20:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.164 with SMTP id ll4ls2272130qeb.17.gmail; Mon, 07 Oct 2013 06:20:10 -0700 (PDT) X-Received: by 10.52.35.20 with SMTP id d20mr40614vdj.33.1381152010860; Mon, 07 Oct 2013 06:20:10 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id wp10si7767945vdb.32.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 06:20:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id h10so3357873vbh.20 for ; Mon, 07 Oct 2013 06:20:10 -0700 (PDT) X-Gm-Message-State: ALoCoQkcI4R7UDAKoYGmVW2nosY5mHHNjpbCfh0Nl82w9uc0pl6azmcBFTAhOZGwD+eK6LWkvYNy X-Received: by 10.59.11.69 with SMTP id eg5mr4211269ved.17.1381152010768; Mon, 07 Oct 2013 06:20:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp124712vcz; Mon, 7 Oct 2013 06:20:10 -0700 (PDT) X-Received: by 10.194.133.202 with SMTP id pe10mr1877320wjb.46.1381152009814; Mon, 07 Oct 2013 06:20:09 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id br19si8147847wib.83.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 06:20:09 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id n12so7224009wgh.27 for ; Mon, 07 Oct 2013 06:20:09 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , stable@vger.kernel.org, Rob Herring , Russell King 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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"; };