Fix errors/warnings in the PXA and AMBA PL011 UARTs' KGDB serial drivers:

- PXA UART selection was missing;

- KGDB baud rate option was not enabled;

- write_char method took argument of type 'int' instead of 'u8'.

Signed-off-by: Vitaly Wool <[EMAIL PROTECTED]>
Signed-off-by: Sergey Shtylyov <[EMAIL PROTECTED]>

---
is patch is against linux2_6_21_uprev branch and is based on Vitaly's former
patch that obviously got lost...

 arch/arm/mach-pxa/kgdb-serial.c |    2 +-
 drivers/serial/pl011_kgdb.c     |    2 +-
 lib/Kconfig.kgdb                |   18 +++++++++++++++++-
 3 files changed, 19 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/arm/mach-pxa/kgdb-serial.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-pxa/kgdb-serial.c
+++ linux-2.6/arch/arm/mach-pxa/kgdb-serial.c
@@ -62,7 +62,7 @@ static int kgdb_serial_init(void)
        return 0;
 }
 
-static void kgdb_serial_putchar(int c)
+static void kgdb_serial_putchar(u8 c)
 {
        if (!(CKEN & CKEN_UART) || port[UART_IER] != IER_UUE)
                kgdb_serial_init();
Index: linux-2.6/drivers/serial/pl011_kgdb.c
===================================================================
--- linux-2.6.orig/drivers/serial/pl011_kgdb.c
+++ linux-2.6/drivers/serial/pl011_kgdb.c
@@ -50,7 +50,7 @@ static int kgdb_serial_init(void)
        return 0;
 }
 
-static void kgdb_serial_putchar(int ch)
+static void kgdb_serial_putchar(u8 ch)
 {
        unsigned int status;
 
Index: linux-2.6/lib/Kconfig.kgdb
===================================================================
--- linux-2.6.orig/lib/Kconfig.kgdb
+++ linux-2.6/lib/Kconfig.kgdb
@@ -131,6 +131,21 @@ config KGDB_PXA_SERIAL
          Enables the KGDB serial driver for Intel PXA SOC
 endchoice
 
+choice
+       prompt "PXA UART to use for KGDB"
+       depends on KGDB_PXA_SERIAL
+       default KGDB_PXA_FFUART
+
+config KGDB_PXA_FFUART
+       bool "FFUART"
+
+config KGDB_PXA_BTUART
+       bool "BTUART"
+
+config KGDB_PXA_STUART
+       bool "STUART"
+endchoice
+
 config KGDBOE
        tristate "KGDB: On ethernet" if !KGDBOE_NOMODULE
        depends on m && KGDB
@@ -164,7 +179,8 @@ config KGDB_SIMPLE_SERIAL
 
 config KGDB_BAUDRATE
        int "Debug serial port baud rate"
-       depends on (KGDB_8250 && KGDB_SIMPLE_SERIAL) || KGDB_TXX9
+       depends on (KGDB_8250 && KGDB_SIMPLE_SERIAL) || KGDB_TXX9 \
+               || KGDB_PXA_SERIAL || KGDB_AMBA_PL011
        default "115200"
        help
          gdb and the kernel stub need to agree on the baud rate to be


-------------------------------------------------------------------------
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
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to