diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-06-18 19:49:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 19:46:04 -0400 |
commit | 5afbf098d171664695db2a7e828e8d96871a01e1 (patch) | |
tree | 99e46bb86d1cecd144612d82667ef87cc2c79115 | |
parent | fd8a11e100b463811f41266ea3880c830f3359ea (diff) |
spi_mpc83xx: add small delay after asserting chip-select line
This is needed for some underlaying GPIO controllers that may be a bit
slow, or if chip-select signal need some time to stabilize.
For what it's worth, we already have the similar delay for chip-select
de-assertion case.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/spi/spi_mpc83xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 4988230a7e0c..6e0232e65a38 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c | |||
@@ -383,8 +383,10 @@ static void mpc83xx_spi_work(struct work_struct *work) | |||
383 | break; | 383 | break; |
384 | } | 384 | } |
385 | 385 | ||
386 | if (cs_change) | 386 | if (cs_change) { |
387 | mpc83xx_spi_chipselect(spi, BITBANG_CS_ACTIVE); | 387 | mpc83xx_spi_chipselect(spi, BITBANG_CS_ACTIVE); |
388 | ndelay(nsecs); | ||
389 | } | ||
388 | cs_change = t->cs_change; | 390 | cs_change = t->cs_change; |
389 | if (t->len) | 391 | if (t->len) |
390 | status = mpc83xx_spi_bufs(spi, t); | 392 | status = mpc83xx_spi_bufs(spi, t); |