diff options
author | Greg Ungerer <gerg@uclinux.org> | 2012-01-23 00:34:58 -0500 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-03-04 18:43:04 -0500 |
commit | 35aefb2645d1ae7576699b2d7b66d6c9503113fc (patch) | |
tree | d2976ce7f95983751e42c33bcb61923a120aa072 /arch/m68k/kernel | |
parent | 9517746131f62294ddd922bcd288415be5104c23 (diff) |
m68knommu: modify timer init code to make it consistent with m68k code
With a few small changes we can make the m68knommu timer init code the
same as the m68k code. By using the mach_sched_init function pointer
and reworking the current timer initializers to keep track of the common
m68k timer_interrupt() handler we end up with almost identical code for
m68knommu.
This will allow us to more easily merge the mmu and non-mmu m68k time.c
in future patches.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r-- | arch/m68k/kernel/setup_no.c | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/time_no.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c index 8394b56b2c72..7dc186b7a85f 100644 --- a/arch/m68k/kernel/setup_no.c +++ b/arch/m68k/kernel/setup_no.c | |||
@@ -48,6 +48,7 @@ EXPORT_SYMBOL(memory_end); | |||
48 | char __initdata command_line[COMMAND_LINE_SIZE]; | 48 | char __initdata command_line[COMMAND_LINE_SIZE]; |
49 | 49 | ||
50 | /* machine dependent timer functions */ | 50 | /* machine dependent timer functions */ |
51 | void (*mach_sched_init)(irq_handler_t handler) __initdata = NULL; | ||
51 | int (*mach_set_clock_mmss)(unsigned long); | 52 | int (*mach_set_clock_mmss)(unsigned long); |
52 | int (*mach_hwclk) (int, struct rtc_time*); | 53 | int (*mach_hwclk) (int, struct rtc_time*); |
53 | 54 | ||
diff --git a/arch/m68k/kernel/time_no.c b/arch/m68k/kernel/time_no.c index ca3b3b4d4630..5fa42f126706 100644 --- a/arch/m68k/kernel/time_no.c +++ b/arch/m68k/kernel/time_no.c | |||
@@ -32,12 +32,11 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
32 | return -1; | 32 | return -1; |
33 | } | 33 | } |
34 | 34 | ||
35 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | ||
36 | /* | 35 | /* |
37 | * timer_interrupt() needs to keep up the real-time clock, | 36 | * timer_interrupt() needs to keep up the real-time clock, |
38 | * as well as call the "xtime_update()" routine every clocktick | 37 | * as well as call the "xtime_update()" routine every clocktick |
39 | */ | 38 | */ |
40 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) | 39 | static irqreturn_t timer_interrupt(int irq, void *dummy) |
41 | { | 40 | { |
42 | 41 | ||
43 | if (current->pid) | 42 | if (current->pid) |
@@ -49,7 +48,6 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
49 | 48 | ||
50 | return(IRQ_HANDLED); | 49 | return(IRQ_HANDLED); |
51 | } | 50 | } |
52 | #endif | ||
53 | 51 | ||
54 | void read_persistent_clock(struct timespec *ts) | 52 | void read_persistent_clock(struct timespec *ts) |
55 | { | 53 | { |
@@ -72,7 +70,7 @@ int update_persistent_clock(struct timespec now) | |||
72 | return set_rtc_mmss(now.tv_sec); | 70 | return set_rtc_mmss(now.tv_sec); |
73 | } | 71 | } |
74 | 72 | ||
75 | void time_init(void) | 73 | void __init time_init(void) |
76 | { | 74 | { |
77 | hw_timer_init(); | 75 | mach_sched_init(timer_interrupt); |
78 | } | 76 | } |