aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 15:34:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 15:34:54 -0400
commitb5b131c7473e17275debcdf1c226f452dc3876ed (patch)
treea272e947c38213d4ee989bb3f863a8091d50426b /drivers/spi
parentc7eec380e85a427983782df744f0fb745d867170 (diff)
parent896e041e8e8efb34520d033a693ef25391f9c9f0 (diff)
Merge tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul: "This is smallish update with minor changes to core and new driver and usual updates. Nothing super exciting here.. - We have made slave address as physical to enable driver to do the mapping. - We now expose the maxburst for slave dma as new capability so clients can know this and program accordingly - addition of device synchronize callbacks on omap and edma. - pl330 updates to support DMAFLUSHP for Rockchip platforms. - Updates and improved sg handling in Xilinx VDMA driver. - New hidma qualcomm dma driver, though some bits are still in progress" * tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (40 commits) dmaengine: IOATDMA: revise channel reset workaround on CB3.3 platforms dmaengine: add Qualcomm Technologies HIDMA channel driver dmaengine: add Qualcomm Technologies HIDMA management driver dmaengine: hidma: Add Device Tree binding dmaengine: qcom_bam_dma: move to qcom directory dmaengine: tegra: Move of_device_id table near to its user dmaengine: xilinx_vdma: Remove unnecessary variable initializations dmaengine: sirf: use __maybe_unused to hide pm functions dmaengine: rcar-dmac: clear pertinence number of channels dmaengine: sh: shdmac: don't open code of_device_get_match_data() dmaengine: tegra: don't open code of_device_get_match_data() dmaengine: qcom_bam_dma: Make driver work for BE dmaengine: sun4i: support module autoloading dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo dmaengine: xilinx_vdma: Use readl_poll_timeout instead of do while loop's dmaengine: xilinx_vdma: Simplify spin lock handling dmaengine: xilinx_vdma: Fix issues with non-parking mode dmaengine: xilinx_vdma: Improve SG engine handling dmaengine: pl330: fix to support the burst mode dmaengine: make slave address physical ...
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-rockchip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 26e2688c104e..8f50a4020f6f 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -191,6 +191,7 @@ struct rockchip_spi {
191 struct sg_table rx_sg; 191 struct sg_table rx_sg;
192 struct rockchip_spi_dma_data dma_rx; 192 struct rockchip_spi_dma_data dma_rx;
193 struct rockchip_spi_dma_data dma_tx; 193 struct rockchip_spi_dma_data dma_tx;
194 struct dma_slave_caps dma_caps;
194}; 195};
195 196
196static inline void spi_enable_chip(struct rockchip_spi *rs, int enable) 197static inline void spi_enable_chip(struct rockchip_spi *rs, int enable)
@@ -446,7 +447,10 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
446 rxconf.direction = rs->dma_rx.direction; 447 rxconf.direction = rs->dma_rx.direction;
447 rxconf.src_addr = rs->dma_rx.addr; 448 rxconf.src_addr = rs->dma_rx.addr;
448 rxconf.src_addr_width = rs->n_bytes; 449 rxconf.src_addr_width = rs->n_bytes;
449 rxconf.src_maxburst = rs->n_bytes; 450 if (rs->dma_caps.max_burst > 4)
451 rxconf.src_maxburst = 4;
452 else
453 rxconf.src_maxburst = 1;
450 dmaengine_slave_config(rs->dma_rx.ch, &rxconf); 454 dmaengine_slave_config(rs->dma_rx.ch, &rxconf);
451 455
452 rxdesc = dmaengine_prep_slave_sg( 456 rxdesc = dmaengine_prep_slave_sg(
@@ -465,7 +469,10 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
465 txconf.direction = rs->dma_tx.direction; 469 txconf.direction = rs->dma_tx.direction;
466 txconf.dst_addr = rs->dma_tx.addr; 470 txconf.dst_addr = rs->dma_tx.addr;
467 txconf.dst_addr_width = rs->n_bytes; 471 txconf.dst_addr_width = rs->n_bytes;
468 txconf.dst_maxburst = rs->n_bytes; 472 if (rs->dma_caps.max_burst > 4)
473 txconf.dst_maxburst = 4;
474 else
475 txconf.dst_maxburst = 1;
469 dmaengine_slave_config(rs->dma_tx.ch, &txconf); 476 dmaengine_slave_config(rs->dma_tx.ch, &txconf);
470 477
471 txdesc = dmaengine_prep_slave_sg( 478 txdesc = dmaengine_prep_slave_sg(
@@ -743,6 +750,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
743 } 750 }
744 751
745 if (rs->dma_tx.ch && rs->dma_rx.ch) { 752 if (rs->dma_tx.ch && rs->dma_rx.ch) {
753 dma_get_slave_caps(rs->dma_rx.ch, &(rs->dma_caps));
746 rs->dma_tx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_TXDR); 754 rs->dma_tx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_TXDR);
747 rs->dma_rx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_RXDR); 755 rs->dma_rx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_RXDR);
748 rs->dma_tx.direction = DMA_MEM_TO_DEV; 756 rs->dma_tx.direction = DMA_MEM_TO_DEV;