]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/spi/mpc8xxx_spi.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / drivers / spi / mpc8xxx_spi.c
index c4b36f06c05cf037b6daaeb2903f7dc8a5b7e7b4..4e46041dfff5df76c98561d161daa4a13790acd5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2006 Ben Warren, Qstreams Networks Inc.
- * With help from the common/soft_spi and cpu/mpc8260 drivers
+ * With help from the common/soft_spi and arch/powerpc/cpu/mpc8260 drivers
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -124,6 +124,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                 * len > 16               0
                 */
 
+               spi->mode &= ~SPI_MODE_EN;
+
                if (bitlen <= 16) {
                        if (bitlen <= 4)
                                spi->mode = (spi->mode & 0xff0fffff) |
@@ -138,6 +140,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                        dout += 4;
                }
 
+               spi->mode |= SPI_MODE_EN;
+
                spi->tx = tmpdout;      /* Write the data out */
                debug("*** spi_xfer: ... %08x written\n", tmpdout);