summaryrefslogtreecommitdiff
path: root/arch/arm/mach-sunxi/sunxi.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2013-03-24 00:01:48 +0100
committerMaxime Ripard <maxime.ripard@free-electrons.com>2013-04-08 21:41:54 +0200
commitea71d9a600e769ca669f4ba3e25ffdecdeede240 (patch)
treebb5bb6a4a2695a86f90d942e36e25f3cac6b6a80 /arch/arm/mach-sunxi/sunxi.c
parent049817319a5cf2812ada74018ae9f5c5b739607b (diff)
clocksource: sunxi: make use of CLKSRC_OF
Using CLKSRC_OF allows to remove the SoC specific sunxi_timer.h header, and instead of using a custom init function in the machine definition use the standard clocksource_of_init function. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'arch/arm/mach-sunxi/sunxi.c')
-rw-r--r--arch/arm/mach-sunxi/sunxi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 23afb732cb40..b26748d82045 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -10,6 +10,7 @@
* warranty of any kind, whether express or implied.
*/
+#include <linux/clocksource.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/init.h>
@@ -17,8 +18,8 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/io.h>
-#include <linux/sunxi_timer.h>
+#include <linux/clk/sunxi.h>
#include <linux/irqchip/sunxi.h>
#include <asm/mach/arch.h>
@@ -81,6 +82,12 @@ void __init sunxi_map_io(void)
iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc));
}
+static void __init sunxi_timer_init(void)
+{
+ sunxi_init_clocks();
+ clocksource_of_init();
+}
+
static void __init sunxi_dt_init(void)
{
sunxi_setup_restart();
@@ -100,6 +107,6 @@ DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
.init_irq = sunxi_init_irq,
.handle_irq = sunxi_handle_irq,
.restart = sunxi_restart,
- .init_time = &sunxi_timer_init,
+ .init_time = sunxi_timer_init,
.dt_compat = sunxi_board_dt_compat,
MACHINE_END