orion_spi: handle 88F6183 erratum
authorLennert Buytenhek <buytenh@wantstofly.org>
Thu, 16 Oct 2008 05:02:44 +0000 (22:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:38 +0000 (11:21 -0700)
Add support to orion_spi for the 88F6183 ARM SoC by adding code to work
around a 6183-specific erratum.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/orion_spi.c
include/linux/spi/orion_spi.h

index b872bfaf4bd2c0e4706c1551db8da94324622983..014becb7d53007b20099b9b9c84d0eb09d19e5dc 100644 (file)
@@ -364,6 +364,11 @@ static int orion_spi_setup(struct spi_device *spi)
                return -EINVAL;
        }
 
+       /* Fix ac timing if required.   */
+       if (orion_spi->spi_info->enable_clock_fix)
+               orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG,
+                                 (1 << 14));
+
        if (spi->bits_per_word == 0)
                spi->bits_per_word = 8;
 
index b4d9fa6f797cdd4653334315664a86a27ec081f1..decf6d8c77b7fa7d3a297653708566bb0bdf9d95 100644 (file)
@@ -11,6 +11,7 @@
 
 struct orion_spi_info {
        u32     tclk;           /* no <linux/clk.h> support yet */
+       u32     enable_clock_fix;
 };