Skip to content

Commit

Permalink
spi: dw: always reprogram CTRL0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Mark Brown committed Feb 24, 2015
1 parent 341c7dc commit 1a18f9f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@ static void pump_transfers(unsigned long data)
if (dw_readw(dws, DW_SPI_CTRL0) != cr0 || cs_change || clk_div || imask) {
spi_enable_chip(dws, 0);

if (dw_readw(dws, DW_SPI_CTRL0) != cr0)
dw_writew(dws, DW_SPI_CTRL0, cr0);
dw_writew(dws, DW_SPI_CTRL0, cr0);

spi_set_clk(dws, chip->clk_div);
spi_chip_sel(dws, spi, 1);
Expand Down

0 comments on commit 1a18f9f

Please sign in to comment.