Merge tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
[firefly-linux-kernel-4.4.55.git] / drivers / spi / spi-fsl-cpm.c
index c5dd20beee2292880652e1744a3ed3fa99f51e1c..e85ab1cb17a24a4decb61d28fc592a82f5b314d8 100644 (file)
@@ -56,12 +56,15 @@ void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi)
                qe_issue_cmd(QE_INIT_TX_RX, mspi->subblock,
                             QE_CR_PROTOCOL_UNSPECIFIED, 0);
        } else {
-               cpm_command(CPM_SPI_CMD, CPM_CR_INIT_TRX);
                if (mspi->flags & SPI_CPM1) {
+                       out_be32(&mspi->pram->rstate, 0);
                        out_be16(&mspi->pram->rbptr,
                                 in_be16(&mspi->pram->rbase));
+                       out_be32(&mspi->pram->tstate, 0);
                        out_be16(&mspi->pram->tbptr,
                                 in_be16(&mspi->pram->tbase));
+               } else {
+                       cpm_command(CPM_SPI_CMD, CPM_CR_INIT_TRX);
                }
        }
 }