linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] clk: add common of_clk_init() function
@ 2013-01-04  7:00 Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 2/7] clk: tegra: Use " Prashant Gaikwad
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Modify of_clk_init function so that it will determine which
driver to initialize based on device tree instead of each driver
registering to it.

Based on a similar patch for drivers/irqchip by Thomas Petazzoni and
drivers/clocksource by Stephen Warren.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 drivers/clk/clk-fixed-rate.c      |    1 +
 drivers/clk/clk.c                 |    9 +++++++++
 include/asm-generic/vmlinux.lds.h |   10 ++++++++++
 include/linux/clk-provider.h      |    6 ++++++
 4 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index af78ed6..f2104df 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -101,4 +101,5 @@ void __init of_fixed_clk_setup(struct device_node *node)
 		of_clk_add_provider(node, of_clk_src_simple_get, clk);
 }
 EXPORT_SYMBOL_GPL(of_fixed_clk_setup);
+CLK_OF_DECLARE(fixed_clk, "fixed-clock", of_fixed_clk_setup);
 #endif
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 037b48a..fb38dd8 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/device.h>
+#include <linux/init.h>
 
 static DEFINE_SPINLOCK(enable_lock);
 static DEFINE_MUTEX(prepare_lock);
@@ -1805,6 +1806,11 @@ struct of_clk_provider {
 	void *data;
 };
 
+extern struct of_device_id __clk_of_table[];
+
+static const struct of_device_id __clk_of_table_sentinel
+	__used __section(__clk_of_table_end);
+
 static LIST_HEAD(of_clk_providers);
 static DEFINE_MUTEX(of_clk_lock);
 
@@ -1933,6 +1939,9 @@ void __init of_clk_init(const struct of_device_id *matches)
 {
 	struct device_node *np;
 
+	if (!matches)
+		matches = __clk_of_table;
+
 	for_each_matching_node(np, matches) {
 		const struct of_device_id *match = of_match_node(matches, np);
 		of_clk_init_cb_t clk_init_cb = match->data;
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 1e744c5..8282f7c 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -158,6 +158,15 @@
 #define CLKSRC_OF_TABLES()
 #endif
 
+#ifdef CONFIG_COMMON_CLK
+#define CLK_OF_TABLES() . = ALIGN(8);				\
+			VMLINUX_SYMBOL(__clk_of_table) = .;	\
+			*(__clk_of_table)			\
+			*(__clk_of_table_end)
+#else
+#define CLK_OF_TABLES()
+#endif
+
 #define KERNEL_DTB()							\
 	STRUCT_ALIGN();							\
 	VMLINUX_SYMBOL(__dtb_start) = .;				\
@@ -502,6 +511,7 @@
 	CPU_DISCARD(init.rodata)					\
 	MEM_DISCARD(init.rodata)					\
 	CLKSRC_OF_TABLES()						\
+	CLK_OF_TABLES()							\
 	KERNEL_DTB()
 
 #define INIT_TEXT							\
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4989b8a..7f197d7 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -379,7 +379,13 @@ struct clk_onecell_data {
 };
 struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
 const char *of_clk_get_parent_name(struct device_node *np, int index);
+
 void of_clk_init(const struct of_device_id *matches);
 
+#define CLK_OF_DECLARE(name, compat, fn)			\
+	static const struct of_device_id __clk_of_table_##name	\
+		__used __section(__clk_of_table)		\
+		= { .compatible = compat, .data = fn };
+
 #endif /* CONFIG_COMMON_CLK */
 #endif /* CLK_PROVIDER_H */
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-04 16:30   ` Stephen Warren
  2013-01-04  7:00 ` [PATCH 3/7] clk: sunxi: " Prashant Gaikwad
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function for clocks initialization.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 arch/arm/mach-tegra/common.c    |    4 ++--
 drivers/clk/tegra/clk-tegra20.c |    3 ++-
 drivers/clk/tegra/clk-tegra30.c |    3 ++-
 drivers/clk/tegra/clk.c         |   11 -----------
 drivers/clk/tegra/clk.h         |   12 ------------
 include/linux/clk/tegra.h       |    1 -
 6 files changed, 6 insertions(+), 28 deletions(-)

diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 3a7280d..4fde6a9 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -22,7 +22,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/of_irq.h>
-#include <linux/clk/tegra.h>
+#include <linux/clk-provider.h>
 
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/gic.h>
@@ -64,7 +64,7 @@ static const struct of_device_id tegra_dt_irq_match[] __initconst = {
 
 void __init tegra_dt_init_irq(void)
 {
-	tegra_clocks_init();
+	of_clk_init(NULL);
 	tegra_init_irq();
 	of_irq_init(tegra_dt_irq_match);
 }
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 32a3d81..3436ad9 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -1193,7 +1193,7 @@ static const struct of_device_id apb_match[] __initconst = {
 	{},
 };
 
-void __init tegra20_clock_init(struct device_node *np)
+static void __init tegra20_clock_init(struct device_node *np)
 {
 	int i;
 	struct device_node *node;
@@ -1253,3 +1253,4 @@ void __init tegra20_clock_init(struct device_node *np)
 
 	tegra_cpu_car_ops = &tegra20_cpu_car_ops;
 }
+CLK_OF_DECLARE(tegra20, "nvidia,tegra20-car", tegra20_clock_init);
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index 30fb743..f17e857 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -1971,7 +1971,7 @@ static const struct of_device_id apb_match[] __initconst = {
 	{},
 };
 
-void __init tegra30_clock_init(struct device_node *np)
+static void __init tegra30_clock_init(struct device_node *np)
 {
 	struct device_node *node;
 	int i;
@@ -2031,3 +2031,4 @@ void __init tegra30_clock_init(struct device_node *np)
 
 	tegra_cpu_car_ops = &tegra30_cpu_car_ops;
 }
+CLK_OF_DECLARE(tegra30, "nvidia,tegra30-car", tegra30_clock_init);
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
index a603b9a..ce4441a 100644
--- a/drivers/clk/tegra/clk.c
+++ b/drivers/clk/tegra/clk.c
@@ -72,14 +72,3 @@ void __init tegra_init_from_table(struct tegra_clk_init_table *tbl,
 			}
 	}
 }
-
-static const struct of_device_id tegra_dt_clk_match[] = {
-	{ .compatible = "nvidia,tegra20-car", .data = tegra20_clock_init },
-	{ .compatible = "nvidia,tegra30-car", .data = tegra30_clock_init },
-	{ }
-};
-
-void __init tegra_clocks_init(void)
-{
-	of_clk_init(tegra_dt_clk_match);
-}
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index f1ed1d0..7fdf8e6 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -476,16 +476,4 @@ void tegra_init_from_table(struct tegra_clk_init_table *tbl,
 void tegra_init_dup_clks(struct tegra_clk_duplicate *dup_list,
 				struct clk *clks[], int clk_max);
 
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-void tegra20_clock_init(struct device_node *np);
-#else
-static inline void tegra20_clock_init(struct device_node *np) {}
-#endif /* CONFIG_ARCH_TEGRA_2x_SOC */
-
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
-void tegra30_clock_init(struct device_node *np);
-#else
-static inline void tegra30_clock_init(struct device_node *np) {}
-#endif /* CONFIG_ARCH_TEGRA_3x_SOC */
-
 #endif /* TEGRA_CLK_H */
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index 404d6f9..2e8b399 100644
--- a/include/linux/clk/tegra.h
+++ b/include/linux/clk/tegra.h
@@ -122,6 +122,5 @@ static inline void tegra_cpu_clock_resume(void)
 
 void tegra_periph_reset_deassert(struct clk *c);
 void tegra_periph_reset_assert(struct clk *c);
-void tegra_clocks_init(void);
 
 #endif /* __LINUX_CLK_TEGRA_H_ */
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 3/7] clk: sunxi: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 2/7] clk: tegra: Use " Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 4/7] clk: highbank: " Prashant Gaikwad
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function to initialize clocks.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 drivers/clk/clk-sunxi.c           |   30 ------------------------------
 drivers/clocksource/sunxi_timer.c |    4 ++--
 include/linux/clk/sunxi.h         |   22 ----------------------
 3 files changed, 2 insertions(+), 54 deletions(-)
 delete mode 100644 drivers/clk/clk-sunxi.c
 delete mode 100644 include/linux/clk/sunxi.h

