aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mips-boards/generic/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mips-boards/generic/time.c')
-rw-r--r--arch/mips/mips-boards/generic/time.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index df2a2bd3aa5d..37735bfc3afd 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -53,37 +53,11 @@
53 53
54unsigned long cpu_khz; 54unsigned long cpu_khz;
55 55
56#if defined(CONFIG_MIPS_ATLAS)
57static char display_string[] = " LINUX ON ATLAS ";
58#endif
59#if defined(CONFIG_MIPS_MALTA)
60#if defined(CONFIG_MIPS_MT_SMTC)
61static char display_string[] = " SMTC LINUX ON MALTA ";
62#else
63static char display_string[] = " LINUX ON MALTA ";
64#endif /* CONFIG_MIPS_MT_SMTC */
65#endif
66#if defined(CONFIG_MIPS_SEAD)
67static char display_string[] = " LINUX ON SEAD ";
68#endif
69static unsigned int display_count;
70#define MAX_DISPLAY_COUNT (sizeof(display_string) - 8)
71
72#define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) 56#define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR)
73 57
74static unsigned int timer_tick_count;
75static int mips_cpu_timer_irq; 58static int mips_cpu_timer_irq;
76extern void smtc_timer_broadcast(int); 59extern void smtc_timer_broadcast(int);
77 60
78static inline void scroll_display_message(void)
79{
80 if ((timer_tick_count++ % HZ) == 0) {
81 mips_display_message(&display_string[display_count++]);
82 if (display_count == MAX_DISPLAY_COUNT)
83 display_count = 0;
84 }
85}
86
87static void mips_timer_dispatch(void) 61static void mips_timer_dispatch(void)
88{ 62{
89 do_IRQ(mips_cpu_timer_irq); 63 do_IRQ(mips_cpu_timer_irq);
@@ -143,7 +117,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
143 if (cpu_data[cpu].vpe_id == 0) { 117 if (cpu_data[cpu].vpe_id == 0) {
144 timer_interrupt(irq, NULL); 118 timer_interrupt(irq, NULL);
145 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 119 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
146 scroll_display_message();
147 } else { 120 } else {
148 write_c0_compare(read_c0_count() + 121 write_c0_compare(read_c0_count() +
149 (mips_hpt_frequency/HZ)); 122 (mips_hpt_frequency/HZ));
@@ -167,8 +140,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
167 /* we keep interrupt disabled all the time */ 140 /* we keep interrupt disabled all the time */
168 if (!r2 || (read_c0_cause() & (1 << 30))) 141 if (!r2 || (read_c0_cause() & (1 << 30)))
169 timer_interrupt(irq, NULL); 142 timer_interrupt(irq, NULL);
170
171 scroll_display_message();
172 } else { 143 } else {
173 /* Everyone else needs to reset the timer int here as 144 /* Everyone else needs to reset the timer int here as
174 ll_local_timer_interrupt doesn't */ 145 ll_local_timer_interrupt doesn't */
@@ -262,6 +233,8 @@ void __init mips_time_init(void)
262 (est_freq%1000000)*100/1000000); 233 (est_freq%1000000)*100/1000000);
263 234
264 cpu_khz = est_freq / 1000; 235 cpu_khz = est_freq / 1000;
236
237 mips_scroll_message();
265} 238}
266 239
267void __init plat_timer_setup(struct irqaction *irq) 240void __init plat_timer_setup(struct irqaction *irq)