From patchwork Thu Apr 20 13:16:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 97814 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp794568qgf; Thu, 20 Apr 2017 06:18:03 -0700 (PDT) X-Received: by 10.84.232.205 with SMTP id x13mr10567372plm.153.1492694283170; Thu, 20 Apr 2017 06:18:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a189si6478625pfa.372.2017.04.20.06.18.02; Thu, 20 Apr 2017 06:18:03 -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 S945621AbdDTNRQ (ORCPT + 4 others); Thu, 20 Apr 2017 09:17:16 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:62203 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942449AbdDTNRJ (ORCPT ); Thu, 20 Apr 2017 09:17:09 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OOP00IBHM8003A0@mailout2.w1.samsung.com>; Thu, 20 Apr 2017 14:16:48 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170420131647eucas1p120aa286c938c5fb532c3b226674d4583~3HXku3ZH51198711987eucas1p1D; Thu, 20 Apr 2017 13:16:47 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 18.D7.04459.FB4B8F85; Thu, 20 Apr 2017 14:16:47 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170420131647eucas1p27a8e65eb92f64f872bfce611ac031700~3HXkDP52i2874628746eucas1p2S; Thu, 20 Apr 2017 13:16:47 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-5f-58f8b4bff4fb Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C4.6C.17452.145B8F85; Thu, 20 Apr 2017 14:18:57 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OOP00C8KM7TNL60@eusync1.samsung.com>; Thu, 20 Apr 2017 14:16:46 +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 3/4] clk: samsung: exynos-clkout: Convert to the new clk_hw API Date: Thu, 20 Apr 2017 15:16:38 +0200 Message-id: <1492694199-9553-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1492694199-9553-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87r7t/yIMJg5V9Fi44z1rBbXvzxn tTh/fgO7xceee6wWM87vY7JYe+Quu8XFU64Wh9+0s1r8ONPN4sDp8f5GK7vH5b5eJo9NqzrZ PPq2rGL0+LxJLoA1issmJTUnsyy1SN8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yMXB7PAbiaJiycfAzkc HMIC/hKnT/mA1LAIqEo8n7eEHcTmFXCXWPD/LTPELjmJk8cms4LYnAIeElMn3WGH2OUucWrb KtYJjLwLGBlWMYqklhbnpucWG+oVJ+YWl+al6yXn525iBIb2tmM/N+9gvLQx+BCjAAejEg+v wpofEUKsiWXFlbmHGCU4mJVEeH03AYV4UxIrq1KL8uOLSnNSiw8xmgIdNZFZSjQ5Hxh3eSXx hiaG5paGRsYWFuZGRkrivCUfroQLCaQnlqRmp6YWpBbB9DFxcEo1MCoH/J9TknrF6jLfIqt7 Pp2zDnT8ETknf6V//bKOPPY536+1frOb5nowSz764V4fR87i/emht30kXLXc6k2fTVo9e44M 77oZajWLuprMdz7g9FHXNE6ffKGMw2yhRtCN5O2zc75rnL9RkvP/wbJLzIev+ZgE3H+64ojZ tYLPK003yD5oLZ/6q1GJpTgj0VCLuag4EQCpNJDlgwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170420131647eucas1p27a8e65eb92f64f872bfce611ac031700 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 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: 20170420131647eucas1p27a8e65eb92f64f872bfce611ac031700 X-RootMTR: 20170420131647eucas1p27a8e65eb92f64f872bfce611ac031700 References: <1492694199-9553-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 --- 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 Reviewed-by: Krzysztof Kozlowski 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: