From patchwork Sun Dec 18 23:31:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 5849 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E17E723E18 for ; Sun, 18 Dec 2011 23:31:47 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id CF532A18321 for ; Sun, 18 Dec 2011 23:31:47 +0000 (UTC) Received: by eaac11 with SMTP id c11so1353322eaa.11 for ; Sun, 18 Dec 2011 15:31:47 -0800 (PST) Received: by 10.204.156.219 with SMTP id y27mr4303450bkw.125.1324251107541; Sun, 18 Dec 2011 15:31:47 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.40.4 with SMTP id i4cs110873bke; Sun, 18 Dec 2011 15:31:45 -0800 (PST) Received: by 10.14.29.132 with SMTP id i4mr3147148eea.32.1324251103624; Sun, 18 Dec 2011 15:31:43 -0800 (PST) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com. [207.126.144.131]) by mx.google.com with SMTP id w2si4222363eef.92.2011.12.18.15.31.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Dec 2011 15:31:43 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.131; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKTu5326iV/cneurMlILL11udNIrw3e1iL@postini.com; Sun, 18 Dec 2011 23:31:43 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6405A5C; Sun, 18 Dec 2011 23:31:15 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 11F2C3F; Sun, 18 Dec 2011 22:59:56 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 2AAAAA8065; Mon, 19 Dec 2011 00:31:19 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 19 Dec 2011 00:31:19 +0100 From: Linus Walleij To: Cc: Linus Walleij Subject: [PATCH] ux500: fix the smp_twd clock calculation Date: Mon, 19 Dec 2011 00:31:15 +0100 Message-ID: <1324251075-3248-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.8 MIME-Version: 1.0 From: Linus Walleij The clock for the smp_twd block is not equal to the CPU frequency, actually it is divided by two, so fix this, and set the initial frequency to half of 1GHz which is the most common case. Reported-by: Daniel Lezcano Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/clock.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 2ebf998..7379075 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c @@ -651,7 +651,7 @@ err_out: late_initcall(clk_debugfs_init); #endif /* defined(CONFIG_DEBUG_FS) */ -unsigned long clk_smp_twd_rate = 400000000; +unsigned long clk_smp_twd_rate = 500000000; unsigned long clk_smp_twd_get_rate(struct clk *clk) { @@ -677,7 +677,7 @@ static int clk_twd_cpufreq_transition(struct notifier_block *nb, if (state == CPUFREQ_PRECHANGE) { /* Save frequency in simple Hz */ - clk_smp_twd_rate = f->new * 1000; + clk_smp_twd_rate = (f->new * 1000) / 2; } return NOTIFY_OK;