mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
spi: cadence: Fix busy cycles calculation
If xSPI is in x2/x4/x8 mode to calculate busy cycles, busy bits count must be divided by the number of lanes. If opcommand is using 8 busy bits, but SPI is in x4 mode, there will be only 2 busy cycles. Signed-off-by: Witold Sadowski <wsadowski@marvell.com> Reviewed-by: Chandrakala Chavva <cchavva@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Link: https://lore.kernel.org/r/20221219144254.20883-2-wsadowski@marvell.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b24cded8c0
commit
e8bb8f19e7
@ -177,7 +177,10 @@
|
|||||||
#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op) ( \
|
#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op) ( \
|
||||||
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_DCNT_H, \
|
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_DCNT_H, \
|
||||||
((op)->data.nbytes >> 16) & 0xffff) | \
|
((op)->data.nbytes >> 16) & 0xffff) | \
|
||||||
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_NUM_OF_DUMMY, (op)->dummy.nbytes * 8))
|
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_NUM_OF_DUMMY, \
|
||||||
|
(op)->dummy.buswidth != 0 ? \
|
||||||
|
(((op)->dummy.nbytes * 8) / (op)->dummy.buswidth) : \
|
||||||
|
0))
|
||||||
|
|
||||||
#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_4(op, chipsel) ( \
|
#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_4(op, chipsel) ( \
|
||||||
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R4_BANK, chipsel) | \
|
FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R4_BANK, chipsel) | \
|
||||||
|
Loading…
Reference in New Issue
Block a user