diff --git a/drivers/clk/clk-sunxi.c b/drivers/clk/clk-sunxi.c
deleted file mode 100644
index 0e831b5..0000000
--- a/drivers/clk/clk-sunxi.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
-#include <linux/clk/sunxi.h>
-#include <linux/of.h>
-
-static const __initconst struct of_device_id clk_match[] = {
-	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-	{}
-};
-
-void __init sunxi_init_clocks(void)
-{
-	of_clk_init(clk_match);
-}
diff --git a/drivers/clocksource/sunxi_timer.c b/drivers/clocksource/sunxi_timer.c
index 6c2ed56..08e1756 100644
--- a/drivers/clocksource/sunxi_timer.c
+++ b/drivers/clocksource/sunxi_timer.c
@@ -23,7 +23,7 @@
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/sunxi_timer.h>
-#include <linux/clk/sunxi.h>
+#include <linux/clk-provider.h>
 
 #define TIMER_CTL_REG		0x00
 #define TIMER_CTL_ENABLE		(1 << 0)
@@ -124,7 +124,7 @@ void __init sunxi_timer_init(void)
 	if (irq <= 0)
 		panic("Can't parse IRQ");
 
-	sunxi_init_clocks();
+	of_clk_init(NULL);
 
 	clk = of_clk_get(node, 0);
 	if (IS_ERR(clk))
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h
deleted file mode 100644
index e074fdd..0000000
--- a/include/linux/clk/sunxi.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LINUX_CLK_SUNXI_H_
-#define __LINUX_CLK_SUNXI_H_
-
-void __init sunxi_init_clocks(void);
-
-#endif
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 4/7] clk: highbank: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 2/7] clk: tegra: Use " Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 3/7] clk: sunxi: " Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-18 17:55   ` Mike Turquette
  2013-01-04  7:00 ` [PATCH 5/7] clk: vt8500: " Prashant Gaikwad
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function for clocks initialization.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 arch/arm/mach-highbank/core.h     |    1 -
 arch/arm/mach-highbank/highbank.c |    3 ++-
 drivers/clk/clk-highbank.c        |   18 ++++--------------
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index 80235b4..3f65206 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -2,7 +2,6 @@
 #define __HIGHBANK_CORE_H
 
 extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
-extern void highbank_clocks_init(void);
 extern void highbank_restart(char, const char *);
 extern void __iomem *scu_base_addr;
 
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index f6ca285..fb148da 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -25,6 +25,7 @@
 #include <linux/of_address.h>
 #include <linux/smp.h>
 #include <linux/amba/bus.h>
+#include <linux/clk-provider.h>
 
 #include <asm/arch_timer.h>
 #include <asm/cacheflush.h>
@@ -116,7 +117,7 @@ static void __init highbank_timer_init(void)
 	WARN_ON(!timer_base);
 	irq = irq_of_parse_and_map(np, 0);
 
-	highbank_clocks_init();
+	of_clk_init(NULL);
 	lookup.clk = of_clk_get(np, 0);
 	clkdev_add(&lookup);
 
diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index 52fecad..5d1de2e 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -314,33 +314,23 @@ static void __init hb_pll_init(struct device_node *node)
 {
 	hb_clk_init(node, &clk_pll_ops);
 }
+CLK_OF_DECLARE(hb_pll, "calxeda,hb-pll-clock", hb_pll_init);
 
 static void __init hb_a9periph_init(struct device_node *node)
 {
 	hb_clk_init(node, &a9periphclk_ops);
 }
+CLK_OF_DECLARE(hb_a9periph, "calxeda,hb-a9periph-clock", hb_a9periph_init);
 
 static void __init hb_a9bus_init(struct device_node *node)
 {
 	struct clk *clk = hb_clk_init(node, &a9bclk_ops);
 	clk_prepare_enable(clk);
 }
+CLK_OF_DECLARE(hb_a9bus, "calxeda,hb-a9bus-clock", hb_a9bus_init);
 
 static void __init hb_emmc_init(struct device_node *node)
 {
 	hb_clk_init(node, &periclk_ops);
 }
-
-static const __initconst struct of_device_id clk_match[] = {
-	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-	{ .compatible = "calxeda,hb-pll-clock", .data = hb_pll_init, },
-	{ .compatible = "calxeda,hb-a9periph-clock", .data = hb_a9periph_init, },
-	{ .compatible = "calxeda,hb-a9bus-clock", .data = hb_a9bus_init, },
-	{ .compatible = "calxeda,hb-emmc-clock", .data = hb_emmc_init, },
-	{}
-};
-
-void __init highbank_clocks_init(void)
-{
-	of_clk_init(clk_match);
-}
+CLK_OF_DECLARE(hb_emmc, "calxeda,hb-emmc-clock", hb_emmc_init);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 5/7] clk: vt8500: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (2 preceding siblings ...)
  2013-01-04  7:00 ` [PATCH 4/7] clk: highbank: " Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-18 17:56   ` Mike Turquette
  2013-01-04  7:00 ` [PATCH 6/7] clk: zynq: " Prashant Gaikwad
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function for clock initialization.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 drivers/clk/clk-vt8500.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
index fe25570..3ce1c3e 100644
--- a/drivers/clk/clk-vt8500.c
+++ b/drivers/clk/clk-vt8500.c
@@ -272,7 +272,7 @@ static __init void vtwm_device_clk_init(struct device_node *node)
 	rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
 	clk_register_clkdev(clk, clk_name, NULL);
 }
-
+CLK_OF_DECLARE(vt8500_device, "via,vt8500-device-clock", vtwm_device_clk_init);
 
 /* PLL clock related functions */
 
@@ -502,20 +502,13 @@ static void __init vt8500_pll_init(struct device_node *node)
 {
 	vtwm_pll_clk_init(node, PLL_TYPE_VT8500);
 }
+CLK_OF_DECLARE(vt8500_pll, "via,vt8500-pll-clock", vt8500_pll_init);
 
 static void __init wm8650_pll_init(struct device_node *node)
 {
 	vtwm_pll_clk_init(node, PLL_TYPE_WM8650);
 }
-
-static const __initconst struct of_device_id clk_match[] = {
-	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-	{ .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, },
-	{ .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, },
-	{ .compatible = "via,vt8500-device-clock",
-					.data = vtwm_device_clk_init, },
-	{ /* sentinel */ }
-};
+CLK_OF_DECLARE(wm8650_pll, "wm,wm8650-pll-clock", wm8650_pll_init);
 
 void __init vtwm_clk_init(void __iomem *base)
 {
@@ -524,5 +517,5 @@ void __init vtwm_clk_init(void __iomem *base)
 
 	pmc_base = base;
 
-	of_clk_init(clk_match);
+	of_clk_init(NULL);
 }
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 6/7] clk: zynq: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (3 preceding siblings ...)
  2013-01-04  7:00 ` [PATCH 5/7] clk: vt8500: " Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-04  7:00 ` [PATCH 7/7] clk: vexpress: " Prashant Gaikwad
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function for clock initialization.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 drivers/clk/clk-zynq.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/clk/clk-zynq.c b/drivers/clk/clk-zynq.c
index 37a3051..b14a25f 100644
--- a/drivers/clk/clk-zynq.c
+++ b/drivers/clk/clk-zynq.c
@@ -81,6 +81,7 @@ static void __init zynq_pll_clk_setup(struct device_node *np)
 	if (WARN_ON(ret))
 		return;
 }
+CLK_OF_DECLARE(zynq_pll, "xlnx,zynq-pll", zynq_pll_clk_setup);
 
 struct zynq_periph_clk {
 	struct clk_hw		hw;
@@ -187,6 +188,7 @@ static void __init zynq_periph_clk_setup(struct device_node *np)
 	if (WARN_ON(err))
 		return;
 }
