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.
10 static void mach_led(int position, int value)
12 volatile unsigned char* p = (volatile unsigned char*)0xa2000000;
21 #ifdef CONFIG_HEARTBEAT
23 #include <linux/sched.h>
25 /* Cycle the LED's in the clasic Knightrider/Sun pattern */
26 void heartbeat_mpc1211(void)
28 static unsigned int cnt = 0, period = 0;
29 volatile unsigned char* p = (volatile unsigned char*)0xa2000000;
30 static unsigned bit = 0, up = 1;
39 /* Go through the points (roughly!):
40 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
42 period = 110 - ( (300<<FSHIFT)/
43 ((avenrun[0]/5) + (3<<FSHIFT)) );
63 #endif /* CONFIG_HEARTBEAT */