]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: cadence-quadspi: Fix check condition for DTR ops
authorApurva Nandan <a-nandan@ti.com>
Wed, 12 Apr 2023 10:58:54 +0000 (16:28 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 26 Apr 2023 08:06:52 +0000 (13:36 +0530)
commit44e2de0480a8a5a5780b6b200935a96b961b94e7
tree7210fae9d771758d0c1885efebd801a136b92cf1
parent562d166a13ca88cb55ef4f4ddb016e27b7cb0d2e
spi: cadence-quadspi: Fix check condition for DTR ops

buswidth and dtr fields in spi_mem_op are only valid when the
corresponding spi_mem_op phase has a non-zero length. For example,
SPI NAND core doesn't set buswidth when using SPI_MEM_OP_NO_ADDR
phase.

Fix the dtr checks in set_protocol() to ignore empty spi_mem_op
phases, as checking for dtr field in empty phase will result in
false negatives.

Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/cadence_qspi.c
drivers/spi/cadence_qspi_apb.c