aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-18 12:42:06 -0400
committerDavid Howells <dhowells@redhat.com>2011-03-18 12:52:49 -0400
commit73a173a4117419892bd436e85a00a53aa22ad118 (patch)
tree463404b687670d68669680de07135f52c0e4c7a4 /arch
parent08351fc6a75731226e1112fc7254542bd3a2912e (diff)
MN10300: Remove stale code
mn10300 implements clocksource and clockevents and selects them unconditionally in Kconfig. Remove the stale code which seems to be a leftover of the conversion. Cleanup the configuration switches as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mn10300/Kconfig15
-rw-r--r--arch/mn10300/kernel/Makefile5
-rw-r--r--arch/mn10300/kernel/time.c49
3 files changed, 2 insertions, 67 deletions
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 243bfa23fd58..8b979ff4373e 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -53,21 +53,6 @@ config GENERIC_TIME
53config GENERIC_CLOCKEVENTS 53config GENERIC_CLOCKEVENTS
54 def_bool y 54 def_bool y
55 55
56config GENERIC_CLOCKEVENTS_BUILD
57 def_bool y
58 depends on GENERIC_CLOCKEVENTS
59
60config GENERIC_CLOCKEVENTS_BROADCAST
61 bool
62
63config CEVT_MN10300
64 def_bool y
65 depends on GENERIC_CLOCKEVENTS
66
67config CSRC_MN10300
68 def_bool y
69 depends on GENERIC_TIME
70
71config GENERIC_BUG 56config GENERIC_BUG
72 def_bool y 57 def_bool y
73 58
diff --git a/arch/mn10300/kernel/Makefile b/arch/mn10300/kernel/Makefile
index 8f5f1e81baf5..a06a2e10051d 100644
--- a/arch/mn10300/kernel/Makefile
+++ b/arch/mn10300/kernel/Makefile
@@ -8,7 +8,8 @@ fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o
8 8
9obj-y := process.o signal.o entry.o traps.o irq.o \ 9obj-y := process.o signal.o entry.o traps.o irq.o \
10 ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \ 10 ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \
11 switch_to.o mn10300_ksyms.o kernel_execve.o $(fpu-obj-y) 11 switch_to.o mn10300_ksyms.o kernel_execve.o $(fpu-obj-y) \
12 csrc-mn10300.o cevt-mn10300.o
12 13
13obj-$(CONFIG_SMP) += smp.o smp-low.o 14obj-$(CONFIG_SMP) += smp.o smp-low.o
14 15
@@ -28,5 +29,3 @@ obj-$(CONFIG_MN10300_RTC) += rtc.o
28obj-$(CONFIG_PROFILE) += profile.o profile-low.o 29obj-$(CONFIG_PROFILE) += profile.o profile-low.o
29obj-$(CONFIG_MODULES) += module.o 30obj-$(CONFIG_MODULES) += module.o
30obj-$(CONFIG_KPROBES) += kprobes.o 31obj-$(CONFIG_KPROBES) += kprobes.o
31obj-$(CONFIG_CSRC_MN10300) += csrc-mn10300.o
32obj-$(CONFIG_CEVT_MN10300) += cevt-mn10300.o
diff --git a/arch/mn10300/kernel/time.c b/arch/mn10300/kernel/time.c
index 5b955000626d..611696df816f 100644
--- a/arch/mn10300/kernel/time.c
+++ b/arch/mn10300/kernel/time.c
@@ -93,43 +93,6 @@ irqreturn_t local_timer_interrupt(void)
93 return IRQ_HANDLED; 93 return IRQ_HANDLED;
94} 94}
95 95
96#ifndef CONFIG_GENERIC_TIME
97/*
98 * advance the kernel's time keeping clocks (xtime and jiffies)
99 * - we use Timer 0 & 1 cascaded as a clock to nudge us the next time
100 * there's a need to update
101 */
102static irqreturn_t timer_interrupt(int irq, void *dev_id)
103{
104 unsigned tsc, elapse;
105 irqreturn_t ret;
106
107 while (tsc = get_cycles(),
108 elapse = tsc - mn10300_last_tsc, /* time elapsed since last
109 * tick */
110 elapse > MN10300_TSC_PER_HZ
111 ) {
112 mn10300_last_tsc += MN10300_TSC_PER_HZ;
113
114 /* advance the kernel's time tracking system */
115 xtime_update(1);
116 }
117
118 ret = local_timer_interrupt();
119#ifdef CONFIG_SMP
120 send_IPI_allbutself(LOCAL_TIMER_IPI);
121#endif
122 return ret;
123}
124
125static struct irqaction timer_irq = {
126 .handler = timer_interrupt,
127 .flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER,
128 .name = "timer",
129};
130#endif /* CONFIG_GENERIC_TIME */
131
132#ifdef CONFIG_CSRC_MN10300
133void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) 96void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
134{ 97{
135 u64 temp; 98 u64 temp;
@@ -145,9 +108,7 @@ void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
145 cs->shift = shift; 108 cs->shift = shift;
146 cs->mult = (u32) temp; 109 cs->mult = (u32) temp;
147} 110}
148#endif
149 111
150#if CONFIG_CEVT_MN10300
151void __cpuinit clockevent_set_clock(struct clock_event_device *cd, 112void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
152 unsigned int clock) 113 unsigned int clock)
153{ 114{
@@ -164,7 +125,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
164 cd->shift = shift; 125 cd->shift = shift;
165 cd->mult = (u32) temp; 126 cd->mult = (u32) temp;
166} 127}
167#endif
168 128
169/* 129/*
170 * initialise the various timers used by the main part of the kernel 130 * initialise the various timers used by the main part of the kernel
@@ -177,11 +137,7 @@ void __init time_init(void)
177 */ 137 */
178 TMPSCNT |= TMPSCNT_ENABLE; 138 TMPSCNT |= TMPSCNT_ENABLE;
179 139
180#ifdef CONFIG_GENERIC_TIME
181 init_clocksource(); 140 init_clocksource();
182#else
183 startup_timestamp_counter();
184#endif
185 141
186 printk(KERN_INFO 142 printk(KERN_INFO
187 "timestamp counter I/O clock running at %lu.%02lu" 143 "timestamp counter I/O clock running at %lu.%02lu"
@@ -190,12 +146,7 @@ void __init time_init(void)
190 146
191 mn10300_last_tsc = read_timestamp_counter(); 147 mn10300_last_tsc = read_timestamp_counter();
192 148
193#ifdef CONFIG_GENERIC_CLOCKEVENTS
194 init_clockevents(); 149 init_clockevents();
195#else
196 reload_jiffies_counter(MN10300_JC_PER_HZ - 1);
197 setup_jiffies_interrupt(TMJCIRQ, &timer_irq, CONFIG_TIMER_IRQ_LEVEL);
198#endif
199 150
200#ifdef CONFIG_MN10300_WD_TIMER 151#ifdef CONFIG_MN10300_WD_TIMER
201 /* start the watchdog timer */ 152 /* start the watchdog timer */