aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2009-11-29 22:49:41 -0500
committerMike Frysinger <vapier@gentoo.org>2010-10-18 02:49:37 -0400
commit9677b0de10433d31e05864dfb4bf33d0c27f752a (patch)
treea2689c90aa902b1cb6c0a3fd0345a9fd117930b1 /drivers/spi
parentb052fd0a44354c655eb98fd715ef52857631dfef (diff)
spi/bfin_spi: sync hardware state before reprogramming everything
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_bfin5xx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index c23ac3b90533..54f9dbbc52e9 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -247,6 +247,8 @@ static void bfin_spi_restore_state(struct master_data *drv_data)
247 bfin_spi_disable(drv_data); 247 bfin_spi_disable(drv_data);
248 dev_dbg(&drv_data->pdev->dev, "restoring spi ctl state\n"); 248 dev_dbg(&drv_data->pdev->dev, "restoring spi ctl state\n");
249 249
250 SSYNC();
251
250 /* Load the registers */ 252 /* Load the registers */
251 write_CTRL(drv_data, chip->ctl_reg); 253 write_CTRL(drv_data, chip->ctl_reg);
252 write_BAUD(drv_data, chip->baud); 254 write_BAUD(drv_data, chip->baud);