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: 6109411 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 18549BF90F for ; Fri, 27 Mar 2015 16:30:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D7EC203B8 for ; Fri, 27 Mar 2015 16:30:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63CC9203AD for ; Fri, 27 Mar 2015 16:30:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbX7R-0006ga-VT; Fri, 27 Mar 2015 16:28:25 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbX7I-0006RS-E0 for linux-arm-kernel@lists.infradead.org; Fri, 27 Mar 2015 16:28:17 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150327_092816_666138_CF5C3DF0 X-CRM114-Status: GOOD ( 11.77 ) X-Spam-Score: -5.0 (-----) Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Mike Turquette , linux-kernel@vger.kernel.org, Stephen Boyd , Tomasz Figa , stable@vger.kernel.org, Daniel Drake , Kukjin Kim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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);