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-2002 Silicon Graphics, Inc. All rights reserved. 9 */ 10 11#include <linux/config.h> 12#include <asm/smp.h> 13#include <asm/sn/addrs.h> 14#include <asm/sn/sn_cpuid.h> 15#include <asm/sn/pda.h> 16 17#ifdef CONFIG_IA64_SGI_SN1 18#define LED0 0xc0000b00100000c0LL 19#define LED_CPU_SHIFT 3 20#else 21#include <asm/sn/sn2/shub.h> 22#define LED0 (LOCAL_MMR_ADDR(SH_REAL_JUNK_BUS_LED0)) 23#define LED_CPU_SHIFT 16 24#endif 25 26#define LED_CPU_HEARTBEAT 0x01 27#define LED_CPU_ACTIVITY 0x02 28#define LED_MASK_AUTOTEST 0xfe 29 30/* 31 * Basic macros for flashing the LEDS on an SGI, SN1. 32 */ 33 34static __inline__ void 35set_led_bits(u8 value, u8 mask) 36{ 37 pda.led_state = (pda.led_state & ~mask) | (value & mask); 38#ifdef CONFIG_IA64_SGI_SN1 39 *pda.led_address = (long) pda.led_state; 40#else 41 *pda.led_address = (short) pda.led_state; 42#endif 43} 44 45#endif /* _ASM_IA64_SN_LEDS_H */ 46 47