From patchwork Mon Jun 27 13:03:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9200531 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 0F4E060757 for ; Mon, 27 Jun 2016 13:05:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 019FB28581 for ; Mon, 27 Jun 2016 13:05:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAB462858D; Mon, 27 Jun 2016 13:05:52 +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 EFA5528586 for ; Mon, 27 Jun 2016 13:05:50 +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 1bHWDC-00072M-Au; Mon, 27 Jun 2016 13:04:26 +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 1bHWCy-0006Pn-2U for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2016 13:04:13 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9F02CP8LM5HQC0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2016 22:03:41 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id F5.A5.05160.D2421775; Mon, 27 Jun 2016 22:03:41 +0900 (KST) X-AuditID: cbfee68e-f79266d000001428-fa-5771242d0692 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id DB.2A.04429.D2421775; Mon, 27 Jun 2016 06:03:41 -0700 (MST) 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:41 +0900 (KST) From: Andi Shyti To: Chanwoo Choi Subject: [PATCH v2 1/2] clk: exynos5433: do not use CLK_IGNORE_UNUSED for SPI clocks Date: Mon, 27 Jun 2016 22:03:13 +0900 Message-id: <1467032594-7643-1-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsWyRsSkUFdXpTDcYMpmFYvtR56xWiz+8ZzJ 4vqX56wWN361sVq8fmFo0f/4NbPFpsfXWC0+9txjtbi8aw6bxYzz+5gsLp5ytTj8pp3V4seZ bhaLVbv+MDrweby/0crucbmvl8nj+pJPzB47Z91l99i0qpPNY/OSeo++LasYPT5vkgvgiOKy SUnNySxLLdK3S+DKOLTgMGvBRYGKU3PvsTQwdvN1MXJySAiYSNw8/ZoZwhaTuHBvPVsXIxeH kMAKRomGR93MMEXL1q1jhUjMYpTYOfUmE4TzkVGip+MKWBWbgKZE0+0fbCC2iICGxMy/VxhB bGaBT8wSH/t8QGxhgTCJjs0r2UFsFgFViQ0bTzCB2LwCrhKfN39ghNgmJ3F5+gOwMyQETrFL 3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FKiyfnAtJBX Em9obGJmZGlkbmhhZGyuJM77+P+6MCGB9MSS1OzU1ILUIpg+Jg5OqQbGI4qrc+4bl83+q/E7 etfud6ocZ74vmX332n3hlmDjKyoyYa+cggOeLFCUSGsWYFQ5yeWuFJjr3VO25PFLsXOu3xe9 vvFCPPHSuuI+FwuFbMtvIsemqt2W+H77z1u3ouBpf1Xv26uuSY6UmSVmfbdl0u2S05qneae8 9tbJ23P8RubFhZtu3Z/Tr8RSnJFoqMVcVJwIAGqLicfTAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160627_060412_405082_0D5B62CC X-CRM114-Status: GOOD ( 14.16 ) 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: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Andi Shyti , Michael Turquette , Stephen Boyd , Tomasz Figa , Andi Shyti , linux-kernel@vger.kernel.org, Jaehoon Chung , Kukjin Kim , Sylwester Nawrocki , linux-clk@vger.kernel.org, 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 CLK_IGNORE_UNUSED flag has to be avoided whenever possible. Use the CLK_IS_CRITICAL flag instead, which enables the clock line during boot time. While none of the SCLK_SPI need to be alive all the time as that clock is handled by the SPI driver as a busclk whenever needed. Suggested-by: Tomasz Figa Signed-off-by: Andi Shyti --- Hi, this patch comes after Tomasz's review where he discouraged from using the CLK_IGNORE_UNUSED flag. Therefore I added one more patch to the original where I remove that flag for the SPI1 whenever not necessary while I replace it with the CLK_IS_CRITICAL for the ioclk. This patch makes this driver the first using the "critical" functionality :) Andi drivers/clk/samsung/clk-exynos5433.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index 128527b..dcb4391 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -1655,7 +1655,7 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = { ENABLE_SCLK_PERIC, 13, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_IOCLK_SPI1, "sclk_ioclk_spi1", "ioclk_spi1_clk_in", ENABLE_SCLK_PERIC, 12, - CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_IOCLK_SPI0, "sclk_ioclk_spi0", "ioclk_spi0_clk_in", ENABLE_SCLK_PERIC, 11, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_IOCLK_I2S1_BCLK, "sclk_ioclk_i2s1_bclk", @@ -1670,7 +1670,7 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = { GATE(CLK_SCLK_SPI2, "sclk_spi2", "sclk_spi2_peric", ENABLE_SCLK_PERIC, 5, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_SPI1, "sclk_spi1", "sclk_spi1_peric", ENABLE_SCLK_PERIC, - 4, CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + 4, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_SPI0, "sclk_spi0", "sclk_spi0_peric", ENABLE_SCLK_PERIC, 3, CLK_SET_RATE_PARENT, 0), GATE(CLK_SCLK_UART2, "sclk_uart2", "sclk_uart2_peric",