From patchwork Fri Dec 2 07:18:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9457959 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 0A79D60236 for ; Fri, 2 Dec 2016 07:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 027A628526 for ; Fri, 2 Dec 2016 07:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB59D28533; Fri, 2 Dec 2016 07:19:09 +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 7F77028526 for ; Fri, 2 Dec 2016 07:19:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbcLBHSP (ORCPT ); Fri, 2 Dec 2016 02:18:15 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:34278 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbcLBHSM (ORCPT ); Fri, 2 Dec 2016 02:18:12 -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 <0OHJ02JYNQY8YQ00@mailout2.samsung.com>; Fri, 02 Dec 2016 16:18:08 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-16-58412030e096 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 6B.6C.25310.03021485; Fri, 2 Dec 2016 16:18:08 +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 <0OHJ00CWKQY7FI90@mmp2.samsung.com>; Fri, 02 Dec 2016 16:18:08 +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 1/5] clk: samsung: exynos5433: Set NoC (Network On Chip) clocks as critical Date: Fri, 02 Dec 2016 16:18:03 +0900 Message-id: <1480663087-4590-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1480663087-4590-1-git-send-email-cw00.choi@samsung.com> References: <1480663087-4590-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsVy+t9jQV0DBccIg6PrpS2uf3nOajH/yDlW izdv1zBZ9D9+zWxx/vwGdouzTW/YLTY9vsZqcXnXHDaLGef3MVlcPOVqcbtxBZtF694j7BaH 37SzWvw4081isWrXH0YHfo/3N1rZPS739TJ57Jx1l91j06pONo/NS+o9tvQDeX1bVjF6fN4k F8AR5WaTkZqYklqkkJqXnJ+SmZduqxQa4qZroaSQl5ibaqsUoesbEqSkUJaYUwrkGRmgAQfn APdgJX27BLeM5gWvWQpeClVcvPeJqYHxP38XIyeHhICJxJZNb1kgbDGJC/fWs3UxcnEICcxi lGj+9pEdwvnBKDHx7EqwKjYBLYn9L26AVYkINDFKNFyYywjiMAusZpLYvO43WJWwQKxEY/c5 MJtFQFXi1K7VbCA2r4CLxPIDn9kg9slJfNjziB3E5hRwlWj4OosZxBYCqtnU1cE8gZF3ASPD KkaJ1ILkguKk9FzDvNRyveLE3OLSvHS95PzcTYzgGHomtYPx4C73Q4wCHIxKPLwvjB0ihFgT y4orcw8xSnAwK4nwfpZzjBDiTUmsrEotyo8vKs1JLT7EaAp02ERmKdHkfGB855XEG5qYm5gb G1iYW1qaGCmJ8zbOfhYuJJCeWJKanZpakFoE08fEwSnVwBgQHrHz/rZPUzcdZU7+eK759taN 584djS1xvxVk+/xf/fWWyHOXrxtyim7S6VK7Kif/9+6hY1xratP17lz9/Tfy18zp3L5r4g7G fL5tPS+05JjiLX0909zXZx42rPzxJOjTPPG4kilWTMZCO9eXVoV26bHqFsq99mo5syjk98OY P0vWneXe91pbiaU4I9FQi7moOBEAfSB5pLcCAAA= 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: 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),