diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-03-23 19:01:48 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 15:41:54 -0400 |
commit | ea71d9a600e769ca669f4ba3e25ffdecdeede240 (patch) | |
tree | bb5bb6a4a2695a86f90d942e36e25f3cac6b6a80 /arch/arm/mach-sunxi | |
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/arm/mach-sunxi')
-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 @@ | |||
1 | config ARCH_SUNXI | 1 | config ARCH_SUNXI |
2 | bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 | 2 | bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 |
3 | select CLKSRC_MMIO | 3 | select CLKSRC_MMIO |
4 | select CLKSRC_OF | ||
4 | select COMMON_CLK | 5 | select COMMON_CLK |
5 | select GENERIC_CLOCKEVENTS | 6 | select GENERIC_CLOCKEVENTS |
6 | select GENERIC_IRQ_CHIP | 7 | 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 @@ | |||
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/clocksource.h> | ||
13 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -17,8 +18,8 @@ | |||
17 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
18 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | #include <linux/sunxi_timer.h> | ||
21 | 21 | ||
22 | #include <linux/clk/sunxi.h> | ||
22 | #include <linux/irqchip/sunxi.h> | 23 | #include <linux/irqchip/sunxi.h> |
23 | 24 | ||
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -81,6 +82,12 @@ void __init sunxi_map_io(void) | |||
81 | iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc)); | 82 | iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc)); |
82 | } | 83 | } |
83 | 84 | ||
85 | static void __init sunxi_timer_init(void) | ||
86 | { | ||
87 | sunxi_init_clocks(); | ||
88 | clocksource_of_init(); | ||
89 | } | ||
90 | |||
84 | static void __init sunxi_dt_init(void) | 91 | static void __init sunxi_dt_init(void) |
85 | { | 92 | { |
86 | sunxi_setup_restart(); | 93 | sunxi_setup_restart(); |
@@ -100,6 +107,6 @@ DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | |||
100 | .init_irq = sunxi_init_irq, | 107 | .init_irq = sunxi_init_irq, |
101 | .handle_irq = sunxi_handle_irq, | 108 | .handle_irq = sunxi_handle_irq, |
102 | .restart = sunxi_restart, | 109 | .restart = sunxi_restart, |
103 | .init_time = &sunxi_timer_init, | 110 | .init_time = sunxi_timer_init, |
104 | .dt_compat = sunxi_board_dt_compat, | 111 | .dt_compat = sunxi_board_dt_compat, |
105 | MACHINE_END | 112 | MACHINE_END |