diff options
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r-- | arch/xtensa/platforms/xt2000/setup.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c index 08bc9b0ede3e..dc187684203b 100644 --- a/arch/xtensa/platforms/xt2000/setup.c +++ b/arch/xtensa/platforms/xt2000/setup.c @@ -23,6 +23,7 @@ #include <linux/platform_device.h> #include <linux/serial.h> #include <linux/serial_8250.h> +#include <linux/timer.h> #include <asm/processor.h> #include <asm/platform.h> @@ -70,16 +71,17 @@ void __init platform_setup(char** cmdline) /* Heartbeat. Let the LED blink. */ -void platform_heartbeat(void) +static void xt2000_heartbeat(struct timer_list *unused); + +static DEFINE_TIMER(heartbeat_timer, xt2000_heartbeat); + +static void xt2000_heartbeat(struct timer_list *unused) { - static int i, t; + static int i; - if (--t < 0) - { - t = 59; - led_print(7, i ? ".": " "); - i ^= 1; - } + led_print(7, i ? "." : " "); + i ^= 1; + mod_timer(&heartbeat_timer, jiffies + HZ / 2); } //#define RS_TABLE_SIZE 2 @@ -137,7 +139,7 @@ static int __init xt2000_setup_devinit(void) { platform_device_register(&xt2000_serial8250_device); platform_device_register(&xt2000_sonic_device); - + mod_timer(&heartbeat_timer, jiffies + HZ / 2); return 0; } |