diff options
author | Maxime Ripard | 2013-03-24 00:01:48 +0100 |
---|---|---|
committer | Maxime Ripard | 2013-04-08 21:41:54 +0200 |
commit | ea71d9a600e769ca669f4ba3e25ffdecdeede240 (patch) | |
tree | bb5bb6a4a2695a86f90d942e36e25f3cac6b6a80 /arch | |
parent | 049817319a5cf2812ada74018ae9f5c5b739607b (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')
-rw-r--r-- | arch/arm/mach-sunxi/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-sunxi/sunxi.c | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 8709a39bd34c..06c28945357d 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -1,6 +1,7 @@ config ARCH_SUNXI bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 select CLKSRC_MMIO + select CLKSRC_OF select COMMON_CLK select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP 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 |