[#6627] Blackfin SPI Bus driver chipselect behavior doesn't act spi conform
Submitted By: Michael Hennerich
Open Fixed In Release:
Found In Release:
ALL Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: Blackfin SPI Bus driver chipselect behavior doesn't act spi conform
Blackfin SPI Bus driver chipselect behavior doesn't act spi conform.
taken from spi.h:
* All SPI transfers start with the relevant chipselect active. Normally
* it stays selected until after the last transfer in a message. Drivers
* can affect the chipselect signal using cs_change.
* If the transfer isn't the last one in the message, this flag is
* used to make the chipselect briefly go inactive in the middle of the
* message. Toggling chipselect in this way may be needed to terminate
* a chip command, letting a single spi_message perform all of group of
* chip transactions together.
* (ii) When the transfer is the last one in the message, the chip may
* stay selected until the next transfer. On multi-device SPI busses
* with nothing blocking messages going to other devices, this is just
* a performance hint; starting a message to another device deselects
* this one. But in other cases, this can be used to ensure correctness.
* Some devices need protocol transactions to be built from a series of
* spi_message submissions, where the content of one message is determined
* by the results of previous messages and where the whole transaction
* ends when the chipselect goes intactive.
On Blackfin when the last transfer of a message sets the cs_change flag.
The chipselect is supposed to stay activated, while it doesn't behave that way
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index f706dba..2936aa1 100644
@@ -909,8 +909,8 @@ static void bfin_spi_pump_transfers(unsigned long data)
message->actual_length += drv_data->len_in_bytes;
/* Move to next transfer of this msg */
message->state = bfin_spi_next_transfer(drv_data);
- if (drv_data->cs_change)
- bfin_spi_cs_deactive(drv_data, chip);
+// if (drv_data->cs_change)
+// bfin_spi_cs_deactive(drv_data, chip);
/* Schedule next transfer tasklet */
--- Sonic Zhang 2011-06-21 06:07:21
File Name File Type File Size Posted By
No Files Were Found