The serial ports used by kgdb must be initialized very early in the boot.
The ARM 'init_machine' where serial ports are normally initialized is too
late since the 'kgdbwait' command-line option is handled in the early_param()
processing.

Signed-off-by: Kevin Hilman <[EMAIL PROTECTED]>
Signed-off-by: Sergei Shtylyov <[EMAIL PROTECTED]>

---
The patch is an extended version of the original by Kevin; it's against the top
of KGDB patchset in the linux_2_6_21_uprev branch.

 arch/arm/mach-ixp4xx/ixdp425-setup.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/arm/mach-ixp4xx/ixdp425-setup.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ linux-2.6/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -119,6 +119,11 @@ static void __init ixdp425_init(void)
                IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
 
        platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
+}
+
+static void __init ixdp425_map_io(void)
+{
+       ixp4xx_map_io();
 
 #ifdef CONFIG_KGDB_8250
        kgdb8250_add_platform_port(0, &ixdp425_uart_data[0]);
@@ -131,7 +136,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 De
        /* Maintainer: MontaVista Software, Inc. */
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixp4xx_map_io,
+       .map_io         = ixdp425_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -144,7 +149,7 @@ MACHINE_START(IXDP465, "Intel IXDP465 De
        /* Maintainer: MontaVista Software, Inc. */
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixp4xx_map_io,
+       .map_io         = ixdp425_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -157,7 +162,7 @@ MACHINE_START(IXCDP1100, "Intel IXCDP110
        /* Maintainer: MontaVista Software, Inc. */
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixp4xx_map_io,
+       .map_io         = ixdp425_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,


-------------------------------------------------------------------------
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

Reply via email to