2 * linux/arch/sh/kernel/led_mpc1211.c
4 * Copyright (C) 2001 Saito.K & Jeanne
6 * This file contains Interface MPC-1211 specific LED code.
9 #include <linux/config.h>
11 static void mach_led(int position
, int value
)
13 volatile unsigned char* p
= (volatile unsigned char*)0xa2000000;
22 #ifdef CONFIG_HEARTBEAT
24 #include <linux/sched.h>
26 /* Cycle the LED's in the clasic Knightrider/Sun pattern */
27 void heartbeat_mpc1211(void)
29 static unsigned int cnt
= 0, period
= 0;
30 volatile unsigned char* p
= (volatile unsigned char*)0xa2000000;
31 static unsigned bit
= 0, up
= 1;
40 /* Go through the points (roughly!):
41 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
43 period
= 110 - ( (300<<FSHIFT
)/
44 ((avenrun
[0]/5) + (3<<FSHIFT
)) );
64 #endif /* CONFIG_HEARTBEAT */