+CLK_OF_DECLARE(zynq_periph, "xlnx,zynq-periph-clock", zynq_periph_clk_setup);
 
 /* CPU Clock domain is modelled as a mux with 4 children subclks, whose
  * derivative rates depend on CLK_621_TRUE
@@ -366,18 +368,10 @@ static void __init zynq_cpu_clk_setup(struct device_node *np)
 	if (WARN_ON(err))
 		return;
 }
-
-static const __initconst struct of_device_id zynq_clk_match[] = {
-	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-	{ .compatible = "xlnx,zynq-pll", .data = zynq_pll_clk_setup, },
-	{ .compatible = "xlnx,zynq-periph-clock",
-		.data = zynq_periph_clk_setup, },
-	{ .compatible = "xlnx,zynq-cpu-clock", .data = zynq_cpu_clk_setup, },
-	{}
-};
+CLK_OF_DECLARE(zynq_cpu, "xlnx,zynq-cpu-clock", zynq_cpu_clk_setup);
 
 void __init xilinx_zynq_clocks_init(void __iomem *slcr)
 {
 	slcr_base = slcr;
-	of_clk_init(zynq_clk_match);
+	of_clk_init(NULL);
 }
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 7/7] clk: vexpress: Use common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (4 preceding siblings ...)
  2013-01-04  7:00 ` [PATCH 6/7] clk: zynq: " Prashant Gaikwad
@ 2013-01-04  7:00 ` Prashant Gaikwad
  2013-01-18 17:58   ` Mike Turquette
  2013-01-23 10:54   ` Pawel Moll
  2013-01-10 19:53 ` [PATCH 1/7] clk: add " Josh Cartwright
                   ` (2 subsequent siblings)
  8 siblings, 2 replies; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-04  7:00 UTC (permalink / raw)
  To: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Use common of_clk_init() function for clock initialization.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 drivers/clk/versatile/clk-vexpress-osc.c |    1 +
 drivers/clk/versatile/clk-vexpress.c     |    8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index dcb6ae0..256c8be 100644
--- a/drivers/clk/versatile/clk-vexpress-osc.c
+++ b/drivers/clk/versatile/clk-vexpress-osc.c
@@ -144,3 +144,4 @@ error:
 		vexpress_config_func_put(osc->func);
 	kfree(osc);
 }
+CLK_OF_DECLARE(vexpress_soc, "arm,vexpress-osc", vexpress_osc_of_setup);
diff --git a/drivers/clk/versatile/clk-vexpress.c b/drivers/clk/versatile/clk-vexpress.c
index c742ac7..f889f2f 100644
--- a/drivers/clk/versatile/clk-vexpress.c
+++ b/drivers/clk/versatile/clk-vexpress.c
@@ -99,19 +99,13 @@ struct clk *vexpress_sp810_of_get(struct of_phandle_args *clkspec, void *data)
 	return vexpress_sp810_timerclken[clkspec->args[0]];
 }
 
-static const __initconst struct of_device_id vexpress_fixed_clk_match[] = {
-	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-	{ .compatible = "arm,vexpress-osc", .data = vexpress_osc_of_setup, },
-	{}
-};
-
 void __init vexpress_clk_of_init(void)
 {
 	struct device_node *node;
 	struct clk *clk;
 	struct clk *refclk, *timclk;
 
-	of_clk_init(vexpress_fixed_clk_match);
+	of_clk_init(NULL);
 
 	node = of_find_compatible_node(NULL, NULL, "arm,sp810");
 	vexpress_sp810_init(of_iomap(node, 0));
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-04  7:00 ` [PATCH 2/7] clk: tegra: Use " Prashant Gaikwad
@ 2013-01-04 16:30   ` Stephen Warren
  2013-01-05  2:44     ` Prashant Gaikwad
  0 siblings, 1 reply; 26+ messages in thread
From: Stephen Warren @ 2013-01-04 16:30 UTC (permalink / raw)
  To: Prashant Gaikwad
  Cc: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
> Use common of_clk_init() function for clocks initialization.

>  drivers/clk/tegra/clk-tegra20.c |    3 ++-
>  drivers/clk/tegra/clk-tegra30.c |    3 ++-

Oh, so this series is written assuming that the Tegra CCF rework is
already applied then? That makes the dependencies quite painful, since I
think we'll end up with the following order being needed:

1) clk: Add composite clock type
   -> This would usually go through the clk tree.
2) The Tegra CCF rework series
   -> This must go through the Tegra tree due to lots of dependencies
   and merge conflicts with other Tegra patches.
3) This series
   -> This would usually go through the clk tree.

Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
can apply (1) and (3) to the clock tree, then I can use the clk tree as
the basis for a branch in the Tegra tree to apply (2) and all the other
Tegra patches that will conflict with (2)?

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-04 16:30   ` Stephen Warren
@ 2013-01-05  2:44     ` Prashant Gaikwad
  2013-01-24 19:20       ` Mike Turquette
  0 siblings, 1 reply; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-05  2:44 UTC (permalink / raw)
  To: Stephen Warren
  Cc: mturquette, Stephen Warren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
> On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
>> Use common of_clk_init() function for clocks initialization.
>>   drivers/clk/tegra/clk-tegra20.c |    3 ++-
>>   drivers/clk/tegra/clk-tegra30.c |    3 ++-
> Oh, so this series is written assuming that the Tegra CCF rework is
> already applied then? That makes the dependencies quite painful, since I
> think we'll end up with the following order being needed:
>
> 1) clk: Add composite clock type
>     -> This would usually go through the clk tree.
> 2) The Tegra CCF rework series
>     -> This must go through the Tegra tree due to lots of dependencies
>     and merge conflicts with other Tegra patches.
> 3) This series
>     -> This would usually go through the clk tree.
>
> Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
> can apply (1) and (3) to the clock tree, then I can use the clk tree as
> the basis for a branch in the Tegra tree to apply (2) and all the other
> Tegra patches that will conflict with (2)?

If Mike approves the concept and implementation in (1) and (3) then I 
will repost (2) and (3) with dependencies re-ordered.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] clk: add common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (5 preceding siblings ...)
  2013-01-04  7:00 ` [PATCH 7/7] clk: vexpress: " Prashant Gaikwad
@ 2013-01-10 19:53 ` Josh Cartwright
  2013-01-11  5:01   ` Prashant Gaikwad
  2013-01-13  8:57 ` Maxime Ripard
  2013-01-24 17:47 ` Rob Herring
  8 siblings, 1 reply; 26+ messages in thread
From: Josh Cartwright @ 2013-01-10 19:53 UTC (permalink / raw)
  To: Prashant Gaikwad
  Cc: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, linux-kernel, linux-arm-kernel,
	Michal Simek

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

On Fri, Jan 04, 2013 at 12:30:52PM +0530, Prashant Gaikwad wrote:
> Modify of_clk_init function so that it will determine which
> driver to initialize based on device tree instead of each driver
> registering to it.
> 
> Based on a similar patch for drivers/irqchip by Thomas Petazzoni and
> drivers/clocksource by Stephen Warren.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---

Prashant-

Sorry for the late response, but I finally got a chance to give this
patchset a spin on Zynq.  For patches 1 and 6:

Reviewed-by: Josh Cartwright <josh.cartwright@ni.com>
Tested-by: Josh Cartwright <josh.cartwright@ni.com>

  Josh

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] clk: add common of_clk_init() function
  2013-01-10 19:53 ` [PATCH 1/7] clk: add " Josh Cartwright
@ 2013-01-11  5:01   ` Prashant Gaikwad
  0 siblings, 0 replies; 26+ messages in thread
From: Prashant Gaikwad @ 2013-01-11  5:01 UTC (permalink / raw)
  To: Josh Cartwright
  Cc: mturquette, Stephen Warren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, linux-kernel,
	linux-arm-kernel, Michal Simek

On Friday 11 January 2013 01:23 AM, Josh Cartwright wrote:
> * PGP Signed by an unknown key
>
> On Fri, Jan 04, 2013 at 12:30:52PM +0530, Prashant Gaikwad wrote:
>> Modify of_clk_init function so that it will determine which
>> driver to initialize based on device tree instead of each driver
>> registering to it.
>>
>> Based on a similar patch for drivers/irqchip by Thomas Petazzoni and
>> drivers/clocksource by Stephen Warren.
>>
>> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
>> ---
> Prashant-
>
> Sorry for the late response, but I finally got a chance to give this
> patchset a spin on Zynq.  For patches 1 and 6:
>
> Reviewed-by: Josh Cartwright <josh.cartwright@ni.com>
> Tested-by: Josh Cartwright <josh.cartwright@ni.com>
>
>    Josh

Thanks Josh!!

> * Unknown Key
> * 0x846F0FA5


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] clk: add common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (6 preceding siblings ...)
  2013-01-10 19:53 ` [PATCH 1/7] clk: add " Josh Cartwright
@ 2013-01-13  8:57 ` Maxime Ripard
  2013-01-24 17:47 ` Rob Herring
  8 siblings, 0 replies; 26+ messages in thread
From: Maxime Ripard @ 2013-01-13  8:57 UTC (permalink / raw)
  To: Prashant Gaikwad
  Cc: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	linux, josh.cartwright, linux-kernel, linux-arm-kernel

Hi Prashant,

On 04/01/2013 08:00, Prashant Gaikwad wrote:
> Modify of_clk_init function so that it will determine which
> driver to initialize based on device tree instead of each driver
> registering to it.
> 
> Based on a similar patch for drivers/irqchip by Thomas Petazzoni and
> drivers/clocksource by Stephen Warren.

I finally had some time to test your changes on sunxi, and you can add
for patches 1 and 3:
Acked-by: Maxime Ripard <maxime.ripard@anandra.org>

Maxime

-- 
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/7] clk: highbank: Use common of_clk_init() function
  2013-01-04  7:00 ` [PATCH 4/7] clk: highbank: " Prashant Gaikwad
@ 2013-01-18 17:55   ` Mike Turquette
  0 siblings, 0 replies; 26+ messages in thread
From: Mike Turquette @ 2013-01-18 17:55 UTC (permalink / raw)
  To: Prashant Gaikwad, swarren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Quoting Prashant Gaikwad (2013-01-03 23:00:55)
> Use common of_clk_init() function for clocks initialization.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>

Rob,

Can I get a Tested-by from you before I take this?

Thanks,
Mike

> ---
>  arch/arm/mach-highbank/core.h     |    1 -
>  arch/arm/mach-highbank/highbank.c |    3 ++-
>  drivers/clk/clk-highbank.c        |   18 ++++--------------
>  3 files changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
> index 80235b4..3f65206 100644
> --- a/arch/arm/mach-highbank/core.h
> +++ b/arch/arm/mach-highbank/core.h
> @@ -2,7 +2,6 @@
>  #define __HIGHBANK_CORE_H
>  
>  extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
> -extern void highbank_clocks_init(void);
>  extern void highbank_restart(char, const char *);
>  extern void __iomem *scu_base_addr;
>  
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index f6ca285..fb148da 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -25,6 +25,7 @@
>  #include <linux/of_address.h>
>  #include <linux/smp.h>
>  #include <linux/amba/bus.h>
> +#include <linux/clk-provider.h>
>  
>  #include <asm/arch_timer.h>
>  #include <asm/cacheflush.h>
> @@ -116,7 +117,7 @@ static void __init highbank_timer_init(void)
>         WARN_ON(!timer_base);
>         irq = irq_of_parse_and_map(np, 0);
>  
> -       highbank_clocks_init();
> +       of_clk_init(NULL);
>         lookup.clk = of_clk_get(np, 0);
>         clkdev_add(&lookup);
>  
> diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
> index 52fecad..5d1de2e 100644
> --- a/drivers/clk/clk-highbank.c
> +++ b/drivers/clk/clk-highbank.c
> @@ -314,33 +314,23 @@ static void __init hb_pll_init(struct device_node *node)
>  {
>         hb_clk_init(node, &clk_pll_ops);
>  }
> +CLK_OF_DECLARE(hb_pll, "calxeda,hb-pll-clock", hb_pll_init);
>  
>  static void __init hb_a9periph_init(struct device_node *node)
>  {
>         hb_clk_init(node, &a9periphclk_ops);
>  }
> +CLK_OF_DECLARE(hb_a9periph, "calxeda,hb-a9periph-clock", hb_a9periph_init);
>  
>  static void __init hb_a9bus_init(struct device_node *node)
>  {
>         struct clk *clk = hb_clk_init(node, &a9bclk_ops);
>         clk_prepare_enable(clk);
>  }
> +CLK_OF_DECLARE(hb_a9bus, "calxeda,hb-a9bus-clock", hb_a9bus_init);
>  
>  static void __init hb_emmc_init(struct device_node *node)
>  {
>         hb_clk_init(node, &periclk_ops);
>  }
> -
> -static const __initconst struct of_device_id clk_match[] = {
> -       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> -       { .compatible = "calxeda,hb-pll-clock", .data = hb_pll_init, },
> -       { .compatible = "calxeda,hb-a9periph-clock", .data = hb_a9periph_init, },
> -       { .compatible = "calxeda,hb-a9bus-clock", .data = hb_a9bus_init, },
> -       { .compatible = "calxeda,hb-emmc-clock", .data = hb_emmc_init, },
> -       {}
> -};
> -
> -void __init highbank_clocks_init(void)
> -{
> -       of_clk_init(clk_match);
> -}
> +CLK_OF_DECLARE(hb_emmc, "calxeda,hb-emmc-clock", hb_emmc_init);
> -- 
> 1.7.4.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] clk: vt8500: Use common of_clk_init() function
  2013-01-04  7:00 ` [PATCH 5/7] clk: vt8500: " Prashant Gaikwad
@ 2013-01-18 17:56   ` Mike Turquette
  2013-01-18 21:08     ` Tony Prisk
  0 siblings, 1 reply; 26+ messages in thread
From: Mike Turquette @ 2013-01-18 17:56 UTC (permalink / raw)
  To: Prashant Gaikwad, swarren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Quoting Prashant Gaikwad (2013-01-03 23:00:56)
> Use common of_clk_init() function for clock initialization.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>

Tony,

Can I get a Tested-by from you before I take this in?

Thanks,
Mike

> ---
>  drivers/clk/clk-vt8500.c |   15 ++++-----------
>  1 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
> index fe25570..3ce1c3e 100644
> --- a/drivers/clk/clk-vt8500.c
> +++ b/drivers/clk/clk-vt8500.c
> @@ -272,7 +272,7 @@ static __init void vtwm_device_clk_init(struct device_node *node)
>         rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
>         clk_register_clkdev(clk, clk_name, NULL);
>  }
> -
> +CLK_OF_DECLARE(vt8500_device, "via,vt8500-device-clock", vtwm_device_clk_init);
>  
>  /* PLL clock related functions */
>  
> @@ -502,20 +502,13 @@ static void __init vt8500_pll_init(struct device_node *node)
>  {
>         vtwm_pll_clk_init(node, PLL_TYPE_VT8500);
>  }
> +CLK_OF_DECLARE(vt8500_pll, "via,vt8500-pll-clock", vt8500_pll_init);
>  
>  static void __init wm8650_pll_init(struct device_node *node)
>  {
>         vtwm_pll_clk_init(node, PLL_TYPE_WM8650);
>  }
> -
> -static const __initconst struct of_device_id clk_match[] = {
> -       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> -       { .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, },
> -       { .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, },
> -       { .compatible = "via,vt8500-device-clock",
> -                                       .data = vtwm_device_clk_init, },
> -       { /* sentinel */ }
> -};
> +CLK_OF_DECLARE(wm8650_pll, "wm,wm8650-pll-clock", wm8650_pll_init);
>  
>  void __init vtwm_clk_init(void __iomem *base)
>  {
> @@ -524,5 +517,5 @@ void __init vtwm_clk_init(void __iomem *base)
>  
>         pmc_base = base;
>  
> -       of_clk_init(clk_match);
> +       of_clk_init(NULL);
>  }
> -- 
> 1.7.4.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] clk: vexpress: Use common of_clk_init() function
  2013-01-04  7:00 ` [PATCH 7/7] clk: vexpress: " Prashant Gaikwad
@ 2013-01-18 17:58   ` Mike Turquette
  2013-01-21 16:03     ` Pawel Moll
  2013-01-22  9:13     ` Linus Walleij
  2013-01-23 10:54   ` Pawel Moll
  1 sibling, 2 replies; 26+ messages in thread
From: Mike Turquette @ 2013-01-18 17:58 UTC (permalink / raw)
  To: Prashant Gaikwad, swarren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, Pawel Moll
  Cc: linux-kernel, linux-arm-kernel, Prashant Gaikwad

Quoting Prashant Gaikwad (2013-01-03 23:00:58)
> Use common of_clk_init() function for clock initialization.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>

Pawel or Linus,

Can I get a Tested-by before I take this series into clk-next?

Thanks,
Mike

> ---
>  drivers/clk/versatile/clk-vexpress-osc.c |    1 +
>  drivers/clk/versatile/clk-vexpress.c     |    8 +-------
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
> index dcb6ae0..256c8be 100644
> --- a/drivers/clk/versatile/clk-vexpress-osc.c
> +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> @@ -144,3 +144,4 @@ error:
>                 vexpress_config_func_put(osc->func);
>         kfree(osc);
>  }
> +CLK_OF_DECLARE(vexpress_soc, "arm,vexpress-osc", vexpress_osc_of_setup);
> diff --git a/drivers/clk/versatile/clk-vexpress.c b/drivers/clk/versatile/clk-vexpress.c
> index c742ac7..f889f2f 100644
> --- a/drivers/clk/versatile/clk-vexpress.c
> +++ b/drivers/clk/versatile/clk-vexpress.c
> @@ -99,19 +99,13 @@ struct clk *vexpress_sp810_of_get(struct of_phandle_args *clkspec, void *data)
>         return vexpress_sp810_timerclken[clkspec->args[0]];
>  }
>  
> -static const __initconst struct of_device_id vexpress_fixed_clk_match[] = {
> -       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> -       { .compatible = "arm,vexpress-osc", .data = vexpress_osc_of_setup, },
> -       {}
> -};
> -
>  void __init vexpress_clk_of_init(void)
>  {
>         struct device_node *node;
>         struct clk *clk;
>         struct clk *refclk, *timclk;
>  
> -       of_clk_init(vexpress_fixed_clk_match);
> +       of_clk_init(NULL);
>  
>         node = of_find_compatible_node(NULL, NULL, "arm,sp810");
>         vexpress_sp810_init(of_iomap(node, 0));
> -- 
> 1.7.4.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] clk: vt8500: Use common of_clk_init() function
  2013-01-18 17:56   ` Mike Turquette
