Commit 9054605a authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman

tty: 8250_omap: use dmaengine_prep_slave_sg()

This is a preparatory for the serial-to-kfifo switch. kfifo understands
only scatter-gatter approach, so switch to that.

No functional change intended, it's just dmaengine_prep_slave_single()
inline expanded.
Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20240405060826.2521-11-jirislaby@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8192fabb
...@@ -1140,6 +1140,7 @@ static int omap_8250_tx_dma(struct uart_8250_port *p) ...@@ -1140,6 +1140,7 @@ static int omap_8250_tx_dma(struct uart_8250_port *p)
struct omap8250_priv *priv = p->port.private_data; struct omap8250_priv *priv = p->port.private_data;
struct circ_buf *xmit = &p->port.state->xmit; struct circ_buf *xmit = &p->port.state->xmit;
struct dma_async_tx_descriptor *desc; struct dma_async_tx_descriptor *desc;
struct scatterlist sg;
unsigned int skip_byte = 0; unsigned int skip_byte = 0;
int ret; int ret;
...@@ -1191,9 +1192,11 @@ static int omap_8250_tx_dma(struct uart_8250_port *p) ...@@ -1191,9 +1192,11 @@ static int omap_8250_tx_dma(struct uart_8250_port *p)
skip_byte = 1; skip_byte = 1;
} }
desc = dmaengine_prep_slave_single(dma->txchan, sg_init_table(&sg, 1);
dma->tx_addr + xmit->tail + skip_byte, sg_dma_address(&sg) = dma->tx_addr + xmit->tail + skip_byte;
dma->tx_size - skip_byte, DMA_MEM_TO_DEV, sg_dma_len(&sg) = dma->tx_size - skip_byte;
desc = dmaengine_prep_slave_sg(dma->txchan, &sg, 1, DMA_MEM_TO_DEV,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK); DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc) { if (!desc) {
ret = -EBUSY; ret = -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment