tty: msm_serial: use dmaengine_prep_slave_sg()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Fri, 5 Apr 2024 06:08:22 +0000 (08:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2024 13:28:03 +0000 (15:28 +0200)
commitf8fef2fa419febbfed2d04f0518111565df2673d
treed3cff979b5fa693eaef08965e6681d0b1ca76b56
parent9054605ab8468936a514298211d9e9bb68bf24bd
tty: msm_serial: 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.

And in this case, switch from dma_map_single() to dma_map_sg() too. This
needs struct msm_dma changes. I split the rx and tx parts into an union.
TX is now struct scatterlist, RX remains the old good phys-virt-count
triple.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Link: https://lore.kernel.org/r/20240405060826.2521-12-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/msm_serial.c