From patchwork Mon Jun 27 13:03:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9200535 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 A8EB160757 for ; Mon, 27 Jun 2016 13:06:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99B772858D for ; Mon, 27 Jun 2016 13:06:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CC1D28594; Mon, 27 Jun 2016 13:06:29 +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=ham 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 8909A28591 for ; Mon, 27 Jun 2016 13:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751601AbcF0NDx (ORCPT ); Mon, 27 Jun 2016 09:03:53 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:54049 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751706AbcF0NDs (ORCPT ); Mon, 27 Jun 2016 09:03:48 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9F02TT0LM9W310@mailout1.samsung.com>; Mon, 27 Jun 2016 22:03:45 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.112]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 69.88.05174.13421775; Mon, 27 Jun 2016 22:03:45 +0900 (KST) X-AuditID: cbfee68d-f79876d000001436-a3-5771243106ea Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id B2.3A.02101.13421775; Mon, 27 Jun 2016 22:03:45 +0900 (KST) Received: from samsunx.samsung ([10.113.63.54]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9F00BM8LM2K970@mmp2.samsung.com>; Mon, 27 Jun 2016 22:03:45 +0900 (KST) From: Andi Shyti To: Chanwoo Choi Cc: Jaehoon Chung , Sylwester Nawrocki , Tomasz Figa , Michael Turquette , Stephen Boyd , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH v2 2/2] clk: exynos5433: enable sclk_ioclk for SPI3 Date: Mon, 27 Jun 2016 22:03:14 +0900 Message-id: <1467032594-7643-2-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467032594-7643-1-git-send-email-andi.shyti@samsung.com> References: <1467032594-7643-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42JZI2JSoGuoUhhusPGEjMX2I89YLRb/eM5k cf3Lc1aLG7/aWC1evzC06H/8mtli0+NrrBYfe+6xWlzeNYfNYsb5fUwWF0+5Whx+085q8eNM N4vFql1/GB34PN7faGX3uNzXy+RxfcknZo+ds+6ye2xa1cnmsXlJvUffllWMHp83yQVwRHHZ pKTmZJalFunbJXBlbFy9krVgO3fFnRMHmRsYL3F2MXJySAiYSFx78ZENwhaTuHBvPZDNxSEk sIJR4v2za6wwRRs2bmGBSMxilLjTc48dwvnIKLH9+WRmkCo2AU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lWz/PYllAiPvAkaGVYwSqQXJBcVJ6bmGeanlesWJucWleel6yfm5 mxjBkfpMagfjwV3uhxgFOBiVeHgX2BaEC7EmlhVX5h5ilOBgVhLhXatUGC7Em5JYWZValB9f VJqTWnyI0RToronMUqLJ+cAkklcSb2hsYmZkaWRuaGFkbK4kzvv4/7owIYH0xJLU7NTUgtQi mD4mDk6pBsZgXam1ibsOm9c1+d1U9DpjJBAg7lTtNNtNQ0OhkT9NbuVrLx+pvKNh2jVLDi16 XiVyiYF9Jbt7oyT7wRbdFIMLrQ/fhd9eIJ6o/HbxjmdMkR32itdmPdKR65ow09iwdx7f5YiC eRplC9SXeXo5/7Hbsnq/D9eSrcf25j/7nHgz/EW/Oa+EqxJLcUaioRZzUXEiAOChX6jqAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP enable SPI3 iosclk by using the CLK_IS_CRITICAL flag. There is no device which is supposed to enable this clock when needed, therefore, the only way to use the SPI bus is to enable it in boot time. Suggested-by: Tomasz Figa Signed-off-by: Andi Shyti Signed-off-by: Jaehoon Chung Reviewed-by: Chanwoo Choi --- Hi, V1 -> V2 - the "sclk_spi3" doesn't need to be enabled in boot time as it is handled by the spi driver itself. - use the CLK_IS_CRITICAL flag for the ioclk Andi drivers/clk/samsung/clk-exynos5433.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index dcb4391..c33150e 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -1641,7 +1641,8 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = { GATE(CLK_SCLK_IOCLK_SPI4, "sclk_ioclk_spi4", "ioclk_spi4_clk_in", ENABLE_SCLK_PERIC, 21, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_IOCLK_SPI3, "sclk_ioclk_spi3", "ioclk_spi3_clk_in", - ENABLE_SCLK_PERIC, 20, CLK_SET_RATE_PARENT, 0), + ENABLE_SCLK_PERIC, 20, + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_SPI4, "sclk_spi4", "sclk_spi4_peric", ENABLE_SCLK_PERIC, 19, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_SPI3, "sclk_spi3", "sclk_spi3_peric", ENABLE_SCLK_PERIC,