Hi, I am converting a driver from ssp.c API to pxa2xx_spi. But when using PIO mode i am getting bogus rx data.
I did some tests, and it looks like CS is being deasserted before the IO is done. The following patch solved the issue for me. Please CC me on replies, im not subscribed to spi-devel. -- Daniel Ribeiro -- patch -- pxa2xx_spi: wait_rx_stall before deasserting CS on PIO mode Signed-off-by: Daniel Ribeiro <[EMAIL PROTECTED]> diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 0c452c4..4a9c34e 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c @@ -593,6 +593,10 @@ static void int_transfer_complete(struct driver_data *drv_d { void __iomem *reg = drv_data->ioaddr; + if (wait_ssp_rx_stall(drv_data->ioaddr) == 0) + dev_err(&drv_data->pdev->dev, + "interrupt_transfer: ssp rx stall failed\n"); + /* Stop SSP */ write_SSSR(drv_data->clear_sr, reg); write_SSCR1(read_SSCR1(reg) & ~drv_data->int_cr1, reg); ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general