From: Barry Song Date: Mon, 30 Nov 2009 03:49:41 +0000 (+0000) Subject: spi/bfin_spi: sync hardware state before reprogramming everything X-Git-Tag: firefly_0821_release~7613^2~3710^2~2^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9677b0de10433d31e05864dfb4bf33d0c27f752a;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mike Frysinger --- 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) 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);