From patchwork Thu Dec 8 04:58:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9465815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED393607D3 for ; Thu, 8 Dec 2016 04:59:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E87E42851F for ; Thu, 8 Dec 2016 04:59:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD2B828532; Thu, 8 Dec 2016 04:59:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E53828529 for ; Thu, 8 Dec 2016 04:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932912AbcLHE7K (ORCPT ); Wed, 7 Dec 2016 23:59:10 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:41221 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789AbcLHE6T (ORCPT ); Wed, 7 Dec 2016 23:58:19 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OHU02XEEOGY1D60@mailout2.samsung.com>; Thu, 08 Dec 2016 13:58:15 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-5d-5848e8679727 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id CB.84.25310.768E8485; Thu, 8 Dec 2016 13:58:15 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OHU00IO2OH23ZA0@mmp2.samsung.com>; Thu, 08 Dec 2016 13:58:15 +0900 (KST) From: Chanwoo Choi To: krzk@kernel.org, javier@osg.samsung.com, kgene@kernel.org, robh+dt@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com Cc: cw00.choi@samsung.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michael Turquette , Stephen Boyd Subject: [PATCH v2 1/5] clk: samsung: exynos5433: Set NoC (Network On Chip) clocks as critical Date: Thu, 08 Dec 2016 13:58:07 +0900 Message-id: <1481173091-9728-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1481173091-9728-1-git-send-email-cw00.choi@samsung.com> References: <1481173091-9728-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsVy+t9jQd30Fx4RBn3rpSyuf3nOajH/yDlW izdv1zBZ9D9+zWxx/vwGdouzTW/YLTY9vsZqcXnXHDaLGef3MVlcPOVqcbtxBZtF694j7BaH 37SzWvw4081isWrXH0YHfo/3N1rZPS739TJ57Jx1l91j06pONo/NS+o9tvQDeX1bVjF6fN4k F8AR5WaTkZqYklqkkJqXnJ+SmZduqxQa4qZroaSQl5ibaqsUoesbEqSkUJaYUwrkGRmgAQfn APdgJX27BLeMp2uVC94KV9ycuIWxgfGLQBcjJ4eEgInEvnfvGCFsMYkL99azdTFycQgJzGKU OH9xC5Tzg1Hi7a2vYFVsAloS+1/cAEuICDQxSjRcmMsI4jALrGaS2LzuNwtIlbBAgsSCvtWs IDaLgKpE+9FONhCbV8BFYsu3VcwQ++QkPux5xA5icwq4Ssw8MoWpi5EDaJ2LxMWTzhMYeRcw MqxilEgtSC4oTkrPNcxLLdcrTswtLs1L10vOz93ECI6fZ1I7GA/ucj/EKMDBqMTDK9DtESHE mlhWXJl7iFGCg1lJhPfhM6AQb0piZVVqUX58UWlOavEhRlOguyYyS4km5wNjO68k3tDE3MTc 2MDC3NLSxEhJnLdx9rNwIYH0xJLU7NTUgtQimD4mDk6pBsa053cZ9oqyVZt6/H/++v93N6bE pEjzm9lXj1abT2C8kxi0VrRN1p67Judy/EmbV97v8pgm3bx2VLFya3qX1rLfcwNaj+37zPL7 VfgM5T9+M3MZDvl01FxUeff2wp9Ogfderw04XgbFdE/RNp4nv/hDkXfyxJdT+B1WlH9Z/v4p 7wPX1SXnLE2UWIozEg21mIuKEwG1brrntQIAAA== X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ACLK_BUS0/1/2 are used for NoC (Network on Chip). If NoC's clocks are disabled, the system halt happen. Following clock must be always enabled. - CLK_ACLK_BUS0_400 : NoC's bus clock for PERIC/PERIS/FSYS/MSCL - CLK_ACLK_BUS1_400 : NoC's bus clock for MFC/HEVC/G3D - CLK_ACLK_BUS2_400 : NoC's bus clock for GSCL/DISP/G2D/CAM0/CAM1/ISP Also, this patch adds the CLK_SET_RATE_PARENT flag to the CLK_SCLK_JPEG_MSCL because this clock should be used for bus frequency scaling. This clock need to be changed on the fly with CLK_SET_RATE_PARENT flag. Cc: Sylwester Nawrocki Cc: Tomasz Figa Cc: Chanwoo Choi Cc: Michael Turquette Cc: Stephen Boyd Cc:linux-clk@vger.kernel.org Signed-off-by: Chanwoo Choi --- drivers/clk/samsung/clk-exynos5433.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index f096bd7df40c..0db5204c307c 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -549,10 +549,10 @@ 29, CLK_IGNORE_UNUSED, 0), GATE(CLK_ACLK_BUS0_400, "aclk_bus0_400", "div_aclk_bus0_400", ENABLE_ACLK_TOP, 26, - CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), GATE(CLK_ACLK_BUS1_400, "aclk_bus1_400", "div_aclk_bus1_400", ENABLE_ACLK_TOP, 25, - CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), GATE(CLK_ACLK_IMEM_200, "aclk_imem_200", "div_aclk_imem_266", ENABLE_ACLK_TOP, 24, CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), @@ -616,7 +616,7 @@ /* ENABLE_SCLK_TOP_MSCL */ GATE(CLK_SCLK_JPEG_MSCL, "sclk_jpeg_mscl", "div_sclk_jpeg", - ENABLE_SCLK_TOP_MSCL, 0, 0, 0), + ENABLE_SCLK_TOP_MSCL, 0, CLK_SET_RATE_PARENT, 0), /* ENABLE_SCLK_TOP_CAM1 */ GATE(CLK_SCLK_ISP_SENSOR2, "sclk_isp_sensor2", "div_sclk_isp_sensor2_b", @@ -1382,7 +1382,7 @@ static void __init exynos5433_cmu_cpif_init(struct device_node *np) /* ENABLE_ACLK_MIF3 */ GATE(CLK_ACLK_BUS2_400, "aclk_bus2_400", "div_aclk_bus2_400", ENABLE_ACLK_MIF3, 4, - CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), GATE(CLK_ACLK_DISP_333, "aclk_disp_333", "div_aclk_disp_333", ENABLE_ACLK_MIF3, 1, CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0),