From patchwork Mon Apr 24 06:42:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 98026 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1348130qgf; Sun, 23 Apr 2017 23:42:44 -0700 (PDT) X-Received: by 10.98.17.204 with SMTP id 73mr23643987pfr.267.1493016164598; Sun, 23 Apr 2017 23:42:44 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si17792965pfb.23.2017.04.23.23.42.44; Sun, 23 Apr 2017 23:42:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165685AbdDXGmn (ORCPT + 4 others); Mon, 24 Apr 2017 02:42:43 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:49629 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165574AbdDXGmk (ORCPT ); Mon, 24 Apr 2017 02:42:40 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OOW007K1IMWP820@mailout1.w1.samsung.com>; Mon, 24 Apr 2017 07:42:32 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170424064231eucas1p1c2c881634b285fbe80c1bc4b5c17c444~4QkeYwEWM1143411434eucas1p1P; Mon, 24 Apr 2017 06:42:31 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id DB.5F.04459.75E9DF85; Mon, 24 Apr 2017 07:42:31 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170424064231eucas1p2edd27880b5adc7c884e00db54c100cc2~4QkdxwmhZ2653226532eucas1p2M; Mon, 24 Apr 2017 06:42:31 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-c9-58fd9e578b69 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 95.8C.20206.07E9DF85; Mon, 24 Apr 2017 07:42:56 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OOW00957IMPRV80@eusync3.samsung.com>; Mon, 24 Apr 2017 07:42:30 +0100 (BST) From: Marek Szyprowski To: linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Stephen Boyd , Michael Turquette , Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v2 5/6] clk: samsung: exynos-clkout: Convert to the new clk_hw API Date: Mon, 24 Apr 2017 08:42:22 +0200 Message-id: <1493016143-21569-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1493016143-21569-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEIsWRmVeSWpSXmKPExsWy7djPc7rh8/5GGCzcJGuxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3eLiKVeLw2/aWS1+nOlmceD0eH+jld3jcl8vk8emVZ1s Hn1bVjF6fN4kF8AaxWWT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BJYwSmydtIEJwmlikrh8eSErSBWbgKFE19suNhBbRMBB4vOn14wgRcwCu5kkLp58 zAiSEBYIkZi8uQ1sLIuAqsSB0+fA4rwCHhLvD22FWicncfLYZLChnAKeEr/2dYLVCAHVdFxY xDKBkXcBI8MqRpHU0uLc9NxiI73ixNzi0rx0veT83E2MwADfduznlh2MXe+CDzEKcDAq8fBG fP8TIcSaWFZcmXuIUYKDWUmEVyzxb4QQb0piZVVqUX58UWlOavEhRlOgoyYyS4km5wOjL68k 3tDE0NzS0MjYwsLcyEhJnHfqhyvhQgLpiSWp2ampBalFMH1MHJxSDYwNm42OLa9MO2W6RdG/ V06wx21tSOC7ZSeqEhcdvx4rWXptItsEN9dZC/jjbhWz3qnmX2t31KF/1qNG25Wm24pPL/wr e+ei+0mTpMRvXosWCW61a+bJdHr0oHCHvKtZalx71P7kudWZKhwTxLJuJ3ZtMsqSEOL1ZT36 wEyMO84hOT9a0Ta+TImlOCPRUIu5qDgRANgovoKGAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170424064231eucas1p2edd27880b5adc7c884e00db54c100cc2 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170424064231eucas1p2edd27880b5adc7c884e00db54c100cc2 X-RootMTR: 20170424064231eucas1p2edd27880b5adc7c884e00db54c100cc2 References: <1493016143-21569-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Clock providers should use the new struct clk_hw based API, so convert Exynos CLKOUT clock provider to the new approach. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-exynos-clkout.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c index 6c6afb87b4ce..a21aea062bae 100644 --- a/drivers/clk/samsung/clk-exynos-clkout.c +++ b/drivers/clk/samsung/clk-exynos-clkout.c @@ -29,10 +29,9 @@ struct exynos_clkout { struct clk_gate gate; struct clk_mux mux; spinlock_t slock; - struct clk_onecell_data data; - struct clk *clk_table[EXYNOS_CLKOUT_NR_CLKS]; void __iomem *reg; u32 pmu_debug_save; + struct clk_hw_onecell_data data; }; static struct exynos_clkout *clkout; @@ -62,7 +61,9 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask) int ret; int i; - clkout = kzalloc(sizeof(*clkout), GFP_KERNEL); + clkout = kzalloc(sizeof(*clkout) + + sizeof(*clkout->data.hws) * EXYNOS_CLKOUT_NR_CLKS, + GFP_KERNEL); if (!clkout) return; @@ -100,17 +101,16 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask) clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT; clkout->mux.lock = &clkout->slock; - clkout->clk_table[0] = clk_register_composite(NULL, "clkout", + clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout", parent_names, parent_count, &clkout->mux.hw, &clk_mux_ops, NULL, NULL, &clkout->gate.hw, &clk_gate_ops, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT); - if (IS_ERR(clkout->clk_table[0])) + if (IS_ERR(clkout->data.hws[0])) goto err_unmap; - clkout->data.clks = clkout->clk_table; - clkout->data.clk_num = EXYNOS_CLKOUT_NR_CLKS; - ret = of_clk_add_provider(node, of_clk_src_onecell_get, &clkout->data); + clkout->data.num = EXYNOS_CLKOUT_NR_CLKS; + ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, &clkout->data); if (ret) goto err_clk_unreg; @@ -119,7 +119,7 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask) return; err_clk_unreg: - clk_unregister(clkout->clk_table[0]); + clk_hw_unregister(clkout->data.hws[0]); err_unmap: iounmap(clkout->reg); clks_put: