]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/btext.c
[POWERPC] Use udbg_early_init() on ppc32
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / btext.c
index 995fcef156fd81c598b679dcec7fa8f4f241874f..3678997339d6270cfcf5065979965ab4bf15fefa 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/lmb.h>
 #include <asm/processor.h>
+#include <asm/udbg.h>
 
 #define NO_SCROLL
 
@@ -182,7 +183,7 @@ int btext_initialize(struct device_node *np)
        prop = get_property(np, "linux,bootx-linebytes", NULL);
        if (prop == NULL)
                prop = get_property(np, "linebytes", NULL);
-       if (prop)
+       if (prop && *prop != 0xffffffffu)
                pitch = *prop;
        if (pitch == 1)
                pitch = 0x1000;
@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00,
 };
+
+void __init udbg_init_btext(void)
+{
+       /* If btext is enabled, we might have a BAT setup for early display,
+        * thus we do enable some very basic udbg output
+        */
+       udbg_putc = btext_drawchar;
+}