Skip to content

Commit 5158814

Browse files
KanjiMonsterbroonie
authored andcommitted
spi: bcm63xx: fix max prepend length
The command word is defined as following: /* Command */ #define SPI_CMD_COMMAND_SHIFT 0 #define SPI_CMD_DEVICE_ID_SHIFT 4 #define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 #define SPI_CMD_ONE_BYTE_SHIFT 11 #define SPI_CMD_ONE_WIRE_SHIFT 12 If the prepend byte count field starts at bit 8, and the next defined bit is SPI_CMD_ONE_BYTE at bit 11, it can be at most 3 bits wide, and thus the max value is 7, not 15. Fixes: b17de07 ("spi/bcm63xx: work around inability to keep CS up") Signed-off-by: Jonas Gorski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c09168c commit 5158814

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-bcm63xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ enum bcm63xx_regs_spi {
126126
SPI_MSG_DATA_SIZE,
127127
};
128128

129-
#define BCM63XX_SPI_MAX_PREPEND 15
129+
#define BCM63XX_SPI_MAX_PREPEND 7
130130

131131
#define BCM63XX_SPI_MAX_CS 8
132132
#define BCM63XX_SPI_BUS_NUM 0

0 commit comments

Comments
 (0)