Searched hist:"97 e4827d" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/spi/ |
H A D | spi-cadence-quadspi.c | 97e4827d Thu Mar 31 06:08:19 CDT 2022 Matthias Schiffer <matthias.schiffer@ew.tq-group.com> spi: cadence-quadspi: fix protocol setup for non-1-1-X operations
cqspi_set_protocol() only set the data width, but ignored the command and address width (except for 8-8-8 DTR ops), leading to corruption of all transfers using 1-X-X or X-X-X ops. Fix by setting the other two widths as well.
While we're at it, simplify the code a bit by replacing the CQSPI_INST_TYPE_* constants with ilog2().
Tested on a TI AM64x with a Macronix MX25U51245G QSPI flash with 1-4-4 read and write operations.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/20220331110819.133392-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Mark Brown <broonie@kernel.org>
|