Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4200b16d authored by Marc Zyngier's avatar Marc Zyngier
Browse files

ARM: shmobile: convert to twd_local_timer_register() interface



Add support for the new smp_twd runtime registration interface
to the shmobile platforms, and remove the old compile-time support.

Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 1fcf3a6e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o
# SMP objects
smp-y				:= platsmp.o headsmp.o
smp-$(CONFIG_HOTPLUG_CPU)	+= hotplug.o
smp-$(CONFIG_LOCAL_TIMERS)	+= localtimer.o
smp-$(CONFIG_ARCH_SH73A0)	+= smp-sh73a0.o
smp-$(CONFIG_ARCH_R8A7779)	+= smp-r8a7779.o

+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
#define __ARCH_MACH_COMMON_H

extern struct sys_timer shmobile_timer;
struct twd_local_timer;
void shmobile_twd_init(struct twd_local_timer *twd_local_timer);
extern void shmobile_setup_console(void);
extern void shmobile_secondary_vector(void);
extern int shmobile_platform_cpu_kill(unsigned int cpu);
+0 −26
Original line number Diff line number Diff line
/*
 * SMP support for R-Mobile / SH-Mobile - local timer portion
 *
 * Copyright (C) 2010  Magnus Damm
 *
 * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/clockchips.h>
#include <asm/smp_twd.h>
#include <asm/localtimer.h>

/*
 * Setup the local clock events for a CPU.
 */
int __cpuinit local_timer_setup(struct clock_event_device *evt)
{
	evt->irq = 29;
	twd_timer_setup(evt);
	return 0;
}
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include <linux/smp.h>
#include <linux/io.h>
#include <asm/hardware/gic.h>
#include <asm/localtimer.h>
#include <asm/mach-types.h>
#include <mach/common.h>

+3 −5
Original line number Diff line number Diff line
@@ -64,6 +64,8 @@ static void __iomem *scu_base_addr(void)
static DEFINE_SPINLOCK(scu_lock);
static unsigned long tmp;

static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29);

static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
{
	void __iomem *scu_base = scu_base_addr();
@@ -82,11 +84,7 @@ unsigned int __init r8a7779_get_core_count(void)
{
	void __iomem *scu_base = scu_base_addr();

#ifdef CONFIG_HAVE_ARM_TWD
	/* twd_base needs to be initialized before percpu_timer_setup() */
	twd_base = (void __iomem *)0xf0000600;
#endif

	shmobile_twd_init(&twd_local_timer);
	return scu_get_core_count(scu_base);
}

Loading