Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463821

[RFC 04/17] clk: samsung: Allocate a clock controller in context

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject [RFC 04/17] clk: samsung: Allocate a clock controller in context
Date 2016-08-16 15:50 +0200
Message-ID <s6MUG-3Kl-27@gated-at.bofh.it> (permalink)
References <s6MKZ-3GS-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Allocate a clock controller and store it in context so it will be passed
later for creating clocks.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 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;
 };
 
 /**
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 00/17] clk: Add per-controller locks to fix deadlocks Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 15:50 +0200
  [RFC 03/17] clk: s2mps11: Switch to new clock controller API Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 15:50 +0200
  [RFC 04/17] clk: samsung: Allocate a clock controller in context Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 15:50 +0200
  [RFC 07/17] clk: mux: Switch to new clock controller API Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 15:50 +0200
  [RFC 08/17] clk: fixed-factor: Switch to new clock controller API Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 15:50 +0200
  Re: [RFC 00/17] clk: Add per-controller locks to fix deadlocks Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-08-16 16:00 +0200
    Re: [RFC 00/17] clk: Add per-controller locks to fix deadlocks Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-08-19 16:50 +0200
      Re: [RFC 00/17] clk: Add per-controller locks to fix deadlocks Krzysztof Kozlowski <krzk@kernel.org> - 2016-08-19 19:00 +0200
  Re: [RFC 00/17] clk: Add per-controller locks to fix deadlocks Javier Martinez Canillas <javier@osg.samsung.com> - 2016-08-19 21:40 +0200
    Re: [RFC 00/17] clk: Add per-controller locks to fix deadlocks Krzysztof Kozlowski <krzk@kernel.org> - 2016-08-20 18:10 +0200

csiph-web