aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/au1550_spi.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-10-13 14:22:35 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:52:55 -0500
commit963accbc82a0912b39de39d59e2fd6741db3aa4b (patch)
tree4ea340b0261ab19f3f0776f47e4fab8708934b5b /drivers/spi/au1550_spi.c
parentea071cc705e8bfba0c8bf84be8d4f9f4e9da6962 (diff)
MIPS: Alchemy: change dbdma to accept physical memory addresses
DMA can only be done from physical addresses; move the "virt_to_phys" source/destination buffer address translation from the dbdma queueing functions (since the hardware can only DMA to/from physical addresses) to their respective users. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/spi/au1550_spi.c')
-rw-r--r--drivers/spi/au1550_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index 22f7d7294787..ba8ac4f599d3 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -412,12 +412,12 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t)
412 } 412 }
413 413
414 /* put buffers on the ring */ 414 /* put buffers on the ring */
415 res = au1xxx_dbdma_put_dest(hw->dma_rx_ch, hw->rx, 415 res = au1xxx_dbdma_put_dest(hw->dma_rx_ch, virt_to_phys(hw->rx),
416 t->len, DDMA_FLAGS_IE); 416 t->len, DDMA_FLAGS_IE);
417 if (!res) 417 if (!res)
418 dev_err(hw->dev, "rx dma put dest error\n"); 418 dev_err(hw->dev, "rx dma put dest error\n");
419 419
420 res = au1xxx_dbdma_put_source(hw->dma_tx_ch, (void *)hw->tx, 420 res = au1xxx_dbdma_put_source(hw->dma_tx_ch, virt_to_phys(hw->tx),
421 t->len, DDMA_FLAGS_IE); 421 t->len, DDMA_FLAGS_IE);
422 if (!res) 422 if (!res)
423 dev_err(hw->dev, "tx dma put source error\n"); 423 dev_err(hw->dev, "tx dma put source error\n");