diff options
| author | Mans Rullgard <mans@mansr.com> | 2015-03-08 10:30:04 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 17:50:15 -0400 |
| commit | ee97d0e3f06498487671c23cad4230bf9aa5fd88 (patch) | |
| tree | 8365fe448e50f06c032c19260d9b52cce171dfab /drivers/tty | |
| parent | 5ef86b74209db33c133b5f18738dd8f3189b63a1 (diff) | |
serial: 8250: allow specifying iomem size in addition to address
This adds a mapsize field to struct uart_port to be used in
conjunction with mapbase. If set, it overrides whatever value
serial8250_port_size() would otherwise report.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
| -rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 9b2de25359d1..e0fb5f053d09 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
| @@ -2722,6 +2722,8 @@ serial8250_pm(struct uart_port *port, unsigned int state, | |||
| 2722 | 2722 | ||
| 2723 | static unsigned int serial8250_port_size(struct uart_8250_port *pt) | 2723 | static unsigned int serial8250_port_size(struct uart_8250_port *pt) |
| 2724 | { | 2724 | { |
| 2725 | if (pt->port.mapsize) | ||
| 2726 | return pt->port.mapsize; | ||
| 2725 | if (pt->port.iotype == UPIO_AU) { | 2727 | if (pt->port.iotype == UPIO_AU) { |
| 2726 | if (pt->port.type == PORT_RT2880) | 2728 | if (pt->port.type == PORT_RT2880) |
| 2727 | return 0x100; | 2729 | return 0x100; |
| @@ -3553,6 +3555,7 @@ int __init early_serial_setup(struct uart_port *port) | |||
| 3553 | p->iotype = port->iotype; | 3555 | p->iotype = port->iotype; |
| 3554 | p->flags = port->flags; | 3556 | p->flags = port->flags; |
| 3555 | p->mapbase = port->mapbase; | 3557 | p->mapbase = port->mapbase; |
| 3558 | p->mapsize = port->mapsize; | ||
| 3556 | p->private_data = port->private_data; | 3559 | p->private_data = port->private_data; |
| 3557 | p->type = port->type; | 3560 | p->type = port->type; |
| 3558 | p->line = port->line; | 3561 | p->line = port->line; |
| @@ -3807,6 +3810,7 @@ int serial8250_register_8250_port(struct uart_8250_port *up) | |||
| 3807 | uart->port.flags = up->port.flags | UPF_BOOT_AUTOCONF; | 3810 | uart->port.flags = up->port.flags | UPF_BOOT_AUTOCONF; |
| 3808 | uart->bugs = up->bugs; | 3811 | uart->bugs = up->bugs; |
| 3809 | uart->port.mapbase = up->port.mapbase; | 3812 | uart->port.mapbase = up->port.mapbase; |
| 3813 | uart->port.mapsize = up->port.mapsize; | ||
| 3810 | uart->port.private_data = up->port.private_data; | 3814 | uart->port.private_data = up->port.private_data; |
| 3811 | uart->port.fifosize = up->port.fifosize; | 3815 | uart->port.fifosize = up->port.fifosize; |
| 3812 | uart->tx_loadsz = up->tx_loadsz; | 3816 | uart->tx_loadsz = up->tx_loadsz; |
