apbuart: add support for virtual KGDB<->GRMON channel
PATCH 2/4 apbuart: add support for virtual KGDB<->GRMON channel
Add support for a virtual GRMON<->KGDB channel that
is created using share memory polling by GRMON. Start
GRMON with the option "-vchannel" to enable polling. This feature enables connecting to KGDB without having an hardware serial connection, but using GRMON as an tunnel.
Reorder Makefile addition so that apbuart.o gets inserted before kgdboc.o.
Add Kconfig option SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL to enable the feature.
--- drivers/tty/serial/Kconfig | 12 ++++ drivers/tty/serial/Makefile | 2 +- drivers/tty/serial/apbuart.c | 133 ++++++++++++++++++++++++++++++++++++------ 3 files changed, 128 insertions(+), 19 deletions(-)
drivers/tty/serial/Kconfig +12 -0
@@ -1526,6 +1526,18 @@ config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE help Support for running a console on the GRLIB APBUART +config SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL + bool "Virtual channel created by GRMON to communicate with KGDB" + depends on SERIAL_GRLIB_GAISLER_APBUART=y + default y + help + Add support for a virtual GRMON<->KGDB channel that + is created using share memory polling by GRMON. Start + GRMON with the option "-vchannel" to enable polling. This + feature enables connecting to KGDB without having an hardware + serial connection, but using GRMON as an tunnel. Also + enable KGDB_SERIAL_CONSOLE to use this feature. + config SERIAL_ALTERA_JTAGUART tristate "Altera JTAG UART support" select SERIAL_CORE
drivers/tty/serial/Makefile +1 -1
@@ -81,10 +81,10 @@ obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL) += nwpserial.o obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o +obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o obj-$(CONFIG_SERIAL_QE) += ucc_uart.o obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o -obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_SERIAL_ALTERA_JTAGUART) += altera_jtaguart.o obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o obj-$(CONFIG_SERIAL_VT8500) += vt8500_serial.o
drivers/tty/serial/apbuart.c +110 -18
207 lines not on this page · raw message
Signature · 1 line
1.6.4.1
PATCH 2/4 apbuart: add support for virtual KGDB<->GRMON channel
Add support for a virtual GRMON<->KGDB channel that
is created using share memory polling by GRMON. Start
GRMON with the option "-vchannel" to enable polling. This feature enables connecting to KGDB without having an hardware serial connection, but using GRMON as an tunnel.
Reorder Makefile addition so that apbuart.o gets inserted before kgdboc.o.
Add Kconfig option SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL to enable the feature.
--- drivers/tty/serial/Kconfig | 12 ++++ drivers/tty/serial/Makefile | 2 +- drivers/tty/serial/apbuart.c | 133 ++++++++++++++++++++++++++++++++++++------ 3 files changed, 128 insertions(+), 19 deletions(-)
drivers/tty/serial/Kconfig +12 -0
@@ -1526,6 +1526,18 @@ config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE help Support for running a console on the GRLIB APBUART +config SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL + bool "Virtual channel created by GRMON to communicate with KGDB" + depends on SERIAL_GRLIB_GAISLER_APBUART=y + default y + help + Add support for a virtual GRMON<->KGDB channel that + is created using share memory polling by GRMON. Start + GRMON with the option "-vchannel" to enable polling. This + feature enables connecting to KGDB without having an hardware + serial connection, but using GRMON as an tunnel. Also + enable KGDB_SERIAL_CONSOLE to use this feature. + config SERIAL_ALTERA_JTAGUART tristate "Altera JTAG UART support" select SERIAL_CORE
drivers/tty/serial/Makefile +1 -1
@@ -81,10 +81,10 @@ obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL) += nwpserial.o obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o +obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o obj-$(CONFIG_SERIAL_QE) += ucc_uart.o obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o -obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_SERIAL_ALTERA_JTAGUART) += altera_jtaguart.o obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o obj-$(CONFIG_SERIAL_VT8500) += vt8500_serial.o
drivers/tty/serial/apbuart.c +110 -18
207 lines not on this page · raw message
Signature · 1 line
1.6.4.1
Hi,
I'm not sure what Dave would say, but the code cleanups, (see below) whilst minor, should probably live in a separate patch.
Thanks,
Julian Calaby
Quoted 123 lines · Konrad Eisele
Add support for a virtual GRMON<->KGDB channel that
is created using share memory polling by GRMON. Start
GRMON with the option "-vchannel" to enable polling. This feature enables connecting to KGDB without having an hardware serial connection, but using GRMON as an tunnel.
ReorderMakefileaddition so that apbuart.o gets inserted before kgdboc.o.
AddKconfigoptionSERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUALto enable the feature.Signed-off-by Konrad Eisele <[email protected]>---
drivers/tty/serial/Kconfig | 12 ++++drivers/tty/serial/Makefile| 2 +-drivers/tty/serial/apbuart.c| 133 ++++++++++++++++++++++++++++++++++++------3 files changed, 128 insertions(+), 19 deletions(-)drivers/tty/serial/apbuart.c +0
-1@@ -124,7 +124,6 @@ static void apbuart_rx_chars(struct uart_port *port) uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag); -ignore_char:
status =UART_GET_STATUS(port);
}drivers/tty/serial/apbuart.c +13
-17@@ -350,11 +349,88 @@ static struct uart_ops grlib_apbuart_ops = { .config_port = apbuart_config_port, .verify_port = apbuart_verify_port, #ifdef CONFIG_CONSOLE_POLL - .poll_get_char = apbuart_poll_get_char, - .poll_put_char = apbuart_poll_put_char, -#endif + .poll_get_char = apbuart_poll_get_char, + .poll_put_char = apbuart_poll_put_char, +#endif @@ -423,7 +499,6 @@ static void apbuart_flush_fifo(struct uart_port *port) UART_GET_CHAR(port); } - /* ==================================== */ /* Console driver, if enabled */ /* ==================================== */@@ -551,7 +626,6 @@ static struct console grlib_apbuart_console = { .data = &grlib_apbuart_driver, }; - static int grlib_apbuart_configure(void); static int __init apbuart_console_init(void)@@ -579,7 +653,6 @@ static struct uart_driver grlib_apbuart_driver = { .cons = APBUART_CONSOLE, }; - /* ==================================== */ /* OF Platform Driver */ /* ==================================== */@@ -598,12 +671,12 @@ static int __devinit apbuart_probe(struct platform_device *op) port->dev = &op->dev; port->irq = op->archdata.irqs[0]; - uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); + uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *)port); - apbuart_flush_fifo((struct uart_port *) port); + apbuart_flush_fifo((struct uart_port *)port); printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n", - (unsigned long long) port->mapbase, port->irq); + (unsigned long long)port->mapbase, port->irq); return 0; }@@ -620,13 +693,12 @@ static struct of_device_id __initdata apbuart_match[] = { static struct platform_driver grlib_apbuart_of_driver = { .probe = apbuart_probe, .driver = { - .owner = THIS_MODULE, - .name = "grlib-apbuart", - .of_match_table = apbuart_match, - }, + .owner = THIS_MODULE, + .name = "grlib-apbuart", + .of_match_table = apbuart_match, + }, }; - static int grlib_apbuart_configure(void) { struct device_node *np;@@ -641,7 +713,7 @@ static int grlib_apbuart_configure(void) ampopts = of_get_property(np, "ampopts", NULL); if (ampopts && (*ampopts = 0)) - continue; /* Ignore if used by another OS instance */ + continue; /* Ignore if used by another OS instance */ regs = of_get_property(np, "reg", NULL); /* Frequency of APB Bus is frequency of UART */ freq_hz = of_get_property(np, "freq", NULL);@@ -656,14 +728,16 @@ static int grlib_apbuart_configure(void) port = &grlib_apbuart_ports[line]; port->mapbase = addr; - port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); + port->membase > + ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); port->irq = 0; port->iotype = UPIO_MEM; port->ops = &grlib_apbuart_ops; port->flags = UPF_BOOT_AUTOCONF; port->line = line; port->uartclk = *freq_hz; - port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); + port->fifosize > + apbuart_scan_fifo_size((struct uart_port *)port, line); line++; /* We support maximum UART_NR uarts ... */
Signature · 5 lines
Julian Calaby Email: [email protected] Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
PATCH 2/4 apbuart: add support for virtual KGDB<->GRMON channel
In reply to Konrad EiseleAdd support for a virtual GRMON<->KGDB channel that
is created using share memory polling by GRMON. Start
GRMON with the option "-vchannel" to enable polling. This feature enables connecting to KGDB without having an hardware serial connection, but using GRMON as an tunnel.
Reorder Makefile addition so that apbuart.o gets inserted before kgdboc.o.
Add Kconfig option SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL to enable the feature.
--- drivers/tty/serial/Kconfig | 12 +++++ drivers/tty/serial/Makefile | 2 +- drivers/tty/serial/apbuart.c | 100 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletions(-)
drivers/tty/serial/Kconfig +12 -0
@@ -1526,6 +1526,18 @@ config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE help Support for running a console on the GRLIB APBUART +config SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL + bool "Virtual channel created by GRMON to communicate with KGDB" + depends on SERIAL_GRLIB_GAISLER_APBUART=y + default y + help + Add support for a virtual GRMON<->KGDB channel that + is created using share memory polling by GRMON. Start + GRMON with the option "-vchannel" to enable polling. This + feature enables connecting to KGDB without having an hardware + serial connection, but using GRMON as an tunnel. Also + enable KGDB_SERIAL_CONSOLE to use this feature. + config SERIAL_ALTERA_JTAGUART tristate "Altera JTAG UART support" select SERIAL_CORE
drivers/tty/serial/Makefile +1 -1
@@ -81,10 +81,10 @@ obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL) += nwpserial.o obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o +obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o obj-$(CONFIG_SERIAL_QE) += ucc_uart.o obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o -obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_SERIAL_ALTERA_JTAGUART) += altera_jtaguart.o obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o obj-$(CONFIG_SERIAL_VT8500) += vt8500_serial.o
drivers/tty/serial/apbuart.c +97 -0
115 lines not on this page · raw message
Signature · 1 line
1.6.4.1
PATCH 2/4 apbuart: add support for virtual KGDB<->GRMON channel
In reply to Konrad EiseleAdd support for a virtual GRMON<->KGDB channel that
is created using share memory polling by GRMON. Start
GRMON with the option "-vchannel" to enable polling. This feature enables connecting to KGDB without having an hardware serial connection, but using GRMON as an tunnel.
Reorder Makefile addition so that apbuart.o gets inserted before kgdboc.o.
Add Kconfig option SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL to enable the feature.
--- drivers/tty/serial/Kconfig | 12 +++++ drivers/tty/serial/Makefile | 2 +- drivers/tty/serial/apbuart.c | 100 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletions(-)
drivers/tty/serial/Kconfig +12 -0
@@ -1526,6 +1526,18 @@ config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE help Support for running a console on the GRLIB APBUART +config SERIAL_GRLIB_GAISLER_APBUART_GRMON_VIRTUAL + bool "Virtual channel created by GRMON to communicate with KGDB" + depends on SERIAL_GRLIB_GAISLER_APBUART=y + default y + help + Add support for a virtual GRMON<->KGDB channel that + is created using share memory polling by GRMON. Start + GRMON with the option "-vchannel" to enable polling. This + feature enables connecting to KGDB without having an hardware + serial connection, but using GRMON as an tunnel. Also + enable KGDB_SERIAL_CONSOLE to use this feature. + config SERIAL_ALTERA_JTAGUART tristate "Altera JTAG UART support" select SERIAL_CORE
drivers/tty/serial/Makefile +1 -1
@@ -81,10 +81,10 @@ obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL) += nwpserial.o obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o +obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o obj-$(CONFIG_SERIAL_QE) += ucc_uart.o obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o -obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o obj-$(CONFIG_SERIAL_ALTERA_JTAGUART) += altera_jtaguart.o obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o obj-$(CONFIG_SERIAL_VT8500) += vt8500_serial.o
drivers/tty/serial/apbuart.c +97 -0
115 lines not on this page · raw message
Signature · 1 line
1.6.4.1