summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-01-16 14:08:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 07:36:10 -0800
commitf5836a55dee705d47a16c32139c02721763ff699 (patch)
treeba4a16a75fd89f2655c922d92ae6a89c741c298b /drivers/tty/serial/8250
parent053fac36b1d9f76adde96a2f731965aaab3c632b (diff)
serial: 8250_dw: Set maxburst size
The default burst is often 1 byte which is not very optimal. The ideal burst size when using 16550A type port would be 1/2 of fifosize, but this does not work with all Designware implementations. Setting it to 1/4 fifosize. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index bfdaf8b2680..117bb8b0359 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -178,6 +178,7 @@ dw8250_acpi_walk_resource(struct acpi_resource *res, void *data)
slave->direction = DMA_MEM_TO_DEV;
slave->dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
slave->slave_id = fixed_dma->request_lines;
+ slave->dst_maxburst = port->tx_loadsz / 4;
dma->tx_chan_id = fixed_dma->channels;
dma->tx_param = &dma->tx_chan_id;
@@ -189,6 +190,7 @@ dw8250_acpi_walk_resource(struct acpi_resource *res, void *data)
slave->direction = DMA_DEV_TO_MEM;
slave->src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
slave->slave_id = fixed_dma->request_lines;
+ slave->src_maxburst = p->fifosize / 4;
dma->rx_chan_id = fixed_dma->channels;
dma->rx_param = &dma->rx_chan_id;
@@ -296,6 +298,8 @@ static int dw8250_probe(struct platform_device *pdev)
uart.port.serial_in = dw8250_serial_in;
uart.port.serial_out = dw8250_serial_out;
+ dw8250_setup_port(&uart);
+
if (pdev->dev.of_node) {
err = dw8250_probe_of(&uart.port);
if (err)
@@ -308,8 +312,6 @@ static int dw8250_probe(struct platform_device *pdev)
return -ENODEV;
}
- dw8250_setup_port(&uart);
-
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;