aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-04 21:02:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-04 21:02:25 -0400
commitfba9569924e06da076cb2ad12474bbd82d69f54d (patch)
treef0b7d9c82f8dd90f0dc757a4c00afc0872fc1484 /drivers/tty
parent3d0a8d10cfb4cc3d1877c29a866ee7d8a46aa2fa (diff)
parent4598fc2c94b68740e0269db03c98a1e7ad5af773 (diff)
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (63 commits) dmaengine: mid_dma: mask_peripheral_interrupt only when dmac is idle dmaengine/ep93xx_dma: add module.h include pch_dma: Reduce wasting memory pch_dma: Fix suspend issue dma/timberdale: free_irq() on an error path dma: shdma: transfer based runtime PM dmaengine: shdma: protect against the IRQ handler dmaengine i.MX DMA/SDMA: add missing include of linux/module.h dmaengine: delete redundant chan_id and chancnt initialization in dma drivers dmaengine/amba-pl08x: Check txd->llis_va before freeing dma_pool dmaengine/amba-pl08x: Add support for sg len greater than one for slave transfers serial: sh-sci: don't filter on DMA device, use only channel ID ARM: SAMSUNG: Remove Samsung specific enum type for dma direction ASoC: Samsung: Update DMA interface spi/s3c64xx: Merge dma control code spi/s3c64xx: Add support DMA engine API ARM: SAMSUNG: Remove S3C-PL330-DMA driver ARM: S5P64X0: Use generic DMA PL330 driver ARM: S5PC100: Use generic DMA PL330 driver ARM: S5PV210: Use generic DMA PL330 driver ... Fix up fairly trivial conflicts in - arch/arm/mach-exynos4/{Kconfig,clock.c} - arch/arm/mach-s5p64x0/dma.c
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 9871c57b348e..1945c70539c2 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1446,12 +1446,8 @@ static bool filter(struct dma_chan *chan, void *slave)
1446 dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__, 1446 dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__,
1447 param->slave_id); 1447 param->slave_id);
1448 1448
1449 if (param->dma_dev == chan->device->dev) { 1449 chan->private = param;
1450 chan->private = param; 1450 return true;
1451 return true;
1452 } else {
1453 return false;
1454 }
1455} 1451}
1456 1452
1457static void rx_timer_fn(unsigned long arg) 1453static void rx_timer_fn(unsigned long arg)
@@ -1477,10 +1473,10 @@ static void sci_request_dma(struct uart_port *port)
1477 dma_cap_mask_t mask; 1473 dma_cap_mask_t mask;
1478 int nent; 1474 int nent;
1479 1475
1480 dev_dbg(port->dev, "%s: port %d DMA %p\n", __func__, 1476 dev_dbg(port->dev, "%s: port %d\n", __func__,
1481 port->line, s->cfg->dma_dev); 1477 port->line);
1482 1478
1483 if (!s->cfg->dma_dev) 1479 if (s->cfg->dma_slave_tx <= 0 || s->cfg->dma_slave_rx <= 0)
1484 return; 1480 return;
1485 1481
1486 dma_cap_zero(mask); 1482 dma_cap_zero(mask);
@@ -1490,7 +1486,6 @@ static void sci_request_dma(struct uart_port *port)
1490 1486
1491 /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_TX */ 1487 /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_TX */
1492 param->slave_id = s->cfg->dma_slave_tx; 1488 param->slave_id = s->cfg->dma_slave_tx;
1493 param->dma_dev = s->cfg->dma_dev;
1494 1489
1495 s->cookie_tx = -EINVAL; 1490 s->cookie_tx = -EINVAL;
1496 chan = dma_request_channel(mask, filter, param); 1491 chan = dma_request_channel(mask, filter, param);
@@ -1519,7 +1514,6 @@ static void sci_request_dma(struct uart_port *port)
1519 1514
1520 /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_RX */ 1515 /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_RX */
1521 param->slave_id = s->cfg->dma_slave_rx; 1516 param->slave_id = s->cfg->dma_slave_rx;
1522 param->dma_dev = s->cfg->dma_dev;
1523 1517
1524 chan = dma_request_channel(mask, filter, param); 1518 chan = dma_request_channel(mask, filter, param);
1525 dev_dbg(port->dev, "%s: RX: got channel %p\n", __func__, chan); 1519 dev_dbg(port->dev, "%s: RX: got channel %p\n", __func__, chan);
@@ -1564,9 +1558,6 @@ static void sci_free_dma(struct uart_port *port)
1564{ 1558{
1565 struct sci_port *s = to_sci_port(port); 1559 struct sci_port *s = to_sci_port(port);
1566 1560
1567 if (!s->cfg->dma_dev)
1568 return;
1569
1570 if (s->chan_tx) 1561 if (s->chan_tx)
1571 sci_tx_dma_release(s, false); 1562 sci_tx_dma_release(s, false);
1572 if (s->chan_rx) 1563 if (s->chan_rx)
@@ -1981,9 +1972,9 @@ static int __devinit sci_init_single(struct platform_device *dev,
1981 port->serial_in = sci_serial_in; 1972 port->serial_in = sci_serial_in;
1982 port->serial_out = sci_serial_out; 1973 port->serial_out = sci_serial_out;
1983 1974
1984 if (p->dma_dev) 1975 if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0)
1985 dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n", 1976 dev_dbg(port->dev, "DMA tx %d, rx %d\n",
1986 p->dma_dev, p->dma_slave_tx, p->dma_slave_rx); 1977 p->dma_slave_tx, p->dma_slave_rx);
1987 1978
1988 return 0; 1979 return 0;
1989} 1980}