3 * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #ifndef _ASM_UNIT_LEDS_H
13 #define _ASM_UNIT_LEDS_H
15 #include <asm/pio-regs.h>
16 #include <asm/cpu-regs.h>
17 #include <asm/exceptions.h>
19 #define MN10300_USE_7SEGLEDS 0
21 #define ASB2364_7SEGLEDS __SYSREG(0xA9001630, u32)
24 * use the 7-segment LEDs to indicate states
27 #if MN10300_USE_7SEGLEDS
28 /* flip the 7-segment LEDs between "Gdb-" and "----" */
29 #define mn10300_set_gdbleds(ONOFF) \
31 ASB2364_7SEGLEDS = (ONOFF) ? 0x8543077f : 0x7f7f7f7f; \
34 #define mn10300_set_gdbleds(ONOFF) do {} while (0)
37 #if MN10300_USE_7SEGLEDS
38 /* indicate double-fault by displaying "db-f" on the LEDs */
39 #define mn10300_set_dbfleds \
41 mov d0,(ASB2364_7SEGLEDS)
43 #define mn10300_set_dbfleds
47 extern void peripheral_leds_display_exception(enum exception_code
);
48 extern void peripheral_leds_led_chase(void);
49 extern void peripheral_leds7x4_display_dec(unsigned int, unsigned int);
50 extern void peripheral_leds7x4_display_hex(unsigned int, unsigned int);
51 extern void debug_to_serial(const char *, int);
52 #endif /* __ASSEMBLY__ */
54 #endif /* _ASM_UNIT_LEDS_H */