mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: dw: Add 32 bpw support to DW DMA Controller
@ 2023-03-20  5:57 Joy Chakraborty
  2023-03-20 14:04 ` Serge Semin
  0 siblings, 1 reply; 3+ messages in thread
From: Joy Chakraborty @ 2023-03-20  5:57 UTC (permalink / raw)
  To: Serge Semin, Mark Brown
  Cc: linux-spi, linux-kernel, manugautam, rohitner, Joy Chakraborty

If DW Controller is capable of 32 bits per word support then SW or DMA
controller has to write 32bit or 4byte data to the FIFO at a time.

This Patch adds support for AxSize = 4 bytes configuration from dw dma
driver if n_bytes i.e. number of bytes per write to fifo is 4.

Signed-off-by: Joy Chakraborty <joychakr@google.com>
---
 drivers/spi/spi-dw-dma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c
index ababb910b391..7d06ecfdebe1 100644
--- a/drivers/spi/spi-dw-dma.c
+++ b/drivers/spi/spi-dw-dma.c
@@ -212,6 +212,8 @@ static enum dma_slave_buswidth dw_spi_dma_convert_width(u8 n_bytes)
 		return DMA_SLAVE_BUSWIDTH_1_BYTE;
 	else if (n_bytes == 2)
 		return DMA_SLAVE_BUSWIDTH_2_BYTES;
+	else if (n_bytes == 4)
+		return DMA_SLAVE_BUSWIDTH_4_BYTES;
 
 	return DMA_SLAVE_BUSWIDTH_UNDEFINED;
 }
-- 
2.40.0.rc1.284.g88254d51c5-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-21 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20  5:57 [PATCH] spi: dw: Add 32 bpw support to DW DMA Controller Joy Chakraborty
2023-03-20 14:04 ` Serge Semin
2023-03-21 11:52   ` Joy Chakraborty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®