spi: Get spi-3wire from dts
PATCH 1/2 spi: Get spi-3wire from dts
spi-3wire is used when SI/SO signals shared so get the same from dts node and assign to mode on slave plat->mode.
--- drivers/spi/spi-uclass.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi-uclass.c +2 -0
@@ -378,6 +378,8 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node, mode |=SPI_CPHA ;if (fdtdec_get_bool (blob, node,"spi-cs-high" )) mode |=SPI_CS_HIGH ; +if (fdtdec_get_bool (blob, node,"spi-3wire" )) + mode |=SPI_3WIRE ;if (fdtdec_get_bool (blob, node,"spi-half-duplex" )) mode |=SPI_PREAMBLE ; plat->mode = mode;
Signature · 1 line
1.9.1
PATCH 2/2 spi: ti_qspi: Fix SPI_3WIRE checking using mode
SPI_3WIRE is spi mode not spi flags, so this patch fixed the spi-3wire checking throgh mode instead of flags.
--- drivers/spi/ti_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/ti_qspi.c +1 -1
@@ -293,7 +293,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd =0 ; qslave->cmd |=QSPI_WLEN (8 ); qslave->cmd |=QSPI_EN_CS (slave->cs); -if (flags &SPI_3WIRE ) +if (qslave->mode &SPI_3WIRE ) qslave->cmd |=QSPI_3_PIN ; qslave->cmd |=0xfff ;
Signature · 1 line
1.9.1
PATCH 2/2 spi: ti_qspi: Fix SPI_3WIRE checking using mode
Quoted 9 lines · Jagan Teki
SPI_3WIREis spi mode not spi flags, so this patch fixed the spi-3wire checking throgh mode instead of flags.Cc Mugunthan V N <[email protected]>Cc Simon Glass <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/spi/ti_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 2/2 spi: ti_qspi: Fix SPI_3WIRE checking using mode
Quoted 4 lines · Simon Glass
Quoted 3 lines · Jagan Teki
SPI_3WIREis spi mode not spi flags, so this patch fixed the spi-3wire checking throgh mode instead of flags.
Quoted 8 lines
Quoted 6 lines
Cc Mugunthan V N <[email protected]>Cc Simon Glass <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/spi/ti_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Acked-by Simon Glass <[email protected]>
Applied to u-boot-spi/master
thanks!
Signature · 1 line
Jagan.
PATCH 1/2 spi: Get spi-3wire from dts
In reply to Jagan TekiQuoted 9 lines · Jagan Teki
spi-3wire is used when SI/SO signals shared so get the same from dts node and assign to mode on slave
plat->mode.Cc Simon Glass <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/spi/spi-uclass.c | 2 ++ 1 file changed, 2 insertions(+)
PATCH 1/2 spi: Get spi-3wire from dts
Quoted 5 lines · Simon Glass
Quoted 4 lines · Jagan Teki
spi-3wire is used when SI/SO signals shared so get the same from dts node and assign to mode on slave
plat->mode.
Quoted 7 lines
Quoted 5 lines
Cc Simon Glass <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/spi/spi-uclass.c | 2 ++ 1 file changed, 2 insertions(+)Acked-by Simon Glass <[email protected]>
Applied to u-boot-spi/master
thanks!
Signature · 1 line
Jagan.