@ 2013-01-18 21:08     ` Tony Prisk
       [not found]       ` <20130124191534.10623.14882@quantum>
  0 siblings, 1 reply; 26+ messages in thread
From: Tony Prisk @ 2013-01-18 21:08 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Prashant Gaikwad, swarren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, josh.cartwright, linux-kernel,
	linux-arm-kernel

On Fri, 2013-01-18 at 09:56 -0800, Mike Turquette wrote:
> Quoting Prashant Gaikwad (2013-01-03 23:00:56)
> > Use common of_clk_init() function for clock initialization.
> > 
> > Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> 
> Tony,
> 
> Can I get a Tested-by from you before I take this in?
> 
Tested-by: Tony Prisk <linux@prisktech.co.nz>

FYI: This will need another patch to complete as we added another set of
clocks to this clk-vt8500.c for 3.9.

> Thanks,
> Mike
> 
> > ---
> >  drivers/clk/clk-vt8500.c |   15 ++++-----------
> >  1 files changed, 4 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
> > index fe25570..3ce1c3e 100644
> > --- a/drivers/clk/clk-vt8500.c
> > +++ b/drivers/clk/clk-vt8500.c
> > @@ -272,7 +272,7 @@ static __init void vtwm_device_clk_init(struct device_node *node)
> >         rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
> >         clk_register_clkdev(clk, clk_name, NULL);
> >  }
> > -
> > +CLK_OF_DECLARE(vt8500_device, "via,vt8500-device-clock", vtwm_device_clk_init);
> >  
> >  /* PLL clock related functions */
> >  
> > @@ -502,20 +502,13 @@ static void __init vt8500_pll_init(struct device_node *node)
> >  {
> >         vtwm_pll_clk_init(node, PLL_TYPE_VT8500);
> >  }
> > +CLK_OF_DECLARE(vt8500_pll, "via,vt8500-pll-clock", vt8500_pll_init);
> >  
> >  static void __init wm8650_pll_init(struct device_node *node)
> >  {
> >         vtwm_pll_clk_init(node, PLL_TYPE_WM8650);
> >  }
> > -
> > -static const __initconst struct of_device_id clk_match[] = {
> > -       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> > -       { .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, },
> > -       { .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, },
> > -       { .compatible = "via,vt8500-device-clock",
> > -                                       .data = vtwm_device_clk_init, },
> > -       { /* sentinel */ }
> > -};
> > +CLK_OF_DECLARE(wm8650_pll, "wm,wm8650-pll-clock", wm8650_pll_init);
> >  
> >  void __init vtwm_clk_init(void __iomem *base)
> >  {
> > @@ -524,5 +517,5 @@ void __init vtwm_clk_init(void __iomem *base)
> >  
> >         pmc_base = base;
> >  
> > -       of_clk_init(clk_match);
> > +       of_clk_init(NULL);
> >  }
> > -- 
> > 1.7.4.1
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] clk: vexpress: Use common of_clk_init() function
  2013-01-18 17:58   ` Mike Turquette
@ 2013-01-21 16:03     ` Pawel Moll
  2013-01-22  9:13     ` Linus Walleij
  1 sibling, 0 replies; 26+ messages in thread
From: Pawel Moll @ 2013-01-21 16:03 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Prashant Gaikwad, swarren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On Fri, 2013-01-18 at 17:58 +0000, Mike Turquette wrote:
> Quoting Prashant Gaikwad (2013-01-03 23:00:58)
> > Use common of_clk_init() function for clock initialization.
> > 
> > Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> 
> Pawel or Linus,
> 
> Can I get a Tested-by before I take this series into clk-next?

I'll just got back to work and will test it soon, most likely tomorrow.

Cheers!

Pawel



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] clk: vexpress: Use common of_clk_init() function
  2013-01-18 17:58   ` Mike Turquette
  2013-01-21 16:03     ` Pawel Moll
@ 2013-01-22  9:13     ` Linus Walleij
  1 sibling, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2013-01-22  9:13 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Prashant Gaikwad, swarren, grant.likely, rob.herring,
	maxime.ripard, linux, josh.cartwright, Pawel Moll, linux-kernel,
	linux-arm-kernel

