diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-14 01:17:38 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-31 00:10:26 -0400 |
commit | a485df4b4404379786c4bdd258bc528b2617449d (patch) | |
tree | 67244495fab89846568cf40d3b7c3a2bd011133e /drivers/tty | |
parent | 05f5799cbe5c9e2c03f604b3de5783cf4d726227 (diff) |
spi, serial: move to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves spi, serial drivers to use new enum
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Cox <alan@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index f5f6831b0a64..460ff7dbfd63 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
@@ -268,7 +268,7 @@ static void pl011_dma_probe_initcall(struct uart_amba_port *uap) | |||
268 | struct dma_slave_config tx_conf = { | 268 | struct dma_slave_config tx_conf = { |
269 | .dst_addr = uap->port.mapbase + UART01x_DR, | 269 | .dst_addr = uap->port.mapbase + UART01x_DR, |
270 | .dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE, | 270 | .dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE, |
271 | .direction = DMA_TO_DEVICE, | 271 | .direction = DMA_MEM_TO_DEV, |
272 | .dst_maxburst = uap->fifosize >> 1, | 272 | .dst_maxburst = uap->fifosize >> 1, |
273 | }; | 273 | }; |
274 | struct dma_chan *chan; | 274 | struct dma_chan *chan; |
@@ -301,7 +301,7 @@ static void pl011_dma_probe_initcall(struct uart_amba_port *uap) | |||
301 | struct dma_slave_config rx_conf = { | 301 | struct dma_slave_config rx_conf = { |
302 | .src_addr = uap->port.mapbase + UART01x_DR, | 302 | .src_addr = uap->port.mapbase + UART01x_DR, |
303 | .src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE, | 303 | .src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE, |
304 | .direction = DMA_FROM_DEVICE, | 304 | .direction = DMA_DEV_TO_MEM, |
305 | .src_maxburst = uap->fifosize >> 1, | 305 | .src_maxburst = uap->fifosize >> 1, |
306 | }; | 306 | }; |
307 | 307 | ||
@@ -480,7 +480,7 @@ static int pl011_dma_tx_refill(struct uart_amba_port *uap) | |||
480 | return -EBUSY; | 480 | return -EBUSY; |
481 | } | 481 | } |
482 | 482 | ||
483 | desc = dma_dev->device_prep_slave_sg(chan, &dmatx->sg, 1, DMA_TO_DEVICE, | 483 | desc = dma_dev->device_prep_slave_sg(chan, &dmatx->sg, 1, DMA_MEM_TO_DEV, |
484 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 484 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
485 | if (!desc) { | 485 | if (!desc) { |
486 | dma_unmap_sg(dma_dev->dev, &dmatx->sg, 1, DMA_TO_DEVICE); | 486 | dma_unmap_sg(dma_dev->dev, &dmatx->sg, 1, DMA_TO_DEVICE); |
@@ -676,7 +676,7 @@ static int pl011_dma_rx_trigger_dma(struct uart_amba_port *uap) | |||
676 | &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; | 676 | &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; |
677 | dma_dev = rxchan->device; | 677 | dma_dev = rxchan->device; |
678 | desc = rxchan->device->device_prep_slave_sg(rxchan, &sgbuf->sg, 1, | 678 | desc = rxchan->device->device_prep_slave_sg(rxchan, &sgbuf->sg, 1, |
679 | DMA_FROM_DEVICE, | 679 | DMA_DEV_TO_MEM, |
680 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 680 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
681 | /* | 681 | /* |
682 | * If the DMA engine is busy and cannot prepare a | 682 | * If the DMA engine is busy and cannot prepare a |
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index b46218d679e2..73201a11697a 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c | |||
@@ -747,7 +747,7 @@ static int dma_handle_rx(struct eg20t_port *priv) | |||
747 | sg_dma_address(sg) = priv->rx_buf_dma; | 747 | sg_dma_address(sg) = priv->rx_buf_dma; |
748 | 748 | ||
749 | desc = priv->chan_rx->device->device_prep_slave_sg(priv->chan_rx, | 749 | desc = priv->chan_rx->device->device_prep_slave_sg(priv->chan_rx, |
750 | sg, 1, DMA_FROM_DEVICE, | 750 | sg, 1, DMA_DEV_TO_MEM, |
751 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 751 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
752 | 752 | ||
753 | if (!desc) | 753 | if (!desc) |
@@ -906,7 +906,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) | |||
906 | } | 906 | } |
907 | 907 | ||
908 | desc = priv->chan_tx->device->device_prep_slave_sg(priv->chan_tx, | 908 | desc = priv->chan_tx->device->device_prep_slave_sg(priv->chan_tx, |
909 | priv->sg_tx_p, nent, DMA_TO_DEVICE, | 909 | priv->sg_tx_p, nent, DMA_MEM_TO_DEV, |
910 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 910 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
911 | if (!desc) { | 911 | if (!desc) { |
912 | dev_err(priv->port.dev, "%s:device_prep_slave_sg Failed\n", | 912 | dev_err(priv->port.dev, "%s:device_prep_slave_sg Failed\n", |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index dbd32a1286d3..3683a69b45ee 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1207,7 +1207,7 @@ static void sci_submit_rx(struct sci_port *s) | |||
1207 | struct dma_async_tx_descriptor *desc; | 1207 | struct dma_async_tx_descriptor *desc; |
1208 | 1208 | ||
1209 | desc = chan->device->device_prep_slave_sg(chan, | 1209 | desc = chan->device->device_prep_slave_sg(chan, |
1210 | sg, 1, DMA_FROM_DEVICE, DMA_PREP_INTERRUPT); | 1210 | sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT); |
1211 | 1211 | ||
1212 | if (desc) { | 1212 | if (desc) { |
1213 | s->desc_rx[i] = desc; | 1213 | s->desc_rx[i] = desc; |
@@ -1322,7 +1322,7 @@ static void work_fn_tx(struct work_struct *work) | |||
1322 | BUG_ON(!sg_dma_len(sg)); | 1322 | BUG_ON(!sg_dma_len(sg)); |
1323 | 1323 | ||
1324 | desc = chan->device->device_prep_slave_sg(chan, | 1324 | desc = chan->device->device_prep_slave_sg(chan, |
1325 | sg, s->sg_len_tx, DMA_TO_DEVICE, | 1325 | sg, s->sg_len_tx, DMA_MEM_TO_DEV, |
1326 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 1326 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
1327 | if (!desc) { | 1327 | if (!desc) { |
1328 | /* switch to PIO */ | 1328 | /* switch to PIO */ |