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: 9465821 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 2D4A06071E for ; Thu, 8 Dec 2016 05:00:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2889F28529 for ; Thu, 8 Dec 2016 05:00:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D77D2853B; Thu, 8 Dec 2016 05:00:57 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A5E8A28529 for ; Thu, 8 Dec 2016 05:00:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cEqnu-0008Qa-Bi; Thu, 08 Dec 2016 04:59:34 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cEqn4-0007tB-TX for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2016 04:58:45 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161207_205843_201481_B0BD9783 X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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),