summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-07-11 14:01:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-11 16:04:41 -0700
commit325c117000c1851139981a63d331ea33f2997cd3 (patch)
tree766d8a33b59f6f66ae42a9b4ffa7a914609d170c /arch/mn10300/kernel
parent2a643893e50fde71d7ba84b5592ec61b467b9ab6 (diff)
downloadlinux-325c117000c1851139981a63d331ea33f2997cd3.tar.bz2
mn10300: move setup_jiffies_interrupt() to cevt-mn10300.c
Move the static inline function setup_jiffies_interrupt() from <asm/timex.h> to arch/mn10300/kernel/cevt-mn10300.c, which is its only callsite. This allows to remove the inclusion of <asm/hardirq.h> and <linux/irq.h> from <asm/timex.h> and <unit/timex.h>, fixing include hell like: include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef] include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef] include/linux/jiffies.h:46:42: error: division by zero in #if ... make[4]: *** [arch/mn10300/kernel/asm-offsets.s] Error 1 and (after a quick hack for the above by defining CLOCK_TICK_RATE in <linux/jiffies.h>): In file included from include/linux/notifier.h:15:0, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:718, from include/linux/gfp.h:4, from include/linux/irq.h:20, from arch/mn10300/unit-asb2303/include/unit/timex.h:15, from arch/mn10300/include/asm/timex.h:15, from include/linux/timex.h:174, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, include/linux/srcu.h:55:22: error: field 'work' has incomplete type As a consequence, we do need a few more inclusions of <asm/irq.h>, namely in arch/mn10300/unit-asb2303/smc91111.c and arch/mn10300/unit-asb2305/unit-init.c. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r--arch/mn10300/kernel/cevt-mn10300.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mn10300/kernel/cevt-mn10300.c b/arch/mn10300/kernel/cevt-mn10300.c
index 69cae0260786..ccce35e3e179 100644
--- a/arch/mn10300/kernel/cevt-mn10300.c
+++ b/arch/mn10300/kernel/cevt-mn10300.c
@@ -70,6 +70,16 @@ static void event_handler(struct clock_event_device *dev)
{
}
+static inline void setup_jiffies_interrupt(int irq,
+ struct irqaction *action)
+{
+ u16 tmp;
+ setup_irq(irq, action);
+ set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL));
+ GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
+ tmp = GxICR(irq);
+}
+
int __init init_clockevents(void)
{
struct clock_event_device *cd;