Skip to content

Commit

Permalink
spi/bfin_spi: sync hardware state before reprogramming everything
Browse files Browse the repository at this point in the history
Sometimes under load, the Blackfin core is able to send SPI register
updates out before the controller is actually disabled.  So when we
go to reprogram the entire state (to switch to a different slave),
make sure we sync after disabling the controller.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Barry Song authored and Mike Frysinger committed Oct 18, 2010
1 parent b052fd0 commit 9677b0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ static void bfin_spi_restore_state(struct master_data *drv_data)
bfin_spi_disable(drv_data);
dev_dbg(&drv_data->pdev->dev, "restoring spi ctl state\n");

SSYNC();

/* Load the registers */
write_CTRL(drv_data, chip->ctl_reg);
write_BAUD(drv_data, chip->baud);
Expand Down

0 comments on commit 9677b0d

Please sign in to comment.