add ar7-2.6 fixes by Stefan Weil
[openwrt.git] / target / linux / ar7-2.6 / files / arch / mips / ar7 / prom.c
index 99b528d..38037dd 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/io.h>
 #include <asm/bootinfo.h>
 #include <asm/mips-boards/prom.h>
+#include <asm/gdb-stub.h>
 
 #include <asm/ar7/ar7.h>
 
@@ -243,6 +244,12 @@ static void __init console_config(void)
        if (strstr(prom_getcmdline(), "console="))
                return;
 
+#ifdef CONFIG_KGDB
+       strcat(prom_getcmdline(), " console=kgdb");
+       kgdb_enabled = 1;
+       return;
+#endif
+
        if ((s = prom_getenv("modetty0"))) {
                baud = simple_strtoul(s, &p, 10);
                s = p;
@@ -271,7 +278,6 @@ static void __init console_config(void)
 
 void __init prom_init(void)
 {
-       prom_printf("\nLINUX running...\n");
        ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
        ar7_init_env((struct env_var *)fw_arg2);
        console_config();
@@ -301,4 +307,16 @@ int prom_putchar(char c)
        return 1;
 }
 
+#ifdef CONFIG_KGDB
+int putDebugChar(char c)
+{
+       return prom_putchar(c);
+}
+
+char getDebugChar(void)
+{
+       return prom_getchar();
+}
+#endif
+
 EXPORT_SYMBOL(prom_getenv);
This page took 0.025906 seconds and 4 git commands to generate.