Sanitize the bogus KGDB code for Xilinx ML300:
- remove misplaced calls to early_serial_setup() and kgdb8250_add_port() from
ml300_early_serial_map() -- the wouldn't even compile there;
- #include <linux/kgdb.h>;
- change CONFIG_KGDB to CONFIG_KGDB_8250;
- enclose calls to gen550_init() with #ifdef CONFIG_SERIAL_TEXT_DEBUG;
- place a call to kgdb8250_add_port() where it belongs.
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/xilinx_ml300.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
Index: linux-2.6/arch/ppc/platforms/4xx/xilinx_ml300.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/4xx/xilinx_ml300.c
+++ linux-2.6/arch/ppc/platforms/4xx/xilinx_ml300.c
@@ -16,6 +16,8 @@
#include <linux/serial_core.h>
#include <linux/serial_8250.h>
#include <linux/serialP.h>
+#include <linux/kgdb.h>
+
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/ppc_sys.h>
@@ -96,7 +98,7 @@ ml300_map_io(void)
static void __init
ml300_early_serial_init(int num, struct plat_serial8250_port *pdata)
{
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250)
struct uart_port serial_req;
memset(&serial_req, 0, sizeof(serial_req));
@@ -107,13 +109,19 @@ ml300_early_serial_init(int num, struct
serial_req.regshift = pdata->regshift;
serial_req.iotype = pdata->iotype;
serial_req.flags = pdata->flags;
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
gen550_init(num, &serial_req);
#endif
+#ifdef CONFIG_KGDB_8250
+ kgdb8250_add_port(num, &serial_req);
+#endif
+#endif
}
void __init
ml300_early_serial_map(void)
{
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)
struct plat_serial8250_port *pdata;
int i = 0;
@@ -125,14 +133,7 @@ ml300_early_serial_map(void)
pdata++;
i++;
}
-#ifdef CONFIG_SERIAL_8250
- if (early_serial_setup(&port) != 0)
- printk("Early serial init of port %d failed\n", i);
-#endif
-
-#ifdef CONFIG_KGDB_8250
- kgdb8250_add_port(i, &port)
-#endif
+#endif /* defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250) */
}
void __init
-------------------------------------------------------------------------
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