summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-04-10 16:58:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 13:20:19 -0700
commitab19479aa1b9708110bc90ba5b6c03b013feaa46 (patch)
tree91fb1d87c3be7ddc89518336f137ba404afe87ea /drivers/tty
parente4fb3b88ebf21e6127ed0e91336752352ba0931e (diff)
downloadtalos-op-linux-ab19479aa1b9708110bc90ba5b6c03b013feaa46.tar.gz
talos-op-linux-ab19479aa1b9708110bc90ba5b6c03b013feaa46.zip
serial: 8250_dma: Provide default slave configuration parameters
Some slave channel parameters will be always the same. For example, direction for the Rx channel will always be DMA_DEV_TO_MEM and DMA_MEM_TO_DEV for Tx channel. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index fdb6139e8c17..7046769608d4 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -149,8 +149,14 @@ int serial8250_request_dma(struct uart_8250_port *p)
struct uart_8250_dma *dma = p->dma;
dma_cap_mask_t mask;
- dma->rxconf.src_addr = p->port.mapbase + UART_RX;
- dma->txconf.dst_addr = p->port.mapbase + UART_TX;
+ /* Default slave configuration parameters */
+ dma->rxconf.direction = DMA_DEV_TO_MEM;
+ dma->rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
+ dma->rxconf.src_addr = p->port.mapbase + UART_RX;
+
+ dma->txconf.direction = DMA_MEM_TO_DEV;
+ dma->txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
+ dma->txconf.dst_addr = p->port.mapbase + UART_TX;
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
OpenPOWER on IntegriCloud