提交 e4fb3b88 编写于 作者: H Heikki Krogerus 提交者: Greg Kroah-Hartman

serial: 8250_dma: Use dmaengine helpers to get the slave channels

The helper functions in dmaengine API allow the drivers to
request slave channels without the filter parameters. They
will attempt to extract the needed DMA client information
from DT or ACPI, but if such information is not available
the filter parameters can still be used.
Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 75df022b
......@@ -156,14 +156,18 @@ int serial8250_request_dma(struct uart_8250_port *p)
dma_cap_set(DMA_SLAVE, mask);
/* Get a channel for RX */
dma->rxchan = dma_request_channel(mask, dma->fn, dma->rx_param);
dma->rxchan = dma_request_slave_channel_compat(mask,
dma->fn, dma->rx_param,
p->port.dev, "rx");
if (!dma->rxchan)
return -ENODEV;
dmaengine_slave_config(dma->rxchan, &dma->rxconf);
/* Get a channel for TX */
dma->txchan = dma_request_channel(mask, dma->fn, dma->tx_param);
dma->txchan = dma_request_slave_channel_compat(mask,
dma->fn, dma->tx_param,
p->port.dev, "tx");
if (!dma->txchan) {
dma_release_channel(dma->rxchan);
return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册