On Fri, Jan 18, 2013 at 6:58 PM, Mike Turquette <mturquette@linaro.org> wrote:
> Quoting Prashant Gaikwad (2013-01-03 23:00:58)
>> Use common of_clk_init() function for clock initialization.
>>
>> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
>
> Pawel or Linus,
>
> Can I get a Tested-by before I take this series into clk-next?

For this specific patch, I don't have a vexpress board, sorry...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] clk: vexpress: Use common of_clk_init() function
  2013-01-04  7:00 ` [PATCH 7/7] clk: vexpress: " Prashant Gaikwad
  2013-01-18 17:58   ` Mike Turquette
@ 2013-01-23 10:54   ` Pawel Moll
  1 sibling, 0 replies; 26+ messages in thread
From: Pawel Moll @ 2013-01-23 10:54 UTC (permalink / raw)
  To: Prashant Gaikwad
  Cc: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On Fri, 2013-01-04 at 07:00 +0000, Prashant Gaikwad wrote:
> Use common of_clk_init() function for clock initialization.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>

Just tested on VE, looks good to me.

So for this patch and the "[1/7] clk: add common of_clk_init() function"
one:

Tested-by: Pawel Moll <pawel.moll@arm.com>

Cheers!

Pawel



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] clk: add common of_clk_init() function
  2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
                   ` (7 preceding siblings ...)
  2013-01-13  8:57 ` Maxime Ripard
@ 2013-01-24 17:47 ` Rob Herring
  8 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2013-01-24 17:47 UTC (permalink / raw)
  To: Prashant Gaikwad
  Cc: mturquette, swarren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On 01/04/2013 01:00 AM, Prashant Gaikwad wrote:
