mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prashant Gaikwad <pgaikwad@nvidia.com>
To: <mturquette@linaro.org>, <swarren@nvidia.com>,
	<grant.likely@secretlab.ca>, <linus.walleij@linaro.org>,
	<rob.herring@calxeda.com>, <maxime.ripard@free-electrons.com>,
	<linux@prisktech.co.nz>, <josh.cartwright@ni.com>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Prashant Gaikwad <pgaikwad@nvidia.com>
Subject: [PATCH 2/7] clk: tegra: Use common of_clk_init() function
Date: Fri, 4 Jan 2013 12:30:53 +0530	[thread overview]
Message-ID: <1357282858-2112-2-git-send-email-pgaikwad@nvidia.com> (raw)
In-Reply-To: <1357282858-2112-1-git-send-email-pgaikwad@nvidia.com>

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


  reply	other threads:[~2013-01-04  7:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04  7:00 [PATCH 1/7] clk: add " Prashant Gaikwad
2013-01-04  7:00 ` Prashant Gaikwad [this message]
2013-01-04 16:30   ` [PATCH 2/7] clk: tegra: Use " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357282858-2112-2-git-send-email-pgaikwad@nvidia.com \
    --to=pgaikwad@nvidia.com \
    --cc=grant.likely@secretlab.ca \
    --cc=josh.cartwright@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®