sh: Move dummy clockevents broadcast timer to its new home.
authorPaul Mundt <lethal@linux-sh.org>
Sun, 3 May 2009 09:29:27 +0000 (18:29 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Sun, 3 May 2009 09:29:27 +0000 (18:29 +0900)
The old arch/sh/kernel/timers/ directly will be going away completely
once the rest of the TMU users are migrated, so move the dummy broadcast
driver up a level in preparation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/Makefile_32
arch/sh/kernel/Makefile_64
arch/sh/kernel/localtimer.c [new file with mode: 0644]
arch/sh/kernel/timers/Makefile
arch/sh/kernel/timers/timer-broadcast.c [deleted file]

index 82a3a15..5b1d4d0 100644 (file)
@@ -32,4 +32,6 @@ obj-$(CONFIG_DYNAMIC_FTRACE)  += ftrace.o
 obj-$(CONFIG_DUMP_CODE)                += disassemble.o
 obj-$(CONFIG_HIBERNATION)      += swsusp.o
 
+obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)    += localtimer.o
+
 EXTRA_CFLAGS += -Werror
index fe425d7..d256c77 100644 (file)
@@ -17,4 +17,6 @@ obj-$(CONFIG_STACKTRACE)      += stacktrace.o
 obj-$(CONFIG_IO_TRAPPED)       += io_trapped.o
 obj-$(CONFIG_GENERIC_GPIO)     += gpio.o
 
+obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)    += localtimer.o
+
 EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/localtimer.c b/arch/sh/kernel/localtimer.c
new file mode 100644 (file)
index 0000000..96e8eae
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Dummy local timer
+ *
+ * Copyright (C) 2008  Paul Mundt
+ *
+ * cloned from:
+ *
+ *  linux/arch/arm/mach-realview/localtimer.c
+ *
+ *  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/kernel.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/smp.h>
+#include <linux/jiffies.h>
+#include <linux/percpu.h>
+#include <linux/clockchips.h>
+#include <linux/irq.h>
+
+static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
+
+/*
+ * Used on SMP for either the local timer or SMP_MSG_TIMER
+ */
+void local_timer_interrupt(void)
+{
+       struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
+
+       clk->event_handler(clk);
+}
+
+static void dummy_timer_set_mode(enum clock_event_mode mode,
+                                struct clock_event_device *clk)
+{
+}
+
+void __cpuinit local_timer_setup(unsigned int cpu)
+{
+       struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
+
+       clk->name               = "dummy_timer";
+       clk->features           = CLOCK_EVT_FEAT_DUMMY;
+       clk->rating             = 200;
+       clk->mult               = 1;
+       clk->set_mode           = dummy_timer_set_mode;
+       clk->broadcast          = smp_timer_broadcast;
+       clk->cpumask            = cpumask_of(cpu);
+
+       clockevents_register_device(clk);
+}
index 44156df..8bceba5 100644 (file)
@@ -5,5 +5,3 @@
 obj-y  := timer.o
 
 obj-$(CONFIG_SH_TMU)           += timer-tmu.o
-
-obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)    += timer-broadcast.o
diff --git a/arch/sh/kernel/timers/timer-broadcast.c b/arch/sh/kernel/timers/timer-broadcast.c
deleted file mode 100644 (file)
index 96e8eae..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Dummy local timer
- *
- * Copyright (C) 2008  Paul Mundt
- *
- * cloned from:
- *
- *  linux/arch/arm/mach-realview/localtimer.c
- *
- *  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/kernel.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/smp.h>
-#include <linux/jiffies.h>
-#include <linux/percpu.h>
-#include <linux/clockchips.h>
-#include <linux/irq.h>
-
-static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
-
-/*
- * Used on SMP for either the local timer or SMP_MSG_TIMER
- */
-void local_timer_interrupt(void)
-{
-       struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
-
-       clk->event_handler(clk);
-}
-
-static void dummy_timer_set_mode(enum clock_event_mode mode,
-                                struct clock_event_device *clk)
-{
-}
-
-void __cpuinit local_timer_setup(unsigned int cpu)
-{
-       struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
-
-       clk->name               = "dummy_timer";
-       clk->features           = CLOCK_EVT_FEAT_DUMMY;
-       clk->rating             = 200;
-       clk->mult               = 1;
-       clk->set_mode           = dummy_timer_set_mode;
-       clk->broadcast          = smp_timer_broadcast;
-       clk->cpumask            = cpumask_of(cpu);
-
-       clockevents_register_device(clk);
-}