summaryrefslogtreecommitdiff
path: root/drivers/spi/spi_mpc8xxx.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-10-13 07:38:02 +0400
committerGrant Likely <grant.likely@secretlab.ca>2010-10-13 07:38:02 +0400
commit492c032beccd53f807811b6c14909630d409dd8c (patch)
tree208550c6ccecb8f1b4f85edb91702ca2bdef855e /drivers/spi/spi_mpc8xxx.c
parentf9d629c737cb6687216a0c540b5466a4bd8b070a (diff)
parentcb655d0f3d57c23db51b981648e452988c0223f9 (diff)
downloadlinux-492c032beccd53f807811b6c14909630d409dd8c.tar.xz
Merge commit 'v2.6.36-rc7' into spi/next
Diffstat (limited to 'drivers/spi/spi_mpc8xxx.c')
-rw-r--r--drivers/spi/spi_mpc8xxx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index d31b57f7baaf..1dd86b835cd8 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -408,11 +408,17 @@ static void mpc8xxx_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi)
xfer_ofs = mspi->xfer_in_progress->len - mspi->count;
- out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma + xfer_ofs);
+ if (mspi->rx_dma == mspi->dma_dummy_rx)
+ out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma);
+ else
+ out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma + xfer_ofs);
out_be16(&rx_bd->cbd_datlen, 0);
out_be16(&rx_bd->cbd_sc, BD_SC_EMPTY | BD_SC_INTRPT | BD_SC_WRAP);
- out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma + xfer_ofs);
+ if (mspi->tx_dma == mspi->dma_dummy_tx)
+ out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma);
+ else
+ out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma + xfer_ofs);
out_be16(&tx_bd->cbd_datlen, xfer_len);
out_be16(&tx_bd->cbd_sc, BD_SC_READY | BD_SC_INTRPT | BD_SC_WRAP |
BD_SC_LAST);