]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: bcm63xx-hsspi: Fix multi-bit mode setting
authorWilliam Zhang <william.zhang@broadcom.com>
Wed, 7 Jun 2023 23:37:02 +0000 (16:37 -0700)
committerJagan Teki <jagan@edgeble.ai>
Thu, 13 Jul 2023 08:29:57 +0000 (13:59 +0530)
commit27c4d550aaf45a9ffdd6ffe00aee854867943f29
treef5d0de0e0f1d2a3bc429ea93e17123710ccc7aa1
parent937b49e90abe8dcb095d324dc4d48ae1542b563d
spi: bcm63xx-hsspi: Fix multi-bit mode setting

Currently the driver always sets the controller to dual data bit mode
for both tx and rx data in the profile mode control register even for
single data bit transfer. Luckily the opcode is set correctly according
to SPI transfer data bit width so it does not actually cause issues.

This change fixes the problem by setting tx and rx data bit mode field
correctly according to the actual SPI transfer tx and rx data bit width.

Fixes: 29cc4368ad4b ("dm: spi: add BCM63xx HSSPI driver")
Port from linux patch:
Link: https://lore.kernel.org/r/20230209200246.141520-11-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/bcm63xx_hsspi.c