Hi Thomas, Thanks for your reply. I tried this patch, but the result is the same. :( I use minicom in host PC as console terminal to display the kernel trace. Is there still anything wrong? Thanks. Regards, Ryan 2011/8/30 Thomas Abraham <thomas.abraham@xxxxxxxxxx>: > Hi Ryan, > > On 29 August 2011 12:33, xf liu <7inchpalace@xxxxxxxxx> wrote: >> >> Hi list, >> >> >> I try to enable kgdb on S5PV210 using the same serial port (UART 0) >> with the console, but after adding "kgdboc=ttySAC0,115200 kgdbwait" I >> found tty_find_polling_driver returns NULL. >> The cause is that the poll_get_char and poll_put_char handlers are not >> set in static struct uart_ops s3c24xx_serial_ops. >> >> I tried google but do net found any patch for this, but maybe I lost >> something. >> Is there any patch I can get from anywhere or should I implement the >> functions by myself? > > This has not been supported in the mainline yet. Following diff can be used > for this but please note that this is not been compile and run tested. > > diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c > index ae7a302..5664ec0 100644 > --- a/drivers/tty/serial/samsung.c > +++ b/drivers/tty/serial/samsung.c > @@ -66,6 +66,9 @@ > /* flag to ignore all characters coming in */ > #define RXSTAT_DUMMY_READ (0x10000000) > > +static char s3c24xx_serial_console_putchar(struct uart_port *port); > +static char s3c24xx_serial_console_getchar(struct uart_port *port); > + > static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) > { > return container_of(port, struct s3c24xx_uart_port, port); > @@ -957,6 +960,10 @@ static struct uart_ops s3c24xx_serial_ops = { > .request_port = s3c24xx_serial_request_port, > .config_port = s3c24xx_serial_config_port, > .verify_port = s3c24xx_serial_verify_port, > +#ifdef CONFIG_CONSOLE_POLL > + .poll_put_char = s3c24xx_serial_console_putchar, > + .poll_get_char = s3c24xx_serial_console_getchar, > +#endif > }; > > static struct uart_driver s3c24xx_uart_drv = { > @@ -1382,6 +1389,25 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, > unsigned int ufcon) > return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0; > } > > +static int > +s3c24xx_serial_console_rxrdy(struct uart_port *port, unsigned int ufcon) > +{ > + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); > + unsigned long ufstat, utrstat; > + > + if (ufcon & S3C2410_UFCON_FIFOMODE) { > + /* fifo mode - check amount of data in fifo registers... */ > + > + ufstat = rd_regl(port, S3C2410_UFSTAT); > + return (ufstat & info->rx_fifofull) ? 1 : 0; > + } > + > + /* in non-fifo mode, we go and use the rx buffer full */ > + > + utrstat = rd_regl(port, S3C2410_UTRSTAT); > + return (utrstat & S3C2410_UTRSTAT_RXDR) ? 1 : 0; > +} > + > static void > s3c24xx_serial_console_putchar(struct uart_port *port, int ch) > { > @@ -1391,6 +1417,15 @@ s3c24xx_serial_console_putchar(struct uart_port > *port, int ch) > wr_regb(cons_uart, S3C2410_UTXH, ch); > } > > +static char > +s3c24xx_serial_console_getchar(struct uart_port *port) > +{ > + unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); > + while (!s3c24xx_serial_console_rxrdy(port, ufcon)) > + barrier(); > + rd_regb(cons_uart, S3C2410_URXH); > +} > + > static void > s3c24xx_serial_console_write(struct console *co, const char *s, > unsigned int count) > > Regards, > Thomas. > > >> >> Thanks in advance. >> >> Regards, >> Ryan >> -- >> To unsubscribe from this list: send the line "unsubscribe >> linux-samsung-soc" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html