Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35cc0b975057389548bfe5703d438fe0deb4807e
Commit:     35cc0b975057389548bfe5703d438fe0deb4807e
Parent:     32421daaf8236b0fd6e032f6b1dd8086ccae2a46
Author:     Anton Vorontsov <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 00:38:42 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 15:39:40 2007 -0700

    spi_mpc83xx: fix QE+LSB mode shifts
    
    spi_mpc83xx should use other shifts when running in QE+LSB mode.
    
    Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
    Acked-by: Kumar Gala <[EMAIL PROTECTED]>
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/spi/spi_mpc83xx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 18c475d..72812bb 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -237,6 +237,14 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, 
struct spi_transfer *t)
        } else
                return -EINVAL;
 
+       if (mpc83xx_spi->qe_mode && spi->mode & SPI_LSB_FIRST) {
+               mpc83xx_spi->tx_shift = 0;
+               if (bits_per_word <= 8)
+                       mpc83xx_spi->rx_shift = 8;
+               else
+                       mpc83xx_spi->rx_shift = 0;
+       }
+
        /* nsecs = (clock period)/2 */
        if (!hz)
                hz = spi->max_speed_hz;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to