diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2013-04-10 09:58:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 16:20:19 -0400 |
commit | ab19479aa1b9708110bc90ba5b6c03b013feaa46 (patch) | |
tree | 91fb1d87c3be7ddc89518336f137ba404afe87ea /drivers/tty/serial/8250 | |
parent | e4fb3b88ebf21e6127ed0e91336752352ba0931e (diff) |
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/serial/8250')
-rw-r--r-- | drivers/tty/serial/8250/8250_dma.c | 10 |
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) | |||
149 | struct uart_8250_dma *dma = p->dma; | 149 | struct uart_8250_dma *dma = p->dma; |
150 | dma_cap_mask_t mask; | 150 | dma_cap_mask_t mask; |
151 | 151 | ||
152 | dma->rxconf.src_addr = p->port.mapbase + UART_RX; | 152 | /* Default slave configuration parameters */ |
153 | dma->txconf.dst_addr = p->port.mapbase + UART_TX; | 153 | dma->rxconf.direction = DMA_DEV_TO_MEM; |
154 | dma->rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; | ||
155 | dma->rxconf.src_addr = p->port.mapbase + UART_RX; | ||
156 | |||
157 | dma->txconf.direction = DMA_MEM_TO_DEV; | ||
158 | dma->txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; | ||
159 | dma->txconf.dst_addr = p->port.mapbase + UART_TX; | ||
154 | 160 | ||
155 | dma_cap_zero(mask); | 161 | dma_cap_zero(mask); |
156 | dma_cap_set(DMA_SLAVE, mask); | 162 | dma_cap_set(DMA_SLAVE, mask); |