> Modify of_clk_init function so that it will determine which
> driver to initialize based on device tree instead of each driver
> registering to it.
> 
> Based on a similar patch for drivers/irqchip by Thomas Petazzoni and
> drivers/clocksource by Stephen Warren.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---

For this and highbank:

Tested-by: Rob Herring <rob.herring@calxeda.com>

>  drivers/clk/clk-fixed-rate.c      |    1 +
>  drivers/clk/clk.c                 |    9 +++++++++
>  include/asm-generic/vmlinux.lds.h |   10 ++++++++++
>  include/linux/clk-provider.h      |    6 ++++++
>  4 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index af78ed6..f2104df 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -101,4 +101,5 @@ void __init of_fixed_clk_setup(struct device_node *node)
>  		of_clk_add_provider(node, of_clk_src_simple_get, clk);
>  }
>  EXPORT_SYMBOL_GPL(of_fixed_clk_setup);
> +CLK_OF_DECLARE(fixed_clk, "fixed-clock", of_fixed_clk_setup);
>  #endif
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 037b48a..fb38dd8 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -18,6 +18,7 @@
>  #include <linux/slab.h>
>  #include <linux/of.h>
>  #include <linux/device.h>
> +#include <linux/init.h>
>  
>  static DEFINE_SPINLOCK(enable_lock);
>  static DEFINE_MUTEX(prepare_lock);
> @@ -1805,6 +1806,11 @@ struct of_clk_provider {
>  	void *data;
>  };
>  
> +extern struct of_device_id __clk_of_table[];
> +
> +static const struct of_device_id __clk_of_table_sentinel
> +	__used __section(__clk_of_table_end);
> +
>  static LIST_HEAD(of_clk_providers);
>  static DEFINE_MUTEX(of_clk_lock);
>  
> @@ -1933,6 +1939,9 @@ void __init of_clk_init(const struct of_device_id *matches)
>  {
>  	struct device_node *np;
>  
> +	if (!matches)
> +		matches = __clk_of_table;
> +
>  	for_each_matching_node(np, matches) {
>  		const struct of_device_id *match = of_match_node(matches, np);
>  		of_clk_init_cb_t clk_init_cb = match->data;
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 1e744c5..8282f7c 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -158,6 +158,15 @@
>  #define CLKSRC_OF_TABLES()
>  #endif
>  
> +#ifdef CONFIG_COMMON_CLK
> +#define CLK_OF_TABLES() . = ALIGN(8);				\
> +			VMLINUX_SYMBOL(__clk_of_table) = .;	\
> +			*(__clk_of_table)			\
> +			*(__clk_of_table_end)
> +#else
> +#define CLK_OF_TABLES()
> +#endif
> +
>  #define KERNEL_DTB()							\
>  	STRUCT_ALIGN();							\
>  	VMLINUX_SYMBOL(__dtb_start) = .;				\
> @@ -502,6 +511,7 @@
>  	CPU_DISCARD(init.rodata)					\
>  	MEM_DISCARD(init.rodata)					\
>  	CLKSRC_OF_TABLES()						\
> +	CLK_OF_TABLES()							\
>  	KERNEL_DTB()
>  
>  #define INIT_TEXT							\
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 4989b8a..7f197d7 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -379,7 +379,13 @@ struct clk_onecell_data {
>  };
>  struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
>  const char *of_clk_get_parent_name(struct device_node *np, int index);
> +
>  void of_clk_init(const struct of_device_id *matches);
>  
> +#define CLK_OF_DECLARE(name, compat, fn)			\
> +	static const struct of_device_id __clk_of_table_##name	\
> +		__used __section(__clk_of_table)		\
> +		= { .compatible = compat, .data = fn };
> +
>  #endif /* CONFIG_COMMON_CLK */
>  #endif /* CLK_PROVIDER_H */
> 


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-05  2:44     ` Prashant Gaikwad
@ 2013-01-24 19:20       ` Mike Turquette
  2013-01-24 19:32         ` Stephen Warren
  0 siblings, 1 reply; 26+ messages in thread
From: Mike Turquette @ 2013-01-24 19:20 UTC (permalink / raw)
  To: Prashant Gaikwad, Stephen Warren
  Cc: Stephen Warren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

Quoting Prashant Gaikwad (2013-01-04 18:44:48)
> On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
> > On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
> >> Use common of_clk_init() function for clocks initialization.
> >>   drivers/clk/tegra/clk-tegra20.c |    3 ++-
> >>   drivers/clk/tegra/clk-tegra30.c |    3 ++-
> > Oh, so this series is written assuming that the Tegra CCF rework is
> > already applied then? That makes the dependencies quite painful, since I
> > think we'll end up with the following order being needed:
> >
> > 1) clk: Add composite clock type
> >     -> This would usually go through the clk tree.
> > 2) The Tegra CCF rework series
> >     -> This must go through the Tegra tree due to lots of dependencies
> >     and merge conflicts with other Tegra patches.
> > 3) This series
> >     -> This would usually go through the clk tree.
> >
> > Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
> > can apply (1) and (3) to the clock tree, then I can use the clk tree as
> > the basis for a branch in the Tegra tree to apply (2) and all the other
> > Tegra patches that will conflict with (2)?
> 
> If Mike approves the concept and implementation in (1) and (3) then I 
> will repost (2) and (3) with dependencies re-ordered.

Patch (1) still has some unaddressed comments, and is not a real
dependency for this series.  Since all of the patches have received their
Tested-by's then I propose to merge all patches from this series into
clk-next, which exception of patch 2/7 (the Tegra patch).

This reduces your Tegra CCF conversion dependencies and you can role the
necessary of_clk_init change into your Tegra CCF conversion branch (it
has my implicit Ack and can be taken through your tree).

Let me know if this is OK for you.

Thanks,
Mike

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-24 19:20       ` Mike Turquette
@ 2013-01-24 19:32         ` Stephen Warren
       [not found]           ` <20130125005729.10623.61165@quantum>
  0 siblings, 1 reply; 26+ messages in thread
From: Stephen Warren @ 2013-01-24 19:32 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Prashant Gaikwad, Stephen Warren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel

On 01/24/2013 11:20 AM, Mike Turquette wrote:
> Quoting Prashant Gaikwad (2013-01-04 18:44:48)
>> On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
>>> On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
>>>> Use common of_clk_init() function for clocks initialization.
>>>>   drivers/clk/tegra/clk-tegra20.c |    3 ++-
>>>>   drivers/clk/tegra/clk-tegra30.c |    3 ++-
>>> Oh, so this series is written assuming that the Tegra CCF rework is
>>> already applied then? That makes the dependencies quite painful, since I
>>> think we'll end up with the following order being needed:
>>>
>>> 1) clk: Add composite clock type
>>>     -> This would usually go through the clk tree.
>>> 2) The Tegra CCF rework series
>>>     -> This must go through the Tegra tree due to lots of dependencies
>>>     and merge conflicts with other Tegra patches.
>>> 3) This series
>>>     -> This would usually go through the clk tree.
>>>
>>> Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
>>> can apply (1) and (3) to the clock tree, then I can use the clk tree as
>>> the basis for a branch in the Tegra tree to apply (2) and all the other
>>> Tegra patches that will conflict with (2)?
>>
>> If Mike approves the concept and implementation in (1) and (3) then I 
>> will repost (2) and (3) with dependencies re-ordered.
> 
> Patch (1) still has some unaddressed comments, and is not a real
> dependency for this series.

I assume "Patch (1)" refers to the list of series a couple emails above,
not the first patch in the series you're replying to; that threw me for
a moment.

> Since all of the patches have received their
> Tested-by's then I propose to merge all patches from this series into
> clk-next, which exception of patch 2/7 (the Tegra patch).
> 
> This reduces your Tegra CCF conversion dependencies and you can role the
> necessary of_clk_init change into your Tegra CCF conversion branch (it
> has my implicit Ack and can be taken through your tree).
> 
> Let me know if this is OK for you.

