mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
spi: dw: Let the DMAC set the transfer widths
SPI transfers are of defined length, unlike some UART traffic, so it is safe to let the DMA controller choose a suitable memory width. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
@@ -330,7 +330,6 @@ static int dw_spi_dma_config_tx(struct dw_spi *dws)
|
|||||||
txconf.direction = DMA_MEM_TO_DEV;
|
txconf.direction = DMA_MEM_TO_DEV;
|
||||||
txconf.dst_addr = dws->dma_addr;
|
txconf.dst_addr = dws->dma_addr;
|
||||||
txconf.dst_maxburst = dws->txburst;
|
txconf.dst_maxburst = dws->txburst;
|
||||||
txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
|
||||||
txconf.dst_addr_width = dw_spi_dma_convert_width(dws->n_bytes);
|
txconf.dst_addr_width = dw_spi_dma_convert_width(dws->n_bytes);
|
||||||
txconf.device_fc = false;
|
txconf.device_fc = false;
|
||||||
|
|
||||||
@@ -431,7 +430,6 @@ static int dw_spi_dma_config_rx(struct dw_spi *dws)
|
|||||||
rxconf.direction = DMA_DEV_TO_MEM;
|
rxconf.direction = DMA_DEV_TO_MEM;
|
||||||
rxconf.src_addr = dws->dma_addr;
|
rxconf.src_addr = dws->dma_addr;
|
||||||
rxconf.src_maxburst = dws->rxburst;
|
rxconf.src_maxburst = dws->rxburst;
|
||||||
rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
|
||||||
rxconf.src_addr_width = dw_spi_dma_convert_width(dws->n_bytes);
|
rxconf.src_addr_width = dw_spi_dma_convert_width(dws->n_bytes);
|
||||||
rxconf.device_fc = false;
|
rxconf.device_fc = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user