aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-02-24 06:32:13 -0500
committerMark Brown <broonie@kernel.org>2015-02-24 09:43:34 -0500
commit1a18f9f753209977450c94dcd354dd4fa5370966 (patch)
treec3687b18629a9382a8bc56857c920043c5e7b3dc /drivers/spi
parent341c7dc7c074e80d7344e0d75e2b8918ffc982fb (diff)
spi: dw: always reprogram CTRL0
Instead of an additional reading from the register let's update it even if the value is kept the same. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-dw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 0e0c48b37b83..281121f00138 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -476,8 +476,7 @@ static void pump_transfers(unsigned long data)
476 if (dw_readw(dws, DW_SPI_CTRL0) != cr0 || cs_change || clk_div || imask) { 476 if (dw_readw(dws, DW_SPI_CTRL0) != cr0 || cs_change || clk_div || imask) {
477 spi_enable_chip(dws, 0); 477 spi_enable_chip(dws, 0);
478 478
479 if (dw_readw(dws, DW_SPI_CTRL0) != cr0) 479 dw_writew(dws, DW_SPI_CTRL0, cr0);
480 dw_writew(dws, DW_SPI_CTRL0, cr0);
481 480
482 spi_set_clk(dws, chip->clk_div); 481 spi_set_clk(dws, chip->clk_div);
483 spi_chip_sel(dws, spi, 1); 482 spi_chip_sel(dws, spi, 1);