diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-05-16 11:54:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-06-06 14:34:30 -0400 |
commit | 79894c7b47f78decaa3511f1d6646aa06e2c6bed (patch) | |
tree | bd09192fbf3aa9268e3cb68474bc0cee55d35c3f /arch/mips | |
parent | 5ecd3100e695228ac5e0ce0e325e252c0f11806f (diff) |
[MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.
Aside of being handy for debugging this has never been a particularly
good idea but is now getting in the way of dyntick / tickless kernels
and general cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/display.c | 24 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 31 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_setup.c | 6 | ||||
-rw-r--r-- | arch/mips/mips-boards/sead/sead_setup.c | 2 |
5 files changed, 36 insertions, 29 deletions
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index 0c6b0ce15028..1cc6ebbedfdd 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c | |||
@@ -48,6 +48,8 @@ const char *get_system_type(void) | |||
48 | return "MIPS Atlas"; | 48 | return "MIPS Atlas"; |
49 | } | 49 | } |
50 | 50 | ||
51 | const char display_string[] = " LINUX ON ATLAS "; | ||
52 | |||
51 | void __init plat_mem_setup(void) | 53 | void __init plat_mem_setup(void) |
52 | { | 54 | { |
53 | mips_pcibios_init(); | 55 | mips_pcibios_init(); |
diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c index 548dbe5ce7c8..5d600054090a 100644 --- a/arch/mips/mips-boards/generic/display.c +++ b/arch/mips/mips-boards/generic/display.c | |||
@@ -19,9 +19,14 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/compiler.h> | 21 | #include <linux/compiler.h> |
22 | #include <linux/timer.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/mips-boards/generic.h> | 24 | #include <asm/mips-boards/generic.h> |
24 | 25 | ||
26 | extern const char display_string[]; | ||
27 | static unsigned int display_count; | ||
28 | static unsigned int max_display_count; | ||
29 | |||
25 | void mips_display_message(const char *str) | 30 | void mips_display_message(const char *str) |
26 | { | 31 | { |
27 | static unsigned int __iomem *display = NULL; | 32 | static unsigned int __iomem *display = NULL; |
@@ -37,3 +42,22 @@ void mips_display_message(const char *str) | |||
37 | writel(' ', display + i); | 42 | writel(' ', display + i); |
38 | } | 43 | } |
39 | } | 44 | } |
45 | |||
46 | static void scroll_display_message(unsigned long data); | ||
47 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); | ||
48 | |||
49 | static void scroll_display_message(unsigned long data) | ||
50 | { | ||
51 | mips_display_message(&display_string[display_count++]); | ||
52 | if (display_count == max_display_count) | ||
53 | display_count = 0; | ||
54 | |||
55 | mod_timer(&mips_scroll_timer, jiffies + HZ); | ||
56 | } | ||
57 | |||
58 | void mips_scroll_message(void) | ||
59 | { | ||
60 | del_timer_sync(&mips_scroll_timer); | ||
61 | max_display_count = strlen(display_string) + 1 - 8; | ||
62 | mod_timer(&mips_scroll_timer, jiffies + 1); | ||
63 | } | ||
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 | ||
54 | unsigned long cpu_khz; | 54 | unsigned long cpu_khz; |
55 | 55 | ||
56 | #if defined(CONFIG_MIPS_ATLAS) | ||
57 | static char display_string[] = " LINUX ON ATLAS "; | ||
58 | #endif | ||
59 | #if defined(CONFIG_MIPS_MALTA) | ||
60 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
61 | static char display_string[] = " SMTC LINUX ON MALTA "; | ||
62 | #else | ||
63 | static char display_string[] = " LINUX ON MALTA "; | ||
64 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
65 | #endif | ||
66 | #if defined(CONFIG_MIPS_SEAD) | ||
67 | static char display_string[] = " LINUX ON SEAD "; | ||
68 | #endif | ||
69 | static 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 | ||
74 | static unsigned int timer_tick_count; | ||
75 | static int mips_cpu_timer_irq; | 58 | static int mips_cpu_timer_irq; |
76 | extern void smtc_timer_broadcast(int); | 59 | extern void smtc_timer_broadcast(int); |
77 | 60 | ||
78 | static 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 | |||
87 | static void mips_timer_dispatch(void) | 61 | static 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 | ||
267 | void __init plat_timer_setup(struct irqaction *irq) | 240 | void __init plat_timer_setup(struct irqaction *irq) |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 7873932532a1..c14b7bf89950 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -56,6 +56,12 @@ const char *get_system_type(void) | |||
56 | return "MIPS Malta"; | 56 | return "MIPS Malta"; |
57 | } | 57 | } |
58 | 58 | ||
59 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
60 | const char display_string[] = " SMTC LINUX ON MALTA "; | ||
61 | #else | ||
62 | const char display_string[] = " LINUX ON MALTA "; | ||
63 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
64 | |||
59 | #ifdef CONFIG_BLK_DEV_FD | 65 | #ifdef CONFIG_BLK_DEV_FD |
60 | void __init fd_activate(void) | 66 | void __init fd_activate(void) |
61 | { | 67 | { |
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index a189dec7c7bc..811aba100605 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c | |||
@@ -43,6 +43,8 @@ const char *get_system_type(void) | |||
43 | return "MIPS SEAD"; | 43 | return "MIPS SEAD"; |
44 | } | 44 | } |
45 | 45 | ||
46 | const char display_string[] = " LINUX ON SEAD "; | ||
47 | |||
46 | void __init plat_mem_setup(void) | 48 | void __init plat_mem_setup(void) |
47 | { | 49 | { |
48 | ioport_resource.end = 0x7fffffff; | 50 | ioport_resource.end = 0x7fffffff; |