OK, I'm happy to merge your clock tree into the Tegra tree and then
apply 2/7 on top of the Tegra CCF work.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] clk: vt8500: Use common of_clk_init() function
       [not found]       ` <20130124191534.10623.14882@quantum>
@ 2013-01-25  4:01         ` Tony Prisk
  0 siblings, 0 replies; 26+ messages in thread
From: Tony Prisk @ 2013-01-25  4:01 UTC (permalink / raw)
  To: Mike Turquette
  Cc: josh.cartwright, Prashant Gaikwad, swarren, linus.walleij,
	linux-kernel, rob.herring, grant.likely, maxime.ripard,
	linux-arm-kernel

On Thu, 2013-01-24 at 11:15 -0800, Mike Turquette wrote:
> Quoting Tony Prisk (2013-01-18 13:08:00)
> > On Fri, 2013-01-18 at 09:56 -0800, Mike Turquette wrote:
> > > Quoting Prashant Gaikwad (2013-01-03 23:00:56)
> > > > Use common of_clk_init() function for clock initialization.
> > > > 
> > > > Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> > > 
> > > Tony,
> > > 
> > > Can I get a Tested-by from you before I take this in?
> > > 
> > Tested-by: Tony Prisk <linux@prisktech.co.nz>
> > 
> > FYI: This will need another patch to complete as we added another set of
> > clocks to this clk-vt8500.c for 3.9.
> > 
> 
> Tony, is the following patch correct?
> 
> 
> From 5b6e0adb69674c684c33503f50010644b049029c Mon Sep 17 00:00:00 2001
> From: Prashant Gaikwad <pgaikwad@nvidia.com>
> Date: Fri, 4 Jan 2013 12:30:56 +0530
> Subject: [PATCH] clk: vt8500: Use common of_clk_init() function
> 
> Use common of_clk_init() function for clock initialization.
> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> Tested-by: Tony Prisk <linux@prisktech.co.nz>
> Signed-off-by: Mike Turquette <mturquette@linaro.org>
> [mturquette@linaro.org: added entry for wm8750-pll-clock]
> 
> Signed-off-by: Mike Turquette <mturquette@linaro.org>
> ---
>  drivers/clk/clk-vt8500.c |   17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
> index 2515d4f..b5538bb 100644
> --- a/drivers/clk/clk-vt8500.c
> +++ b/drivers/clk/clk-vt8500.c
> @@ -291,7 +291,7 @@ static __init void vtwm_device_clk_init(struct device_node *node)
>  	rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
>  	clk_register_clkdev(clk, clk_name, NULL);
>  }
> -
> +CLK_OF_DECLARE(vt8500_device, "via,vt8500-device-clock", vtwm_device_clk_init);
>  
>  /* PLL clock related functions */
>  
> @@ -612,26 +612,19 @@ static void __init vt8500_pll_init(struct device_node *node)
>  {
>  	vtwm_pll_clk_init(node, PLL_TYPE_VT8500);
>  }
> +CLK_OF_DECLARE(vt8500_pll, "via,vt8500-pll-clock", vt8500_pll_init);
>  
>  static void __init wm8650_pll_init(struct device_node *node)
>  {
>  	vtwm_pll_clk_init(node, PLL_TYPE_WM8650);
>  }
> +CLK_OF_DECLARE(wm8650_pll, "wm,wm8650-pll-clock", wm8650_pll_init);
>  
>  static void __init wm8750_pll_init(struct device_node *node)
>  {
>  	vtwm_pll_clk_init(node, PLL_TYPE_WM8750);
>  }
> -
> -static const __initconst struct of_device_id clk_match[] = {
> -	{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> -	{ .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, },
> -	{ .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, },
> -	{ .compatible = "wm,wm8750-pll-clock", .data = wm8750_pll_init, },
> -	{ .compatible = "via,vt8500-device-clock",
> -					.data = vtwm_device_clk_init, },
> -	{ /* sentinel */ }
> -};
> +CLK_OF_DECLARE(wm8750_pll, "wm,wm8750-pll-clock", wm8750_pll_init);
>  
>  void __init vtwm_clk_init(void __iomem *base)
>  {
> @@ -640,5 +633,5 @@ void __init vtwm_clk_init(void __iomem *base)
>  
>  	pmc_base = base;
>  
> -	of_clk_init(clk_match);
> +	of_clk_init(NULL);
>  }

Yeap - this patch is fine.

Tested-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tony Prisk <linux@prisktech.co.nz>

Take your pick which signoff you want :)

Regards
Tony P


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
       [not found]           ` <20130125005729.10623.61165@quantum>
@ 2013-01-25  4:44             ` Stephen Warren
  2013-02-01  4:49               ` Prashant Gaikwad
  0 siblings, 1 reply; 26+ messages in thread
From: Stephen Warren @ 2013-01-25  4:44 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Prashant Gaikwad, Stephen Warren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel, arnd

On 01/24/2013 04:57 PM, Mike Turquette wrote:
> Quoting Stephen Warren (2013-01-24 11:32:37)
>> On 01/24/2013 11:20 AM, Mike Turquette wrote:
>>> Quoting Prashant Gaikwad (2013-01-04 18:44:48)
>>>> On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
>>>>> On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
>>>>>> Use common of_clk_init() function for clocks initialization.
>>>>>>   drivers/clk/tegra/clk-tegra20.c |    3 ++-
>>>>>>   drivers/clk/tegra/clk-tegra30.c |    3 ++-
>>>>> Oh, so this series is written assuming that the Tegra CCF rework is
>>>>> already applied then? That makes the dependencies quite painful, since I
>>>>> think we'll end up with the following order being needed:
>>>>>
>>>>> 1) clk: Add composite clock type
>>>>>     -> This would usually go through the clk tree.
>>>>> 2) The Tegra CCF rework series
>>>>>     -> This must go through the Tegra tree due to lots of dependencies
>>>>>     and merge conflicts with other Tegra patches.
>>>>> 3) This series
>>>>>     -> This would usually go through the clk tree.
>>>>>
>>>>> Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
>>>>> can apply (1) and (3) to the clock tree, then I can use the clk tree as
>>>>> the basis for a branch in the Tegra tree to apply (2) and all the other
>>>>> Tegra patches that will conflict with (2)?
>>>>
>>>> If Mike approves the concept and implementation in (1) and (3) then I 
>>>> will repost (2) and (3) with dependencies re-ordered.
>>>
>>> Patch (1) still has some unaddressed comments, and is not a real
>>> dependency for this series.
>>
>> I assume "Patch (1)" refers to the list of series a couple emails above,
>> not the first patch in the series you're replying to; that threw me for
>> a moment.
>>
>>> Since all of the patches have received their
>>> Tested-by's then I propose to merge all patches from this series into
>>> clk-next, which exception of patch 2/7 (the Tegra patch).
>>>
>>> This reduces your Tegra CCF conversion dependencies and you can role the
>>> necessary of_clk_init change into your Tegra CCF conversion branch (it
>>> has my implicit Ack and can be taken through your tree).
>>>
>>> Let me know if this is OK for you.
>>
>> OK, I'm happy to merge your clock tree into the Tegra tree and then
>> apply 2/7 on top of the Tegra CCF work.
> 
> Hmm, maybe the clk tree needs to be a dependency branch of arm-soc
> again, as it has in the past.  Would that help with any Tegra merge
> pain?

Yes, I think that's what would end up happening if I merge the clk tree
into the Tegra tree anyway.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-01-25  4:44             ` Stephen Warren
@ 2013-02-01  4:49               ` Prashant Gaikwad
  2013-02-01 22:53                 ` Mike Turquette
  0 siblings, 1 reply; 26+ messages in thread
From: Prashant Gaikwad @ 2013-02-01  4:49 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Mike Turquette, Stephen Warren, grant.likely, linus.walleij,
	rob.herring, maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel, arnd

