spi: fsi: Fix use of the bneq+ sequencer instruction
authorBrad Bishop <bradleyb@fuzziesquirrel.com>
Wed, 9 Sep 2020 22:28:54 +0000 (17:28 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2020 18:31:41 +0000 (19:31 +0100)
commit7909eebb2bea7fdbb2de0aa794cf29843761ed5b
treef87ceec05ca99f359862600f6687a73a41b14f64
parent0b546bbe9474ff23e6843916ad6d567f703b2396
spi: fsi: Fix use of the bneq+ sequencer instruction

All of the switches in N2_count_control in the counter configuration are
required to make the branch if not equal and increment command work.
Set them when using bneq+.

A side effect of this mode requires a dummy write to TDR when both
transmitting and receiving otherwise the controller won't start shifting
receive data.

It is likely not possible to avoid TDR underrun errors in this mode and
they are harmless, so do not check for them.

Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver")
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20200909222857.28653-4-eajames@linux.ibm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsi.c