Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / powerpc / kernel / btext.c
index 995fcef..3678997 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;
+}