1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) NEC Electronics Corporation 2004-2006
5 #include <linux/kernel.h>
6 #include <linux/types.h>
7 #include <linux/string.h>
8 #include <asm/emma/emma2rh.h>
10 const unsigned long clear = 0x20202020;
12 #define LED_BASE 0xb1400038
14 void markeins_led_clear(void)
16 emma2rh_out32(LED_BASE, clear);
17 emma2rh_out32(LED_BASE + 4, clear);
20 void markeins_led(const char *str)
23 int len = strlen(str);
29 if (emma2rh_in32(0xb0000800) & (0x1 << 18))
30 for (i = 0; i < len; i++)
31 emma2rh_out8(LED_BASE + i, str[i]);
33 for (i = 0; i < len; i++)
34 emma2rh_out8(LED_BASE + (i & 4) + (3 - (i & 3)),
38 void markeins_led_hex(u32 val)
42 sprintf(str, "%08x", val);