[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / sh64 / mach-cayman / led.c
blob8b3cc4c788708f24307179b19db175567261fa44
1 /*
2 * arch/sh64/kernel/led_cayman.c
4 * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
9 * Flash the LEDs
11 #include <asm/io.h>
14 ** It is supposed these functions to be used for a low level
15 ** debugging (via Cayman LEDs), hence to be available as soon
16 ** as possible.
17 ** Unfortunately Cayman LEDs relies on Cayman EPLD to be mapped
18 ** (this happen when IRQ are initialized... quite late).
19 ** These triky dependencies should be removed. Temporary, it
20 ** may be enough to NOP until EPLD is mapped.
23 extern unsigned long epld_virt;
25 #define LED_ADDR (epld_virt + 0x008)
26 #define HDSP2534_ADDR (epld_virt + 0x100)
28 void mach_led(int position, int value)
30 if (!epld_virt)
31 return;
33 if (value)
34 ctrl_outl(0, LED_ADDR);
35 else
36 ctrl_outl(1, LED_ADDR);
40 void mach_alphanum(int position, unsigned char value)
42 if (!epld_virt)
43 return;
45 ctrl_outb(value, HDSP2534_ADDR + 0xe0 + (position << 2));
48 void mach_alphanum_brightness(int setting)
50 ctrl_outb(setting & 7, HDSP2534_ADDR + 0xc0);