ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / mach-ftvpci / leds.c
1 /*
2  *  linux/arch/arm/kernel/leds-ftvpci.c
3  *
4  *  Copyright (C) 1999 FutureTV Labs Ltd
5  */
6
7 #include <linux/module.h>
8 #include <linux/init.h>
9
10 #include <asm/hardware.h>
11 #include <asm/leds.h>
12 #include <asm/system.h>
13 #include <asm/io.h>
14
15 static void ftvpci_leds_event(led_event_t ledevt)
16 {
17         static int led_state = 0;
18
19         switch(ledevt) {
20         case led_timer:
21                 led_state ^= 1;
22                 raw_writeb(0x1a | led_state, INTCONT_BASE);
23                 break;
24
25         default:
26                 break;
27         }
28 }
29
30 static int __init ftvpci_leds_init(void)
31 {
32         leds_event = ftvpci_leds_event;
33         return 0;
34 }
35
36 arch_initcall(ftvpci_leds_init);