Commit 03e07595 authored by Josh Cartwright's avatar Josh Cartwright Committed by Michal Simek

ARM: zynq: move arm-specific sys_timer out of ttc

Move the sys_timer definition out of ttc driver and make it part of the
common zynq code.  This is preparation for renaming and COMMON_CLK
support.
Signed-off-by: default avatarJosh Cartwright <josh.cartwright@ni.com>
Tested-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent f5800776
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -93,6 +94,18 @@ static struct map_desc io_desc[] __initdata = { ...@@ -93,6 +94,18 @@ static struct map_desc io_desc[] __initdata = {
}; };
static void __init xilinx_zynq_timer_init(void)
{
xttcpss_timer_init();
}
/*
* Instantiate and initialize the system timer structure
*/
static struct sys_timer xttcpss_sys_timer = {
.init = xilinx_zynq_timer_init,
};
/** /**
* xilinx_map_io() - Create memory mappings needed for early I/O. * xilinx_map_io() - Create memory mappings needed for early I/O.
*/ */
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef __MACH_ZYNQ_COMMON_H__ #ifndef __MACH_ZYNQ_COMMON_H__
#define __MACH_ZYNQ_COMMON_H__ #define __MACH_ZYNQ_COMMON_H__
#include <asm/mach/time.h> void __init xttcpss_timer_init(void);
extern struct sys_timer xttcpss_sys_timer;
#endif #endif
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/mach/time.h>
#include <mach/zynq_soc.h> #include <mach/zynq_soc.h>
#include "common.h" #include "common.h"
...@@ -269,7 +268,7 @@ static struct clock_event_device xttcpss_clockevent = { ...@@ -269,7 +268,7 @@ static struct clock_event_device xttcpss_clockevent = {
* Initializes the timer hardware and register the clock source and clock event * Initializes the timer hardware and register the clock source and clock event
* timers with Linux kernal timer framework * timers with Linux kernal timer framework
**/ **/
static void __init xttcpss_timer_init(void) void __init xttcpss_timer_init(void)
{ {
xttcpss_timer_hardware_init(); xttcpss_timer_hardware_init();
clocksource_register_hz(&clocksource_xttcpss, TIMER_RATE); clocksource_register_hz(&clocksource_xttcpss, TIMER_RATE);
...@@ -289,10 +288,3 @@ static void __init xttcpss_timer_init(void) ...@@ -289,10 +288,3 @@ static void __init xttcpss_timer_init(void)
xttcpss_clockevent.cpumask = cpumask_of(0); xttcpss_clockevent.cpumask = cpumask_of(0);
clockevents_register_device(&xttcpss_clockevent); clockevents_register_device(&xttcpss_clockevent);
} }
/*
* Instantiate and initialize the system timer structure
*/
struct sys_timer xttcpss_sys_timer = {
.init = xttcpss_timer_init,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment