aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/7343/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/se/7343/led.c')
-rw-r--r--arch/sh/boards/se/7343/led.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/arch/sh/boards/se/7343/led.c b/arch/sh/boards/se/7343/led.c
deleted file mode 100644
index 6b39e191c420..000000000000
--- a/arch/sh/boards/se/7343/led.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * arch/sh/boards/se/7343/led.c
3 *
4 */
5#include <linux/sched.h>
6#include <asm/mach/se7343.h>
7
8/* Cycle the LED's in the clasic Knightrider/Sun pattern */
9void heartbeat_7343se(void)
10{
11 static unsigned int cnt = 0, period = 0;
12 volatile unsigned short *p = (volatile unsigned short *) PA_LED;
13 static unsigned bit = 0, up = 1;
14
15 cnt += 1;
16 if (cnt < period) {
17 return;
18 }
19
20 cnt = 0;
21
22 /* Go through the points (roughly!):
23 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
24 */
25 period = 110 - ((300 << FSHIFT) / ((avenrun[0] / 5) + (3 << FSHIFT)));
26
27 if (up) {
28 if (bit == 7) {
29 bit--;
30 up = 0;
31 } else {
32 bit++;
33 }
34 } else {
35 if (bit == 0) {
36 bit++;
37 up = 1;
38 } else {
39 bit--;
40 }
41 }
42 *p = 1 << (bit + LED_SHIFT);
43
44}