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: 9283817 X-Patchwork-Delegate: sboyd@codeaurora.org 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 860336086A for ; Tue, 16 Aug 2016 13:36:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76D4F28826 for ; Tue, 16 Aug 2016 13:36:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B61E28995; Tue, 16 Aug 2016 13:36:42 +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 E51932895E for ; Tue, 16 Aug 2016 13:36:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753618AbcHPNgi (ORCPT ); Tue, 16 Aug 2016 09:36:38 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:59567 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753548AbcHPNgg (ORCPT ); Tue, 16 Aug 2016 09:36:36 -0400 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>; Tue, 16 Aug 2016 14:36:32 +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 Cc: Marek Szyprowski , Charles Keepax , Javier Martinez Canillas , a.hajda@samsung.com, Bartlomiej Zolnierkiewicz Subject: [RFC 04/17] clk: samsung: Allocate a clock controller in context 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== 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 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; }; /**