@@ -133,10 +133,10 @@ static bool mid_spi_can_dma(struct spi_controller *master,
133
133
return xfer -> len > dws -> fifo_len ;
134
134
}
135
135
136
- static enum dma_slave_buswidth convert_dma_width (u32 dma_width ) {
137
- if (dma_width == 1 )
136
+ static enum dma_slave_buswidth convert_dma_width (u8 n_bytes ) {
137
+ if (n_bytes == 1 )
138
138
return DMA_SLAVE_BUSWIDTH_1_BYTE ;
139
- else if (dma_width == 2 )
139
+ else if (n_bytes == 2 )
140
140
return DMA_SLAVE_BUSWIDTH_2_BYTES ;
141
141
142
142
return DMA_SLAVE_BUSWIDTH_UNDEFINED ;
@@ -172,7 +172,7 @@ static struct dma_async_tx_descriptor *dw_spi_dma_prepare_tx(struct dw_spi *dws,
172
172
txconf .dst_addr = dws -> dma_addr ;
173
173
txconf .dst_maxburst = 16 ;
174
174
txconf .src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES ;
175
- txconf .dst_addr_width = convert_dma_width (dws -> dma_width );
175
+ txconf .dst_addr_width = convert_dma_width (dws -> n_bytes );
176
176
txconf .device_fc = false;
177
177
178
178
dmaengine_slave_config (dws -> txchan , & txconf );
@@ -221,7 +221,7 @@ static struct dma_async_tx_descriptor *dw_spi_dma_prepare_rx(struct dw_spi *dws,
221
221
rxconf .src_addr = dws -> dma_addr ;
222
222
rxconf .src_maxburst = 16 ;
223
223
rxconf .dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES ;
224
- rxconf .src_addr_width = convert_dma_width (dws -> dma_width );
224
+ rxconf .src_addr_width = convert_dma_width (dws -> n_bytes );
225
225
rxconf .device_fc = false;
226
226
227
227
dmaengine_slave_config (dws -> rxchan , & rxconf );
0 commit comments