aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/8250.c17
-rw-r--r--include/linux/serial_8250.h4
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 6994afb5571a..37f19a678c97 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2672,6 +2672,16 @@ static struct uart_ops serial8250_pops = {
2672 2672
2673static struct uart_8250_port serial8250_ports[UART_NR]; 2673static struct uart_8250_port serial8250_ports[UART_NR];
2674 2674
2675static void (*serial8250_isa_config)(int port, struct uart_port *up,
2676 unsigned short *capabilities);
2677
2678void serial8250_set_isa_configurator(
2679 void (*v)(int port, struct uart_port *up, unsigned short *capabilities))
2680{
2681 serial8250_isa_config = v;
2682}
2683EXPORT_SYMBOL(serial8250_set_isa_configurator);
2684
2675static void __init serial8250_isa_init_ports(void) 2685static void __init serial8250_isa_init_ports(void)
2676{ 2686{
2677 struct uart_8250_port *up; 2687 struct uart_8250_port *up;
@@ -2717,6 +2727,9 @@ static void __init serial8250_isa_init_ports(void)
2717 up->port.regshift = old_serial_port[i].iomem_reg_shift; 2727 up->port.regshift = old_serial_port[i].iomem_reg_shift;
2718 set_io_from_upio(&up->port); 2728 set_io_from_upio(&up->port);
2719 up->port.irqflags |= irqflag; 2729 up->port.irqflags |= irqflag;
2730 if (serial8250_isa_config != NULL)
2731 serial8250_isa_config(i, &up->port, &up->capabilities);
2732
2720 } 2733 }
2721} 2734}
2722 2735
@@ -3178,6 +3191,10 @@ int serial8250_register_port(struct uart_port *port)
3178 if (port->pm) 3191 if (port->pm)
3179 uart->port.pm = port->pm; 3192 uart->port.pm = port->pm;
3180 3193
3194 if (serial8250_isa_config != NULL)
3195 serial8250_isa_config(0, &uart->port,
3196 &uart->capabilities);
3197
3181 ret = uart_add_one_port(&serial8250_reg, &uart->port); 3198 ret = uart_add_one_port(&serial8250_reg, &uart->port);
3182 if (ret == 0) 3199 if (ret == 0)
3183 ret = uart->port.line; 3200 ret = uart->port.line;
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index bf9c2bdb2e05..97f5b45bbc07 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -81,4 +81,8 @@ extern void serial8250_do_set_termios(struct uart_port *port,
81extern void serial8250_do_pm(struct uart_port *port, unsigned int state, 81extern void serial8250_do_pm(struct uart_port *port, unsigned int state,
82 unsigned int oldstate); 82 unsigned int oldstate);
83 83
84extern void serial8250_set_isa_configurator(void (*v)
85 (int port, struct uart_port *up,
86 unsigned short *capabilities));
87
84#endif 88#endif