]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
malta: display "U-boot" on the LCD screen
authorPaul Burton <paul.burton@imgtec.com>
Fri, 8 Nov 2013 11:18:51 +0000 (11:18 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 9 Nov 2013 16:21:01 +0000 (17:21 +0100)
Displaying a message on the LCD screen is a simple yet effective way to
show the user that the board has booted successfully.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
arch/mips/include/asm/malta.h
board/imgtec/malta/malta.c

index 0b50a66e07df9fec319c78fca465e239c1d46fb6..d8ec57cf48821a9f4aa7629a4acc52ab0d806bc3 100644 (file)
 #define MALTA_MSC01_PCIIO_MAP          0x00000000
 #define MALTA_MSC01_UART0_BASE         (MALTA_MSC01_PCIIO_BASE + 0x3f8)
 
+#define MALTA_ASCIIWORD                        0x1f000410
+#define MALTA_ASCIIPOS0                        0x1f000418
+#define MALTA_ASCIIPOS1                        0x1f000420
+#define MALTA_ASCIIPOS2                        0x1f000428
+#define MALTA_ASCIIPOS3                        0x1f000430
+#define MALTA_ASCIIPOS4                        0x1f000438
+#define MALTA_ASCIIPOS5                        0x1f000440
+#define MALTA_ASCIIPOS6                        0x1f000448
+#define MALTA_ASCIIPOS7                        0x1f000450
+
 #define MALTA_RESET_BASE               0x1f000500
 #define GORESET                                0x42
 
index 2af00672daa0dbe676ad1cc09c58eb1e1f72e122..119546ae1668ddc63cff0d0a8f1fec594c2cfab9 100644 (file)
@@ -29,6 +29,24 @@ enum sys_con {
        SYSCON_MSC01,
 };
 
+static void malta_lcd_puts(const char *str)
+{
+       int i;
+       void *reg = (void *)CKSEG1ADDR(MALTA_ASCIIPOS0);
+
+       /* print up to 8 characters of the string */
+       for (i = 0; i < min(strlen(str), 8); i++) {
+               __raw_writel(str[i], reg);
+               reg += MALTA_ASCIIPOS1 - MALTA_ASCIIPOS0;
+       }
+
+       /* fill the rest of the display with spaces */
+       for (; i < 8; i++) {
+               __raw_writel(' ', reg);
+               reg += MALTA_ASCIIPOS1 - MALTA_ASCIIPOS0;
+       }
+}
+
 static enum core_card malta_core_card(void)
 {
        u32 corid, rev;
@@ -71,6 +89,7 @@ int checkboard(void)
 {
        enum core_card core;
 
+       malta_lcd_puts("U-boot");
        puts("Board: MIPS Malta");
 
        core = malta_core_card();