2 * Copyright (C) NEC Electronics Corporation 2004-2006
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #include <linux/kernel.h>
19 #include <linux/types.h>
20 #include <linux/string.h>
21 #include <asm/emma/emma2rh.h>
23 const unsigned long clear
= 0x20202020;
25 #define LED_BASE 0xb1400038
27 void markeins_led_clear(void)
29 emma2rh_out32(LED_BASE
, clear
);
30 emma2rh_out32(LED_BASE
+ 4, clear
);
33 void markeins_led(const char *str
)
36 int len
= strlen(str
);
42 if (emma2rh_in32(0xb0000800) & (0x1 << 18))
43 for (i
= 0; i
< len
; i
++)
44 emma2rh_out8(LED_BASE
+ i
, str
[i
]);
46 for (i
= 0; i
< len
; i
++)
47 emma2rh_out8(LED_BASE
+ (i
& 4) + (3 - (i
& 3)),
51 void markeins_led_hex(u32 val
)
55 sprintf(str
, "%08x", val
);