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 4/7] clk: highbank: Use common of_clk_init() function
Date: Fri, 4 Jan 2013 12:30:55 +0530 [thread overview]
Message-ID: <1357282858-2112-4-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-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
next prev parent 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 ` [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 ` Prashant Gaikwad [this message]
2013-01-18 17:55 ` [PATCH 4/7] clk: highbank: " 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-4-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®