From patchwork Fri Mar 27 16:27:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6109391 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1A9FF9F350 for ; Fri, 27 Mar 2015 16:27:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49B7720421 for ; Fri, 27 Mar 2015 16:27:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5275520394 for ; Fri, 27 Mar 2015 16:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbbC0Q1y (ORCPT ); Fri, 27 Mar 2015 12:27:54 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:32710 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736AbbC0Q1x (ORCPT ); Fri, 27 Mar 2015 12:27:53 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NLV000WNPPLJM20@mailout4.samsung.com>; Sat, 28 Mar 2015 01:27:21 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-a2-551584e9fd2e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 06.D2.09430.9E485155; Sat, 28 Mar 2015 01:27:21 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NLV00IIHPPJLW10@mmp1.samsung.com>; Sat, 28 Mar 2015 01:27:21 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Sylwester Nawrocki Cc: Tomasz Figa , Mike Turquette , Stephen Boyd , Krzysztof Kozlowski , Daniel Drake , Kukjin Kim , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] clk: samsung: exynos4: Disable ARMCLK down feature on Exynos4210 SoC Date: Fri, 27 Mar 2015 17:27:10 +0100 Message-id: <1430933.sM2tQimLcT@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t9jAd2XLaKhBs9O8Fo8mv+Y2eL1C0OL /sevmS02Pb7GanF51xw2ixnn9zFZPJ1wkc3i8Jt2VosfZ7pZLBZsfMRosWrXH0YHbo/Lfb1M Hou+Z3nsnHWX3WPTqk42jzvX9rB5bF5S79G3ZRWjx+dNcgEcUVw2Kak5mWWpRfp2CVwZl9Z+ Ziu4KVix7e1/1gbGp3xdjJwcEgImEu+uzWSBsMUkLtxbz9bFyMUhJLCIUWLWj++MEM43Ronu g4vZQKrYBKwkJravYgSxRQT0JZasugjWwSzwjkli97cTYKOEBcIlLqzuA7NZBFQlPi6ewQxi 8wpoSiyb/xosLirgKbFz+gFGiLigxI/J98DizALyEvv2T2WFsLUk1u88zjSBkW8WkrJZSMpm ISlbwMi8ilE0tSC5oDgpPddIrzgxt7g0L10vOT93EyM48J9J72Bc1WBxiFGAg1GJh/fHbpFQ IdbEsuLK3EOMEhzMSiK8kxtFQ4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzKtm3hQgJpCeWpGan phakFsFkmTg4pRoYzRrKzod87Fp8IDFOf/KSGPGoU8rlGfOlpNlO32u2WvJFdeE789T1iaE5 Pd4zdh2dnS086Szn05SSedfWHZsWyPKRYW76W41jLlWpSTvFznWHhigHdYutezqb7UlA0XzT dKfsxMAVrr/fVZx4/ZJn0dpd30Wb/fbWbeGfcuiGdNTM2IaOyp2SSizFGYmGWsxFxYkAoS4V MHgCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Commit 42773b28e71d ("clk: samsung: exynos4: Enable ARMCLK down feature") enabled ARMCLK down feature on all Exynos4 SoCs. Unfortunately on Exynos4210 SoC ARMCLK down feature causes a lockup when ondemand cpufreq governor is used. Fix it by limiting ARMCLK down feature to Exynos4x12 SoCs. This patch was tested on: - Exynos4210 SoC based Trats board - Exynos4210 SoC based Origen board - Exynos4412 SoC based Trats2 board - Exynos4412 SoC based Odroid-U3 board Cc: Krzysztof Kozlowski Cc: Daniel Drake Cc: Tomasz Figa Cc: Kukjin Kim Fixes: 42773b28e71d ("clk: samsung: exynos4: Enable ARMCLK down feature") Cc: # v3.17+ Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-exynos4.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index 51462e8..714d6ba 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c @@ -1354,7 +1354,7 @@ static struct samsung_pll_clock exynos4x12_plls[nr_plls] __initdata = { VPLL_LOCK, VPLL_CON0, NULL), }; -static void __init exynos4_core_down_clock(enum exynos4_soc soc) +static void __init exynos4x12_core_down_clock(void) { unsigned int tmp; @@ -1373,11 +1373,9 @@ static void __init exynos4_core_down_clock(enum exynos4_soc soc) __raw_writel(tmp, reg_base + PWR_CTRL1); /* - * Disable the clock up feature on Exynos4x12, in case it was - * enabled by bootloader. + * Disable the clock up feature in case it was enabled by bootloader. */ - if (exynos4_soc == EXYNOS4X12) - __raw_writel(0x0, reg_base + E4X12_PWR_CTRL2); + __raw_writel(0x0, reg_base + E4X12_PWR_CTRL2); } /* register exynos4 clocks */ @@ -1474,7 +1472,8 @@ static void __init exynos4_clk_init(struct device_node *np, samsung_clk_register_alias(ctx, exynos4_aliases, ARRAY_SIZE(exynos4_aliases)); - exynos4_core_down_clock(soc); + if (soc == EXYNOS4X12) + exynos4x12_core_down_clock(); exynos4_clk_sleep_init(); samsung_clk_of_add_provider(np, ctx);