From: Ben Dooks <[EMAIL PROTECTED]>

The SPI core now expects num_chipselect to be set correctly as
due to added checks on the chip being selected before an
transfer is allowed. This patch adds a num_cs field to the
platform data which needs to be set correctly before adding
the SPI platform device.

Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: David Brownell <[EMAIL PROTECTED]>
---
Matching $TITLE this time...


 drivers/spi/spi_s3c24xx.c          |    4 ++++
 include/asm-arm/arch-s3c2410/spi.h |    1 +
 2 files changed, 5 insertions(+)

--- at91.orig/drivers/spi/spi_s3c24xx.c 2008-04-15 10:30:26.000000000 -0700
+++ at91/drivers/spi/spi_s3c24xx.c      2008-04-15 10:30:28.000000000 -0700
@@ -263,6 +263,10 @@ static int __init s3c24xx_spi_probe(stru
        platform_set_drvdata(pdev, hw);
        init_completion(&hw->done);
 
+       /* setup the master state. */
+
+       master->num_chipselect = hw->pdata->num_cs;
+
        /* setup the state for the bitbang driver */
 
        hw->bitbang.master         = hw->master;
--- at91.orig/include/asm-arm/arch-s3c2410/spi.h        2008-04-15 
10:30:26.000000000 -0700
+++ at91/include/asm-arm/arch-s3c2410/spi.h     2008-04-15 10:30:28.000000000 
-0700
@@ -15,6 +15,7 @@
 
 struct s3c2410_spi_info {
        unsigned long            pin_cs;        /* simple gpio cs */
+       unsigned int             num_cs;        /* total chipselects */
 
        void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to