diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-09-24 14:27:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 13:47:02 -0700 |
commit | c7f3e7087ab0abb52bb1286010f2c104fd38ca5c (patch) | |
tree | 322207554769abe35110e41a4de93aa273b8c901 /include/linux/serial_core.h | |
parent | 729043e82cdd403a131127254528afea8031ebab (diff) | |
download | kernel_goldelico_gta04-c7f3e7087ab0abb52bb1286010f2c104fd38ca5c.zip kernel_goldelico_gta04-c7f3e7087ab0abb52bb1286010f2c104fd38ca5c.tar.gz kernel_goldelico_gta04-c7f3e7087ab0abb52bb1286010f2c104fd38ca5c.tar.bz2 |
tty/serial/core: Introduce poll_init callback
It was noticed that polling drivers (like KGDB) are not able to use
serial ports if the ports were not previously initialized via console.
I.e. when booting with console=ttyAMA0 kgdboc=ttyAMA0, everything works
fine, but with console=ttyFOO kgdboc=ttyAMA0, the kgdboc doesn't work.
This is because we don't initialize the hardware. Calling ->startup() is
not an option, because drivers request interrupts there, and drivers
fail to handle situations when tty isn't opened with interrupts enabled.
So, we have to implement a new callback (actually, tty_ops already have
a similar callback), which does everything needed to initialize just the
hardware.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index bb01003..f9b22ec 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -275,6 +275,7 @@ struct uart_ops { int (*verify_port)(struct uart_port *, struct serial_struct *); int (*ioctl)(struct uart_port *, unsigned int, unsigned long); #ifdef CONFIG_CONSOLE_POLL + int (*poll_init)(struct uart_port *); void (*poll_put_char)(struct uart_port *, unsigned char); int (*poll_get_char)(struct uart_port *); #endif |