diff options
author | Ezequiel Garcia <ezequiel.garcia@imgtec.com> | 2015-07-27 10:00:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-09-03 06:08:06 -0400 |
commit | 67d4e669c1e504a491e44737f3561eaba919b304 (patch) | |
tree | 2b4e355c36ca17fc832a65b64f43f0dca503d36d /drivers/clocksource/mips-gic-timer.c | |
parent | f95ac8558b88a5e9ae2b1d580a5cc55bffa512fa (diff) |
CLOCKSOURCE: mips-gic: Split clocksource and clockevent initialization
This is preparation work for the introduction of clockevent frequency
update with a clock notifier. This is only possible when the device
is passed a clk struct, so let's split the legacy and devicetree
initialization.
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: James Hartley <James.Hartley@imgtec.com>
Cc: Govindraj Raja <Govindraj.Raja@imgtec.com>
Cc: Damien Horsley <Damien.Horsley@imgtec.com>
Cc: James Hogan <James.Hogan@imgtec.com>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Patchwork: https://patchwork.linux-mips.org/patch/10781/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/clocksource/mips-gic-timer.c')
-rw-r--r-- | drivers/clocksource/mips-gic-timer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index c4352f078492..22a4daf5f0c8 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c | |||
@@ -142,11 +142,6 @@ static void __init __gic_clocksource_init(void) | |||
142 | ret = clocksource_register_hz(&gic_clocksource, gic_frequency); | 142 | ret = clocksource_register_hz(&gic_clocksource, gic_frequency); |
143 | if (ret < 0) | 143 | if (ret < 0) |
144 | pr_warn("GIC: Unable to register clocksource\n"); | 144 | pr_warn("GIC: Unable to register clocksource\n"); |
145 | |||
146 | gic_clockevent_init(); | ||
147 | |||
148 | /* And finally start the counter */ | ||
149 | gic_start_count(); | ||
150 | } | 145 | } |
151 | 146 | ||
152 | void __init gic_clocksource_init(unsigned int frequency) | 147 | void __init gic_clocksource_init(unsigned int frequency) |
@@ -156,6 +151,10 @@ void __init gic_clocksource_init(unsigned int frequency) | |||
156 | GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_COMPARE); | 151 | GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_COMPARE); |
157 | 152 | ||
158 | __gic_clocksource_init(); | 153 | __gic_clocksource_init(); |
154 | gic_clockevent_init(); | ||
155 | |||
156 | /* And finally start the counter */ | ||
157 | gic_start_count(); | ||
159 | } | 158 | } |
160 | 159 | ||
161 | static void __init gic_clocksource_of_init(struct device_node *node) | 160 | static void __init gic_clocksource_of_init(struct device_node *node) |
@@ -187,6 +186,10 @@ static void __init gic_clocksource_of_init(struct device_node *node) | |||
187 | } | 186 | } |
188 | 187 | ||
189 | __gic_clocksource_init(); | 188 | __gic_clocksource_init(); |
189 | gic_clockevent_init(); | ||
190 | |||
191 | /* And finally start the counter */ | ||
192 | gic_start_count(); | ||
190 | } | 193 | } |
191 | CLOCKSOURCE_OF_DECLARE(mips_gic_timer, "mti,gic-timer", | 194 | CLOCKSOURCE_OF_DECLARE(mips_gic_timer, "mti,gic-timer", |
192 | gic_clocksource_of_init); | 195 | gic_clocksource_of_init); |