Skip to content

Commit acedbff

Browse files
geertubroonie
authored andcommitted
spi: sh-msiof: Correct SIMDR2_GRPMASK
The Group Output Mask is not a single bit, but a bit field, containing one bit for each of the four possible groups. Correct the definition. Note that this change has no direct impact, as the driver only uses the first group. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://patch.msgid.link/ad268d67807cb7e544eddaf7a056793482a965d4.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown <[email protected]>
1 parent 8f3903b commit acedbff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-sh-msiof.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct sh_msiof_spi_priv {
102102
/* SITMDR2 and SIRMDR2 */
103103
#define SIMDR2_BITLEN1 GENMASK(28, 24) /* Data Size (8-32 bits) */
104104
#define SIMDR2_WDLEN1 GENMASK(23, 16) /* Word Count (1-64/256 (SH, A1))) */
105-
#define SIMDR2_GRPMASK1 BIT(0) /* Group Output Mask 1 (SH, A1) */
105+
#define SIMDR2_GRPMASK GENMASK(3, 0) /* Group Output Mask 1-4 (SH, A1) */
106106

107107
/* SITSCR and SIRSCR */
108108
#define SISCR_BRPS GENMASK(12, 8) /* Prescaler Setting (1-32) */
@@ -400,7 +400,7 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,
400400
if (tx_buf || (p->ctlr->flags & SPI_CONTROLLER_MUST_TX))
401401
sh_msiof_write(p, SITMDR2, dr2);
402402
else
403-
sh_msiof_write(p, SITMDR2, dr2 | SIMDR2_GRPMASK1);
403+
sh_msiof_write(p, SITMDR2, dr2 | SIMDR2_GRPMASK);
404404

405405
if (rx_buf)
406406
sh_msiof_write(p, SIRMDR2, dr2);

0 commit comments

Comments
 (0)