Explorar o código

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>
Barry Song %!s(int64=15) %!d(string=hai) anos
pai
achega
9677b0de10
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/spi/spi_bfin5xx.c

+ 2 - 0
drivers/spi/spi_bfin5xx.c

@@ -247,6 +247,8 @@ static void bfin_spi_restore_state(struct master_data *drv_data)
 	bfin_spi_disable(drv_data);
 	bfin_spi_disable(drv_data);
 	dev_dbg(&drv_data->pdev->dev, "restoring spi ctl state\n");
 	dev_dbg(&drv_data->pdev->dev, "restoring spi ctl state\n");
 
 
+	SSYNC();
+
 	/* Load the registers */
 	/* Load the registers */
 	write_CTRL(drv_data, chip->ctl_reg);
 	write_CTRL(drv_data, chip->ctl_reg);
 	write_BAUD(drv_data, chip->baud);
 	write_BAUD(drv_data, chip->baud);