From da172a2344f61b53c8dff33c80c64978b7217c32 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 3 Aug 2016 18:31:07 +0300 Subject: [PATCH 1/1] TBD: serial: 8250_dma: acquire both DMA channels Intel Quark seems has no request lines, but rather channel IDs dedicated for transfer. Needs to be investigated and fixed properly. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dma.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c index 4b599e0..0d7895f 100644 --- a/drivers/tty/serial/8250/8250_dma.c +++ b/drivers/tty/serial/8250/8250_dma.c @@ -179,9 +179,6 @@ int serial8250_request_dma(struct uart_8250_port *p) dma_cap_set(DMA_SLAVE, mask); /* Get a channel for RX */ - if (p->port.quirks & UPQ_NO_DMA_RX) - goto skip_rx; - dma->rxchan = dma_request_slave_channel_compat(mask, dma->fn, dma->rx_param, p->port.dev, "rx"); @@ -213,11 +210,7 @@ int serial8250_request_dma(struct uart_8250_port *p) goto release_rx; } -skip_rx: /* Get a channel for TX */ - if (p->port.quirks & UPQ_NO_DMA_TX) - goto skip_tx; - dma->txchan = dma_request_slave_channel_compat(mask, dma->fn, dma->tx_param, p->port.dev, "tx"); @@ -247,7 +240,6 @@ skip_rx: goto err; } -skip_tx: dev_dbg_ratelimited(p->port.dev, "got both dma channels\n"); return 0; @@ -255,8 +247,6 @@ err: dma_release_channel(dma->txchan); no_txchan: p->port.quirks |= UPQ_NO_DMA_TX; - if (p->port.quirks & UPQ_NO_DMA_RX) - goto no_rxchan; dma_free_coherent(dma->rxchan->device->dev, dma->rx_size, dma->rx_buf, dma->rx_addr); release_rx: @@ -275,20 +265,13 @@ void serial8250_release_dma(struct uart_8250_port *p) return; /* Release RX resources */ - if (p->port.quirks & UPQ_NO_DMA_RX) - goto skip_rx; - dmaengine_terminate_sync(dma->rxchan); dma_free_coherent(dma->rxchan->device->dev, dma->rx_size, dma->rx_buf, dma->rx_addr); dma_release_channel(dma->rxchan); dma->rxchan = NULL; -skip_rx: /* Release TX resources */ - if (p->port.quirks & UPQ_NO_DMA_TX) - goto skip_tx; - dmaengine_terminate_sync(dma->txchan); dma_unmap_single(dma->txchan->device->dev, dma->tx_addr, UART_XMIT_SIZE, DMA_TO_DEVICE); @@ -296,7 +279,6 @@ skip_rx: dma->txchan = NULL; dma->tx_running = 0; -skip_tx: dev_dbg_ratelimited(p->port.dev, "dma channels released\n"); } EXPORT_SYMBOL_GPL(serial8250_release_dma); -- 2.8.1