Skip to content

Commit 31a5fae

Browse files
Hiromitsu Yamasakibroonie
authored andcommitted
spi: sh-msiof: Fix handling of write value for SISTR register
This patch changes writing to the SISTR register according to the H/W user's manual. The TDREQ bit and RDREQ bits of SISTR are read-only, and must be written their initial values of zero. Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com> [geert: reword] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
1 parent ffa69d6 commit 31a5fae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/spi/spi-sh-msiof.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,
397397

398398
static void sh_msiof_reset_str(struct sh_msiof_spi_priv *p)
399399
{
400-
sh_msiof_write(p, STR, sh_msiof_read(p, STR));
400+
sh_msiof_write(p, STR,
401+
sh_msiof_read(p, STR) & ~(STR_TDREQ | STR_RDREQ));
401402
}
402403

403404
static void sh_msiof_spi_write_fifo_8(struct sh_msiof_spi_priv *p,

0 commit comments

Comments
 (0)