12 #include <linux/kernel.h>
17 #include <asm/processor.h>
20 #include <unit/leds.h>
22 #if MN10300_USE_7SEGLEDS
23 static const u8 asb2364_led_hex_tbl[16] = {
24 0x80, 0xf2, 0x48, 0x60, 0x32, 0x24, 0x04, 0xf0,
25 0x00, 0x20, 0x10, 0x06, 0x8c, 0x42, 0x0c, 0x1c
28 static const u32 asb2364_led_chase_tbl[6] = {
37 static unsigned asb2364_led_chase;
43 leds = asb2364_led_hex_tbl[(val/1000) % 10];
45 leds |= asb2364_led_hex_tbl[(val/100) % 10];
47 leds |= asb2364_led_hex_tbl[(val/10) % 10];
49 leds |= asb2364_led_hex_tbl[val % 10];
50 leds |= points^0x01010101;
59 leds = asb2364_led_hex_tbl[(val/1000) % 10];
61 leds |= asb2364_led_hex_tbl[(val/100) % 10];
63 leds |= asb2364_led_hex_tbl[(val/10) % 10];
65 leds |= asb2364_led_hex_tbl[val % 10];
66 leds |= points^0x01010101;
76 leds = asb2364_led_hex_tbl[(code/0x100) % 0x10];
78 leds |= asb2364_led_hex_tbl[(code/0x10) % 0x10];
80 leds |= asb2364_led_hex_tbl[code % 0x10];
90 if (asb2364_led_chase >= 6)
91 asb2364_led_chase = 0;