diff options
author | Eugene Konev <ejka@imfi.kspu.ru> | 2007-05-06 15:25:02 +0000 |
---|---|---|
committer | Eugene Konev <ejka@imfi.kspu.ru> | 2007-05-06 15:25:02 +0000 |
commit | 6c6a9d634e17b20e8201c40dc4eaabd4224e3d1a (patch) | |
tree | ac3dafb22ddd2300b2a19c31b18fd8cbbbfc752f | |
parent | 5323419430b6ca0bd36ac5a6f3e37006f281d09e (diff) | |
download | master-31e0f0ae-6c6a9d634e17b20e8201c40dc4eaabd4224e3d1a.tar.gz master-31e0f0ae-6c6a9d634e17b20e8201c40dc4eaabd4224e3d1a.tar.bz2 master-31e0f0ae-6c6a9d634e17b20e8201c40dc4eaabd4224e3d1a.zip |
ar7: Add minimal kgdb implementation (#114).
SVN-Revision: 7109
-rw-r--r-- | target/linux/ar7-2.6/files/arch/mips/ar7/prom.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c b/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c index 99b528d447..00cb4a6de3 100644 --- a/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c +++ b/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c @@ -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,13 @@ static void __init console_config(void) if (strstr(prom_getcmdline(), "console=")) return; +#ifdef CONFIG_KGDB + strcat(prom_getcmdline(), " console=kgdb"); + prom_printf("Please connect GDB to this port\n"); + kgdb_enabled = 1; + return; +#endif + if ((s = prom_getenv("modetty0"))) { baud = simple_strtoul(s, &p, 10); s = p; @@ -301,4 +309,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); |