summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2013-08-19 21:35:35 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-08-30 19:34:36 -0700
commit06139bf5f233c03ce1aad929e0adf75fc5fb5898 (patch)
tree55bd1866c342894233935216cf8db5e154b559a3 /drivers/clocksource
parent0e653907ac1d0be9172419c884b820c11864b567 (diff)
Revert "clocksource: pass DT node pointer to init functions"
This reverts commit effbfdd7baf7babc73154b87a5ff940969cf6559. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/bcm2835_timer.c12
-rw-r--r--drivers/clocksource/clksrc-of.c2
-rw-r--r--drivers/clocksource/tegra20_timer.c3
-rw-r--r--drivers/clocksource/vt8500_timer.c14
4 files changed, 27 insertions, 4 deletions
diff --git a/drivers/clocksource/bcm2835_timer.c b/drivers/clocksource/bcm2835_timer.c
index 766611d29945..50c68fef944b 100644
--- a/drivers/clocksource/bcm2835_timer.c
+++ b/drivers/clocksource/bcm2835_timer.c
@@ -95,13 +95,23 @@ static irqreturn_t bcm2835_time_interrupt(int irq, void *dev_id)
}
}
-static void __init bcm2835_timer_init(struct device_node *node)
+static struct of_device_id bcm2835_time_match[] __initconst = {
+ { .compatible = "brcm,bcm2835-system-timer" },
+ {}
+};
+
+static void __init bcm2835_timer_init(void)
{
+ struct device_node *node;
void __iomem *base;
u32 freq;
int irq;
struct bcm2835_timer *timer;
+ node = of_find_matching_node(NULL, bcm2835_time_match);
+ if (!node)
+ panic("No bcm2835 timer node");
+
base = of_iomap(node, 0);
if (!base)
panic("Can't remap registers");
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 37f5325bec95..560d653c8e0e 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -31,6 +31,6 @@ void __init clocksource_of_init(void)
for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
init_func = match->data;
- init_func(np);
+ init_func();
}
}
diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
index b3396ab15f63..0bde03feb095 100644
--- a/drivers/clocksource/tegra20_timer.c
+++ b/drivers/clocksource/tegra20_timer.c
@@ -164,8 +164,9 @@ static const struct of_device_id rtc_match[] __initconst = {
{}
};
-static void __init tegra20_init_timer(struct device_node *np)
+static void __init tegra20_init_timer(void)
{
+ struct device_node *np;
struct clk *clk;
unsigned long rate;
int ret;
diff --git a/drivers/clocksource/vt8500_timer.c b/drivers/clocksource/vt8500_timer.c
index 64f553f04fa4..a07afdce4e69 100644
--- a/drivers/clocksource/vt8500_timer.c
+++ b/drivers/clocksource/vt8500_timer.c
@@ -129,10 +129,22 @@ static struct irqaction irq = {
.dev_id = &clockevent,
};
-static void __init vt8500_timer_init(struct device_node *np)
+static struct of_device_id vt8500_timer_ids[] = {
+ { .compatible = "via,vt8500-timer" },
+ { }
+};
+
+static void __init vt8500_timer_init(void)
{
+ struct device_node *np;
int timer_irq;
+ np = of_find_matching_node(NULL, vt8500_timer_ids);
+ if (!np) {
+ pr_err("%s: Timer description missing from Device Tree\n",
+ __func__);
+ return;
+ }
regbase = of_iomap(np, 0);
if (!regbase) {
pr_err("%s: Missing iobase description in Device Tree\n",