ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ia64 / sn / leds.h
1 #ifndef _ASM_IA64_SN_LEDS_H
2 #define _ASM_IA64_SN_LEDS_H
3
4 /*
5  * This file is subject to the terms and conditions of the GNU General Public
6  * License.  See the file "COPYING" in the main directory of this archive
7  * for more details.
8  * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved.
9  */
10
11 #include <asm/sn/addrs.h>
12 #include <asm/sn/pda.h>
13 #include <asm/sn/sn2/shub.h>
14
15 #define LED0            (LOCAL_MMR_ADDR(SH_REAL_JUNK_BUS_LED0))
16 #define LED_CPU_SHIFT   16
17
18 #define LED_CPU_HEARTBEAT       0x01
19 #define LED_CPU_ACTIVITY        0x02
20 #define LED_ALWAYS_SET          0x00
21
22 /*
23  * Basic macros for flashing the LEDS on an SGI SN.
24  */
25
26 static __inline__ void
27 set_led_bits(u8 value, u8 mask)
28 {
29         pda->led_state = (pda->led_state & ~mask) | (value & mask);
30         *pda->led_address = (short) pda->led_state;
31 }
32
33 #endif /* _ASM_IA64_SN_LEDS_H */
34