From patchwork Tue Aug 16 13:35:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9284019 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 765BD60839 for ; Tue, 16 Aug 2016 14:11:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AD962867E for ; Tue, 16 Aug 2016 14:11:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EB6A2869F; Tue, 16 Aug 2016 14:11:56 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 910A12867E for ; Tue, 16 Aug 2016 14:11:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 63E51266AE8; Tue, 16 Aug 2016 16:11:54 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 681F02668AC; Tue, 16 Aug 2016 16:08:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 95FC326683D; Tue, 16 Aug 2016 16:08:13 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by alsa0.perex.cz (Postfix) with ESMTP id E8AAE2668C1 for ; Tue, 16 Aug 2016 15:36:33 +0200 (CEST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OC000IER8GVAS30@mailout1.w1.samsung.com> for alsa-devel@alsa-project.org; Tue, 16 Aug 2016 14:36:31 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-2b-57b316df090e Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 3B.9B.04866.FD613B75; Tue, 16 Aug 2016 14:36:31 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OC000MRK8GNJF30@eusync3.samsung.com>; Tue, 16 Aug 2016 14:36:31 +0100 (BST) From: Krzysztof Kozlowski To: Michael Turquette , Stephen Boyd , Stephen Warren , Lee Jones , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Kukjin Kim , Russell King , Mark Brown , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, alsa-devel@alsa-project.org Date: Tue, 16 Aug 2016 15:35:01 +0200 Message-id: <1471354514-24224-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1471354514-24224-1-git-send-email-k.kozlowski@samsung.com> References: <1471354514-24224-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsVy+t/xq7r3xTaHG7xaZ2xxa905VosrFw8x WWycsZ7VYm3vURaLqQ+fsFn8m3KD3eJA42VGi1/vjrBbvHm7hsni9QtDi/7Hr5ktdrQtZLHY 9Pgaq8XHnnusFh1/vzBaXN41h81i4u0N7BYzzu9jsjg0dS+jxdojd9ktLp5ytXg6czObxeE3 7awWP850s1i8W/2E0eLVwTYWi1W7/jA6SHts+NzE5tH0/hibx+VrF5k93t9oZfeYdf8skNvX y+Sxc9Zddo9NqzrZPDYvqfd4OfE3m8eWfqBQ35ZVjB6fN8l5bJwbGsAXxWWTkpqTWZZapG+X wJXRt/g5c8EHzopdv9uYGxhXcHQxcnJICJhIHDl3kx3CFpO4cG89WxcjF4eQwFJGiXPTVzNB OI1MEqebFjOBVLEJGEtsXr4ErEpEYBWbxMK/a8GqmAVeMkqcPfkLrEpYwFNiYyPEXBYBVYnT zdvAbF4Bd4kzn1vYIPbJSZw8NpkVxOYU8JA4d6GRGcQWAqo5ub6dZQIj7wJGhlWMoqmlyQXF Sem5RnrFibnFpXnpesn5uZsYIVH3dQfj0mNWhxgFOBiVeHhPMGwKF2JNLCuuzD3EKMHBrCTC e1h0c7gQb0piZVVqUX58UWlOavEhRmkOFiVx3pm73ocICaQnlqRmp6YWpBbBZJk4OKUaGC+8 /H+5e5F0f9ar0GzOgskplWoqbU+CzXPM/r4WuNjZGjc9rn3TKpf6XdkvZ23dYtIxZ6rpF8G5 wYqvLs3W2L/AuNxX5LYN542jV97unX/HzOKtpEHwO++o0z9FlM1bj6fYN585uF+65cKnsikr 9ae27GVYcPvZtX/eq/5bVh573d+1ONWHfYoSS3FGoqEWc1FxIgB9axn5tgIAAA== Cc: a.hajda@samsung.com, Javier Martinez Canillas , Charles Keepax , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [alsa-devel] [RFC 04/17] clk: samsung: Allocate a clock controller in context X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Allocate a clock controller and store it in context so it will be passed later for creating clocks. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk.c | 4 ++++ drivers/clk/samsung/clk.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c index b7d87d6db9dc..fdeb35a48d3a 100644 --- a/drivers/clk/samsung/clk.c +++ b/drivers/clk/samsung/clk.c @@ -67,6 +67,10 @@ struct samsung_clk_provider *__init samsung_clk_init(struct device_node *np, if (!ctx) panic("could not allocate clock provider context.\n"); + ctx->clk_ctrl = clk_ctrl_register(NULL); + if (!ctx->clk_ctrl) + panic("could not allocate clock provider controller.\n"); + clk_table = kcalloc(nr_clks, sizeof(struct clk *), GFP_KERNEL); if (!clk_table) panic("could not allocate clock lookup table\n"); diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h index da3bdebabf1e..cb0ef6266b6d 100644 --- a/drivers/clk/samsung/clk.h +++ b/drivers/clk/samsung/clk.h @@ -28,6 +28,7 @@ struct samsung_clk_provider { void __iomem *reg_base; struct clk_onecell_data clk_data; spinlock_t lock; + struct clk_ctrl *clk_ctrl; }; /**