Skip to content

Commit

Permalink
ARM: 5962/1: ux500: move system timer to cpu file
Browse files Browse the repository at this point in the history
There is nothing board-specific about the system timer, so move it to
the CPU file.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Rabin Vincent authored and Russell King committed Mar 19, 2010
1 parent 3e3c62c commit cc2c133
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
18 changes: 0 additions & 18 deletions arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
#include <linux/amba/pl022.h>
#include <linux/spi/spi.h>

#include <asm/localtimer.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>

#include <plat/mtu.h>
#include <plat/i2c.h>

#include <mach/hardware.h>
Expand Down Expand Up @@ -201,22 +199,6 @@ static struct platform_device *platform_devs[] __initdata = {
&i2c_controller3,
};

static void __init u8500_timer_init(void)
{
#ifdef CONFIG_LOCAL_TIMERS
/* Setup the local timer base */
twd_base = __io_address(U8500_TWD_BASE);
#endif
/* Setup the MTU base */
mtu_base = __io_address(U8500_MTU0_BASE);

nmdk_timer_init();
}

static struct sys_timer u8500_timer = {
.init = u8500_timer_init,
};

static void __init u8500_init_machine(void)
{
int i;
Expand Down
20 changes: 20 additions & 0 deletions arch/arm/mach-ux500/cpu-u8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
#include <linux/amba/bus.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/io.h>

#include <asm/localtimer.h>
#include <asm/hardware/gic.h>
#include <asm/mach/map.h>
#include <plat/mtu.h>
#include <mach/hardware.h>
#include <mach/setup.h>

/* add any platform devices here - TODO */
static struct platform_device *platform_devs[] __initdata = {
Expand Down Expand Up @@ -63,3 +67,19 @@ void __init u8500_init_devices(void)

return ;
}

static void __init u8500_timer_init(void)
{
#ifdef CONFIG_LOCAL_TIMERS
/* Setup the local timer base */
twd_base = __io_address(U8500_TWD_BASE);
#endif
/* Setup the MTU base */
mtu_base = __io_address(U8500_MTU0_BASE);

nmdk_timer_init();
}

struct sys_timer u8500_timer = {
.init = u8500_timer_init,
};
3 changes: 3 additions & 0 deletions arch/arm/mach-ux500/include/mach/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ extern void u8500_init_irq(void);
/* We re-use nomadik_timer for this platform */
extern void nmdk_timer_init(void);

struct sys_timer;
extern struct sys_timer u8500_timer;

#endif /* __ASM_ARCH_SETUP_H */

0 comments on commit cc2c133

Please sign in to comment.