Add KGDB support for MPC8[35]xx platforms:
- #include <linux/kgdb.h> and <syslib/gen550.h> instead of <asm/kgdb.h> where
neecessary;
- remove early_serial_map() method initializers;
- change the rest of CONFIG_KGDB to CONFIG_KGDB_8250;
- enclose call to mpc83xx_early_serial_map() function into
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)...
Signed-off-by: Sergey Shtylyov <[EMAIL PROTECTED]>
---
Here's another part of my fixes to arch/ppc/ from August -- at last!
The patch is against linux2_6_21_uprev branch...
arch/ppc/platforms/83xx/mpc834x_sys.c | 5 +++--
arch/ppc/platforms/85xx/mpc8540_ads.c | 7 ++-----
arch/ppc/platforms/85xx/mpc8560_ads.c | 1 -
arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 7 ++-----
arch/ppc/platforms/85xx/sbc8560.c | 6 ++----
arch/ppc/platforms/85xx/tqm85xx.c | 7 ++-----
6 files changed, 11 insertions(+), 22 deletions(-)
Index: linux-2.6/arch/ppc/platforms/83xx/mpc834x_sys.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ linux-2.6/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -42,11 +42,11 @@
#include <asm/pci-bridge.h>
#include <asm/mpc83xx.h>
#include <asm/irq.h>
-#include <asm/kgdb.h>
#include <asm/ppc_sys.h>
#include <mm/mmu_decl.h>
#include <syslib/ppc83xx_setup.h>
+#include <syslib/gen550.h>
#ifndef CONFIG_PCI
unsigned long isa_io_base = 0;
@@ -114,7 +114,9 @@ mpc834x_sys_setup_arch(void)
/* setup PCI host bridges */
mpc83xx_setup_hose();
#endif
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)
mpc83xx_early_serial_map();
+#endif
/* setup the board related info for the MDIO bus */
mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC83xx_MDIO);
@@ -334,7 +336,6 @@ platform_init(unsigned long r3, unsigned
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = mpc83xx_calibrate_decr;
- ppc_md.early_serial_map = mpc83xx_early_serial_map;
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
ppc_md.progress = gen550_progress;
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
Index: linux-2.6/arch/ppc/platforms/85xx/mpc8540_ads.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/mpc8540_ads.c
+++ linux-2.6/arch/ppc/platforms/85xx/mpc8540_ads.c
@@ -43,11 +43,11 @@
#include <asm/mpc85xx.h>
#include <asm/irq.h>
#include <asm/immap_85xx.h>
-#include <asm/kgdb.h>
#include <asm/ppc_sys.h>
#include <mm/mmu_decl.h>
#include <syslib/ppc85xx_setup.h>
+#include <syslib/gen550.h>
/* ************************************************************************
*
@@ -77,7 +77,7 @@ mpc8540ads_setup_arch(void)
mpc85xx_setup_hose();
#endif
-#ifdef CONFIG_SERIAL_8250
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)
mpc85xx_early_serial_map();
#endif
@@ -215,9 +215,6 @@ platform_init(unsigned long r3, unsigned
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
ppc_md.progress = gen550_progress;
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
-#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
- ppc_md.early_serial_map = mpc85xx_early_serial_map;
-#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
if (ppc_md.progress)
ppc_md.progress("mpc8540ads_init(): exit", 0);
Index: linux-2.6/arch/ppc/platforms/85xx/mpc8560_ads.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ linux-2.6/arch/ppc/platforms/85xx/mpc8560_ads.c
@@ -44,7 +44,6 @@
#include <asm/mpc85xx.h>
#include <asm/irq.h>
#include <asm/immap_85xx.h>
-#include <asm/kgdb.h>
#include <asm/ppc_sys.h>
#include <asm/cpm2.h>
#include <mm/mmu_decl.h>
Index: linux-2.6/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ linux-2.6/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -47,12 +47,12 @@
#include <asm/immap_85xx.h>
#include <asm/cpm2.h>
#include <asm/ppc_sys.h>
-#include <asm/kgdb.h>
#include <mm/mmu_decl.h>
#include <syslib/cpm2_pic.h>
#include <syslib/ppc85xx_common.h>
#include <syslib/ppc85xx_setup.h>
+#include <syslib/gen550.h>
#ifndef CONFIG_PCI
@@ -436,7 +436,7 @@ mpc85xx_cds_setup_arch(void)
mpc85xx_setup_hose();
#endif
-#ifdef CONFIG_SERIAL_8250
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)
mpc85xx_early_serial_map();
#endif
@@ -590,9 +590,6 @@ platform_init(unsigned long r3, unsigned
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
ppc_md.progress = gen550_progress;
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
-#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
- ppc_md.early_serial_map = mpc85xx_early_serial_map;
-#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
if (ppc_md.progress)
ppc_md.progress("mpc85xx_cds_init(): exit", 0);
Index: linux-2.6/arch/ppc/platforms/85xx/sbc8560.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/sbc8560.c
+++ linux-2.6/arch/ppc/platforms/85xx/sbc8560.c
@@ -29,6 +29,7 @@
#include <linux/initrd.h>
#include <linux/module.h>
#include <linux/fsl_devices.h>
+#include <linux/kgdb.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -43,12 +44,12 @@
#include <asm/mpc85xx.h>
#include <asm/irq.h>
#include <asm/immap_85xx.h>
-#include <asm/kgdb.h>
#include <asm/ppc_sys.h>
#include <mm/mmu_decl.h>
#include <syslib/ppc85xx_common.h>
#include <syslib/ppc85xx_setup.h>
+#include <syslib/gen550.h>
static void __init
sbc8560_early_serial_map(void)
@@ -228,9 +229,6 @@ platform_init(unsigned long r3, unsigned
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
ppc_md.progress = gen550_progress;
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
-#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
- ppc_md.early_serial_map = sbc8560_early_serial_map;
-#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
if (ppc_md.progress)
ppc_md.progress("sbc8560_init(): exit", 0);
Index: linux-2.6/arch/ppc/platforms/85xx/tqm85xx.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/tqm85xx.c
+++ linux-2.6/arch/ppc/platforms/85xx/tqm85xx.c
@@ -46,7 +46,6 @@
#include <asm/mpc85xx.h>
#include <asm/irq.h>
#include <asm/immap_85xx.h>
-#include <asm/kgdb.h>
#include <asm/ppc_sys.h>
#include <asm/cpm2.h>
#include <mm/mmu_decl.h>
@@ -55,6 +54,7 @@
#include <syslib/cpm2_pic.h>
#include <syslib/ppc85xx_common.h>
#include <syslib/ppc85xx_rio.h>
+#include <syslib/gen550.h>
#ifndef CONFIG_PCI
unsigned long isa_io_base = 0;
@@ -121,7 +121,7 @@ tqm85xx_setup_arch(void)
#endif
#ifndef CONFIG_MPC8560
-#if defined(CONFIG_SERIAL_8250)
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_KGDB_8250)
mpc85xx_early_serial_map();
#endif
@@ -400,9 +400,6 @@ platform_init(unsigned long r3, unsigned
#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
ppc_md.progress = gen550_progress;
#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
-#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
- ppc_md.early_serial_map = mpc85xx_early_serial_map;
-#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
#endif /* CONFIG_MPC8560 */
if (ppc_md.progress)
-------------------------------------------------------------------------
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