aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/of_serial.h17
-rw-r--r--include/linux/serial_8250.h1
-rw-r--r--include/linux/serial_core.h5
3 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/of_serial.h b/include/linux/of_serial.h
new file mode 100644
index 000000000000..4a73ed80b4c0
--- /dev/null
+++ b/include/linux/of_serial.h
@@ -0,0 +1,17 @@
1#ifndef __LINUX_OF_SERIAL_H
2#define __LINUX_OF_SERIAL_H
3
4/*
5 * FIXME remove this file when tegra finishes conversion to open firmware,
6 * expectation is that all quirks will then be self-contained in
7 * drivers/tty/serial/of_serial.c.
8 */
9#ifdef CONFIG_ARCH_TEGRA
10extern void tegra_serial_handle_break(struct uart_port *port);
11#else
12static inline void tegra_serial_handle_break(struct uart_port *port)
13{
14}
15#endif
16
17#endif /* __LINUX_OF_SERIAL */
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 8f012f8ac8e9..a522fd977aad 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -38,6 +38,7 @@ struct plat_serial8250_port {
38 int (*handle_irq)(struct uart_port *); 38 int (*handle_irq)(struct uart_port *);
39 void (*pm)(struct uart_port *, unsigned int state, 39 void (*pm)(struct uart_port *, unsigned int state,
40 unsigned old); 40 unsigned old);
41 void (*handle_break)(struct uart_port *);
41}; 42};
42 43
43/* 44/*
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f51bf2e70c69..0dd752f3039d 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -310,6 +310,7 @@ struct uart_port {
310 int (*handle_irq)(struct uart_port *); 310 int (*handle_irq)(struct uart_port *);
311 void (*pm)(struct uart_port *, unsigned int state, 311 void (*pm)(struct uart_port *, unsigned int state,
312 unsigned int old); 312 unsigned int old);
313 void (*handle_break)(struct uart_port *);
313 unsigned int irq; /* irq number */ 314 unsigned int irq; /* irq number */
314 unsigned long irqflags; /* irq flags */ 315 unsigned long irqflags; /* irq flags */
315 unsigned int uartclk; /* base uart clock */ 316 unsigned int uartclk; /* base uart clock */
@@ -533,6 +534,10 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
533static inline int uart_handle_break(struct uart_port *port) 534static inline int uart_handle_break(struct uart_port *port)
534{ 535{
535 struct uart_state *state = port->state; 536 struct uart_state *state = port->state;
537
538 if (port->handle_break)
539 port->handle_break(port);
540
536#ifdef SUPPORT_SYSRQ 541#ifdef SUPPORT_SYSRQ
537 if (port->cons && port->cons->index == port->line) { 542 if (port->cons && port->cons->index == port->line) {
538 if (!port->sysrq) { 543 if (!port->sysrq) {