Add KGDB support for Bamboo/Luan PPC4xx platforms:
- #include <linux/kgdb.h> and add calls the to kgdb8250_add_port();
- remove early_serial_map() method initializers;
- remove all mentions of CONFIG_KGDB.
Signed-off-by: Wade Farnsworth <[EMAIL PROTECTED]>
Signed-off-by: Sergey Shtylyov <[EMAIL PROTECTED]>
---
The patch is against the top of KGDB patchset in the linux_2_6_21_uprev branch.
arch/ppc/platforms/4xx/bamboo.c | 23 +++++++++++++++++------
arch/ppc/platforms/4xx/luan.c | 13 ++++++++++---
2 files changed, 27 insertions(+), 9 deletions(-)
Index: linux-2.6/arch/ppc/platforms/4xx/bamboo.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/4xx/bamboo.c
+++ linux-2.6/arch/ppc/platforms/4xx/bamboo.c
@@ -30,6 +30,7 @@
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/ethtool.h>
+#include <linux/kgdb.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -337,10 +338,13 @@ bamboo_early_serial_map(void)
printk("Early serial init of port 0 failed\n");
}
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
/* Configure debug serial access */
gen550_init(0, &port);
#endif
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(0, &port);
+#endif
port.membase = ioremap64(PPC440EP_UART1_ADDR, 8);
port.irq = 1;
@@ -351,10 +355,13 @@ bamboo_early_serial_map(void)
printk("Early serial init of port 1 failed\n");
}
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
/* Configure debug serial access */
gen550_init(1, &port);
#endif
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(1, &port);
+#endif
port.membase = ioremap64(PPC440EP_UART2_ADDR, 8);
port.irq = 3;
@@ -365,10 +372,13 @@ bamboo_early_serial_map(void)
printk("Early serial init of port 2 failed\n");
}
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
/* Configure debug serial access */
gen550_init(2, &port);
#endif
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(2, &port);
+#endif
port.membase = ioremap64(PPC440EP_UART3_ADDR, 8);
port.irq = 4;
@@ -378,6 +388,10 @@ bamboo_early_serial_map(void)
if (early_serial_setup(&port) != 0) {
printk("Early serial init of port 3 failed\n");
}
+
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(3, &port);
+#endif
}
static void __init
@@ -435,8 +449,5 @@ void __init platform_init(unsigned long
ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val;
-#ifdef CONFIG_KGDB
- ppc_md.early_serial_map = bamboo_early_serial_map;
-#endif
}
Index: linux-2.6/arch/ppc/platforms/4xx/luan.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/4xx/luan.c
+++ linux-2.6/arch/ppc/platforms/4xx/luan.c
@@ -30,6 +30,7 @@
#include <linux/tty.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
+#include <linux/kgdb.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -283,6 +284,9 @@ luan_early_serial_map(void)
if (early_serial_setup(&port) != 0) {
printk("Early serial init of port 0 failed\n");
}
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(0, &port);
+#endif
port.membase = ioremap64(PPC440SP_UART1_ADDR, 8);
port.irq = UART1_INT;
@@ -292,6 +296,9 @@ luan_early_serial_map(void)
if (early_serial_setup(&port) != 0) {
printk("Early serial init of port 1 failed\n");
}
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(1, &port);
+#endif
port.membase = ioremap64(PPC440SP_UART2_ADDR, 8);
port.irq = UART2_INT;
@@ -301,6 +308,9 @@ luan_early_serial_map(void)
if (early_serial_setup(&port) != 0) {
printk("Early serial init of port 2 failed\n");
}
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(2, &port);
+#endif
}
static void __init
@@ -360,7 +370,4 @@ void __init platform_init(unsigned long
ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */
ppc_md.calibrate_decr = luan_calibrate_decr;
-#ifdef CONFIG_KGDB
- ppc_md.early_serial_map = luan_early_serial_map;
-#endif
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport