summaryrefslogtreecommitdiff
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-09-25 01:27:53 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-27 00:47:02 +0400
commitc7f3e7087ab0abb52bb1286010f2c104fd38ca5c (patch)
tree322207554769abe35110e41a4de93aa273b8c901 /include/linux/serial_core.h
parent729043e82cdd403a131127254528afea8031ebab (diff)
downloadlinux-c7f3e7087ab0abb52bb1286010f2c104fd38ca5c.tar.xz
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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index bb010030828a..f9b22ec7a9f3 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