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

Commit f32f4ce2 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] smp: allow re-use of realview localtimer TWD support

parent a8cbcd92
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -885,6 +885,12 @@ config HAVE_ARM_SCU
	help
	  This option enables support for the ARM system coherency unit

config HAVE_ARM_TWD
	bool
	depends on SMP
	help
	  This options enables support for the ARM timer and watchdog unit

choice
	prompt "Memory split"
	default VMSPLIT_3G
@@ -925,6 +931,7 @@ config LOCAL_TIMERS
	bool "Use local timer interrupts"
	depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || REALVIEW_EB_A9MP)
	default y
	select HAVE_ARM_TWD if ARCH_REALVIEW
	help
	  Enable support for local timers on SMP platforms, rather then the
	  legacy IPI broadcast method.  Local timers allows the system
+0 −21
Original line number Diff line number Diff line
#ifndef __ASM_HARDWARE_TWD_H
#define __ASM_HARDWARE_TWD_H

#define TWD_TIMER_LOAD 			0x00
#define TWD_TIMER_COUNTER		0x04
#define TWD_TIMER_CONTROL		0x08
#define TWD_TIMER_INTSTAT		0x0C

#define TWD_WDOG_LOAD			0x20
#define TWD_WDOG_COUNTER		0x24
#define TWD_WDOG_CONTROL		0x28
#define TWD_WDOG_INTSTAT		0x2C
#define TWD_WDOG_RESETSTAT		0x30
#define TWD_WDOG_DISABLE		0x34

#define TWD_TIMER_CONTROL_ENABLE	(1 << 0)
#define TWD_TIMER_CONTROL_ONESHOT	(0 << 1)
#define TWD_TIMER_CONTROL_PERIODIC	(1 << 1)
#define TWD_TIMER_CONTROL_IT_ENABLE	(1 << 2)

#endif
+12 −0
Original line number Diff line number Diff line
@@ -24,6 +24,16 @@ asmlinkage void do_local_timer(struct pt_regs *);


#ifdef CONFIG_LOCAL_TIMERS

#ifdef CONFIG_HAVE_ARM_TWD

#include "smp_twd.h"

#define local_timer_ack()	twd_timer_ack()
#define local_timer_stop()	twd_timer_stop()

#else

/*
 * Platform provides this to acknowledge a local timer IRQ.
 * Returns true if the local timer IRQ is to be processed.
@@ -35,6 +45,8 @@ int local_timer_ack(void);
 */
void local_timer_stop(void);

#endif

/*
 * Setup a local timer interrupt for a CPU.
 */
+12 −0
Original line number Diff line number Diff line
#ifndef __ASMARM_SMP_TWD_H
#define __ASMARM_SMP_TWD_H

struct clock_event_device;

extern void __iomem *twd_base;

void twd_timer_stop(void);
int twd_timer_ack(void);
void twd_timer_setup(struct clock_event_device *);

#endif
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ obj-$(CONFIG_ISA_DMA) += dma-isa.o
obj-$(CONFIG_PCI)		+= bios32.o isa.o
obj-$(CONFIG_SMP)		+= smp.o
obj-$(CONFIG_HAVE_ARM_SCU)	+= smp_scu.o
obj-$(CONFIG_HAVE_ARM_TWD)	+= smp_twd.o
obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o
obj-$(CONFIG_KPROBES)		+= kprobes.o kprobes-decode.o
Loading