On Friday 25 January 2013 10:14 AM, Stephen Warren wrote:
> On 01/24/2013 04:57 PM, Mike Turquette wrote:
>> Quoting Stephen Warren (2013-01-24 11:32:37)
>>> On 01/24/2013 11:20 AM, Mike Turquette wrote:
>>>> Quoting Prashant Gaikwad (2013-01-04 18:44:48)
>>>>> On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
>>>>>> On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
>>>>>>> Use common of_clk_init() function for clocks initialization.
>>>>>>>    drivers/clk/tegra/clk-tegra20.c |    3 ++-
>>>>>>>    drivers/clk/tegra/clk-tegra30.c |    3 ++-
>>>>>> Oh, so this series is written assuming that the Tegra CCF rework is
>>>>>> already applied then? That makes the dependencies quite painful, since I
>>>>>> think we'll end up with the following order being needed:
>>>>>>
>>>>>> 1) clk: Add composite clock type
>>>>>>      -> This would usually go through the clk tree.
>>>>>> 2) The Tegra CCF rework series
>>>>>>      -> This must go through the Tegra tree due to lots of dependencies
>>>>>>      and merge conflicts with other Tegra patches.
>>>>>> 3) This series
>>>>>>      -> This would usually go through the clk tree.
>>>>>>
>>>>>> Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
>>>>>> can apply (1) and (3) to the clock tree, then I can use the clk tree as
>>>>>> the basis for a branch in the Tegra tree to apply (2) and all the other
>>>>>> Tegra patches that will conflict with (2)?
>>>>> If Mike approves the concept and implementation in (1) and (3) then I
>>>>> will repost (2) and (3) with dependencies re-ordered.
>>>> Patch (1) still has some unaddressed comments, and is not a real
>>>> dependency for this series.
>>> I assume "Patch (1)" refers to the list of series a couple emails above,
>>> not the first patch in the series you're replying to; that threw me for
>>> a moment.
>>>
>>>> Since all of the patches have received their
>>>> Tested-by's then I propose to merge all patches from this series into
>>>> clk-next, which exception of patch 2/7 (the Tegra patch).
>>>>
>>>> This reduces your Tegra CCF conversion dependencies and you can role the
>>>> necessary of_clk_init change into your Tegra CCF conversion branch (it
>>>> has my implicit Ack and can be taken through your tree).
>>>>
>>>> Let me know if this is OK for you.
>>> OK, I'm happy to merge your clock tree into the Tegra tree and then
>>> apply 2/7 on top of the Tegra CCF work.
>> Hmm, maybe the clk tree needs to be a dependency branch of arm-soc
>> again, as it has in the past.  Would that help with any Tegra merge
>> pain?
> Yes, I think that's what would end up happening if I merge the clk tree
> into the Tegra tree anyway.

Hi Mike,

Have you merged these patches for 3.9?



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
  2013-02-01  4:49               ` Prashant Gaikwad
@ 2013-02-01 22:53                 ` Mike Turquette
  0 siblings, 0 replies; 26+ messages in thread
From: Mike Turquette @ 2013-02-01 22:53 UTC (permalink / raw)
  To: Prashant Gaikwad, Stephen Warren
  Cc: Stephen Warren, grant.likely, linus.walleij, rob.herring,
	maxime.ripard, linux, josh.cartwright, linux-kernel,
	linux-arm-kernel, arnd

Quoting Prashant Gaikwad (2013-01-31 20:49:47)
> On Friday 25 January 2013 10:14 AM, Stephen Warren wrote:
> > On 01/24/2013 04:57 PM, Mike Turquette wrote:
> >> Quoting Stephen Warren (2013-01-24 11:32:37)
> >>> On 01/24/2013 11:20 AM, Mike Turquette wrote:
> >>>> Quoting Prashant Gaikwad (2013-01-04 18:44:48)
> >>>>> On Friday 04 January 2013 10:00 PM, Stephen Warren wrote:
> >>>>>> On 01/04/2013 12:00 AM, Prashant Gaikwad wrote:
> >>>>>>> Use common of_clk_init() function for clocks initialization.
> >>>>>>>    drivers/clk/tegra/clk-tegra20.c |    3 ++-
> >>>>>>>    drivers/clk/tegra/clk-tegra30.c |    3 ++-
> >>>>>> Oh, so this series is written assuming that the Tegra CCF rework is
> >>>>>> already applied then? That makes the dependencies quite painful, since I
> >>>>>> think we'll end up with the following order being needed:
> >>>>>>
> >>>>>> 1) clk: Add composite clock type
> >>>>>>      -> This would usually go through the clk tree.
> >>>>>> 2) The Tegra CCF rework series
> >>>>>>      -> This must go through the Tegra tree due to lots of dependencies
> >>>>>>      and merge conflicts with other Tegra patches.
> >>>>>> 3) This series
> >>>>>>      -> This would usually go through the clk tree.
> >>>>>>
> >>>>>> Is it possible to re-order the dependencies as (1) (3) (2), so that Mike
> >>>>>> can apply (1) and (3) to the clock tree, then I can use the clk tree as
> >>>>>> the basis for a branch in the Tegra tree to apply (2) and all the other
> >>>>>> Tegra patches that will conflict with (2)?
> >>>>> If Mike approves the concept and implementation in (1) and (3) then I
> >>>>> will repost (2) and (3) with dependencies re-ordered.
> >>>> Patch (1) still has some unaddressed comments, and is not a real
> >>>> dependency for this series.
> >>> I assume "Patch (1)" refers to the list of series a couple emails above,
> >>> not the first patch in the series you're replying to; that threw me for
> >>> a moment.
> >>>
> >>>> Since all of the patches have received their
> >>>> Tested-by's then I propose to merge all patches from this series into
> >>>> clk-next, which exception of patch 2/7 (the Tegra patch).
> >>>>
> >>>> This reduces your Tegra CCF conversion dependencies and you can role the
> >>>> necessary of_clk_init change into your Tegra CCF conversion branch (it
> >>>> has my implicit Ack and can be taken through your tree).
> >>>>
> >>>> Let me know if this is OK for you.
> >>> OK, I'm happy to merge your clock tree into the Tegra tree and then
> >>> apply 2/7 on top of the Tegra CCF work.
> >> Hmm, maybe the clk tree needs to be a dependency branch of arm-soc
> >> again, as it has in the past.  Would that help with any Tegra merge
> >> pain?
> > Yes, I think that's what would end up happening if I merge the clk tree
> > into the Tegra tree anyway.
> 
> Hi Mike,
> 
> Have you merged these patches for 3.9?

Yes, these have been sitting in clk-next for a few days now.

Regards,
Mike

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2013-02-01 22:54 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04  7:00 [PATCH 1/7] clk: add common of_clk_init() function Prashant Gaikwad
2013-01-04  7:00 ` [PATCH 2/7] clk: tegra: Use " Prashant Gaikwad
2013-01-04 16:30   ` Stephen Warren
2013-01-05  2:44     ` Prashant Gaikwad
2013-01-24 19:20       ` Mike Turquette
2013-01-24 19:32         ` Stephen Warren
     [not found]           ` <20130125005729.10623.61165@quantum>
2013-01-25  4:44             ` Stephen Warren
2013-02-01  4:49               ` Prashant Gaikwad
2013-02-01 22:53                 ` Mike Turquette
2013-01-04  7:00 ` [PATCH 3/7] clk: sunxi: " Prashant Gaikwad
2013-01-04  7:00 ` [PATCH 4/7] clk: highbank: " Prashant Gaikwad
2013-01-18 17:55   ` Mike Turquette
2013-01-04  7:00 ` [PATCH 5/7] clk: vt8500: " Prashant Gaikwad
2013-01-18 17:56   ` Mike Turquette
2013-01-18 21:08     ` Tony Prisk
     [not found]       ` <20130124191534.10623.14882@quantum>
2013-01-25  4:01         ` Tony Prisk
2013-01-04  7:00 ` [PATCH 6/7] clk: zynq: " Prashant Gaikwad
2013-01-04  7:00 ` [PATCH 7/7] clk: vexpress: " Prashant Gaikwad
2013-01-18 17:58   ` Mike Turquette
2013-01-21 16:03     ` Pawel Moll
2013-01-22  9:13     ` Linus Walleij
2013-01-23 10:54   ` Pawel Moll
2013-01-10 19:53 ` [PATCH 1/7] clk: add " Josh Cartwright
2013-01-11  5:01   ` Prashant Gaikwad
2013-01-13  8:57 ` Maxime Ripard
2013-01-24 17:47 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).