diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-05-16 17:54:08 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-06-06 20:34:30 +0200 |
commit | 79894c7b47f78decaa3511f1d6646aa06e2c6bed (patch) | |
tree | bd09192fbf3aa9268e3cb68474bc0cee55d35c3f /arch/mips/mips-boards/generic/display.c | |
parent | Linux 2.6.22-rc4 (diff) | |
download | linux-79894c7b47f78decaa3511f1d6646aa06e2c6bed.tar.xz linux-79894c7b47f78decaa3511f1d6646aa06e2c6bed.zip |
[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/mips-boards/generic/display.c')
-rw-r--r-- | arch/mips/mips-boards/generic/display.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ */ #include <linux/compiler.h> +#include <linux/timer.h> #include <asm/io.h> #include <asm/mips-boards/generic.h> +extern const char display_string[]; +static unsigned int display_count; +static unsigned int max_display_count; + void mips_display_message(const char *str) { static unsigned int __iomem *display = NULL; @@ -37,3 +42,22 @@ void mips_display_message(const char *str) writel(' ', display + i); } } + +static void scroll_display_message(unsigned long data); +static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); + +static void scroll_display_message(unsigned long data) +{ + mips_display_message(&display_string[display_count++]); + if (display_count == max_display_count) + display_count = 0; + + mod_timer(&mips_scroll_timer, jiffies + HZ); +} + +void mips_scroll_message(void) +{ + del_timer_sync(&mips_scroll_timer); + max_display_count = strlen(display_string) + 1 - 8; + mod_timer(&mips_scroll_timer, jiffies + 1); +} |