Commit 73a173a4 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by David Howells

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: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarJohn Stultz <johnstul@us.ibm.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Mark Salter <msalter@redhat.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 08351fc6
...@@ -53,21 +53,6 @@ config GENERIC_TIME ...@@ -53,21 +53,6 @@ config GENERIC_TIME
config GENERIC_CLOCKEVENTS config GENERIC_CLOCKEVENTS
def_bool y def_bool y
config GENERIC_CLOCKEVENTS_BUILD
def_bool y
depends on GENERIC_CLOCKEVENTS
config GENERIC_CLOCKEVENTS_BROADCAST
bool
config CEVT_MN10300
def_bool y
depends on GENERIC_CLOCKEVENTS
config CSRC_MN10300
def_bool y
depends on GENERIC_TIME
config GENERIC_BUG config GENERIC_BUG
def_bool y def_bool y
......
...@@ -8,7 +8,8 @@ fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o ...@@ -8,7 +8,8 @@ fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o
obj-y := process.o signal.o entry.o traps.o irq.o \ obj-y := process.o signal.o entry.o traps.o irq.o \
ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \ ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \
switch_to.o mn10300_ksyms.o kernel_execve.o $(fpu-obj-y) switch_to.o mn10300_ksyms.o kernel_execve.o $(fpu-obj-y) \
csrc-mn10300.o cevt-mn10300.o
obj-$(CONFIG_SMP) += smp.o smp-low.o obj-$(CONFIG_SMP) += smp.o smp-low.o
...@@ -28,5 +29,3 @@ obj-$(CONFIG_MN10300_RTC) += rtc.o ...@@ -28,5 +29,3 @@ obj-$(CONFIG_MN10300_RTC) += rtc.o
obj-$(CONFIG_PROFILE) += profile.o profile-low.o obj-$(CONFIG_PROFILE) += profile.o profile-low.o
obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_KPROBES) += kprobes.o
obj-$(CONFIG_CSRC_MN10300) += csrc-mn10300.o
obj-$(CONFIG_CEVT_MN10300) += cevt-mn10300.o
...@@ -93,43 +93,6 @@ irqreturn_t local_timer_interrupt(void) ...@@ -93,43 +93,6 @@ irqreturn_t local_timer_interrupt(void)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#ifndef CONFIG_GENERIC_TIME
/*
* advance the kernel's time keeping clocks (xtime and jiffies)
* - we use Timer 0 & 1 cascaded as a clock to nudge us the next time
* there's a need to update
*/
static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
unsigned tsc, elapse;
irqreturn_t ret;
while (tsc = get_cycles(),
elapse = tsc - mn10300_last_tsc, /* time elapsed since last
* tick */
elapse > MN10300_TSC_PER_HZ
) {
mn10300_last_tsc += MN10300_TSC_PER_HZ;
/* advance the kernel's time tracking system */
xtime_update(1);
}
ret = local_timer_interrupt();
#ifdef CONFIG_SMP
send_IPI_allbutself(LOCAL_TIMER_IPI);
#endif
return ret;
}
static struct irqaction timer_irq = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER,
.name = "timer",
};
#endif /* CONFIG_GENERIC_TIME */
#ifdef CONFIG_CSRC_MN10300
void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
{ {
u64 temp; u64 temp;
...@@ -145,9 +108,7 @@ void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) ...@@ -145,9 +108,7 @@ void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
cs->shift = shift; cs->shift = shift;
cs->mult = (u32) temp; cs->mult = (u32) temp;
} }
#endif
#if CONFIG_CEVT_MN10300
void __cpuinit clockevent_set_clock(struct clock_event_device *cd, void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
unsigned int clock) unsigned int clock)
{ {
...@@ -164,7 +125,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, ...@@ -164,7 +125,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
cd->shift = shift; cd->shift = shift;
cd->mult = (u32) temp; cd->mult = (u32) temp;
} }
#endif
/* /*
* initialise the various timers used by the main part of the kernel * initialise the various timers used by the main part of the kernel
...@@ -177,11 +137,7 @@ void __init time_init(void) ...@@ -177,11 +137,7 @@ void __init time_init(void)
*/ */
TMPSCNT |= TMPSCNT_ENABLE; TMPSCNT |= TMPSCNT_ENABLE;
#ifdef CONFIG_GENERIC_TIME
init_clocksource(); init_clocksource();
#else
startup_timestamp_counter();
#endif
printk(KERN_INFO printk(KERN_INFO
"timestamp counter I/O clock running at %lu.%02lu" "timestamp counter I/O clock running at %lu.%02lu"
...@@ -190,12 +146,7 @@ void __init time_init(void) ...@@ -190,12 +146,7 @@ void __init time_init(void)
mn10300_last_tsc = read_timestamp_counter(); mn10300_last_tsc = read_timestamp_counter();
#ifdef CONFIG_GENERIC_CLOCKEVENTS
init_clockevents(); init_clockevents();
#else
reload_jiffies_counter(MN10300_JC_PER_HZ - 1);
setup_jiffies_interrupt(TMJCIRQ, &timer_irq, CONFIG_TIMER_IRQ_LEVEL);
#endif
#ifdef CONFIG_MN10300_WD_TIMER #ifdef CONFIG_MN10300_WD_TIMER
/* start the watchdog timer */ /* start the watchdog timer */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment