Unverified Commit 8221545c authored by Mark Brown's avatar Mark Brown
Browse files

spi: omap2-mcspi: Revert multi mode support



There have been multiple reports that the multi-mode support in the
OMAP2 McSPI driver has caused regressions on existing systems.  There's
been some discussion and some proposed changes but nothing that's been
tested by all the reporters.  Drop the patch for v6.10, hopefully we can
get to the bottom of the issue and reenable the feature for v6.11.

Reported-by: default avatarColin Foster <colin.foster@in-advantage.com>
Reported-by: default avatarJoão Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
Fixes: e64d3b6f ("spi: omap2-mcpsi: Enable MULTI-mode in more situations")
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240704-spi-revert-omap2-multi-v1-1-69357ef13fdc@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1762dc01
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -1277,24 +1277,11 @@ static int omap2_mcspi_prepare_message(struct spi_controller *ctlr,

		/*
		 * Check if this transfer contains only one word;
		 * OR contains 1 to 4 words, with bits_per_word == 8 and no delay between each word
		 * OR contains 1 to 2 words, with bits_per_word == 16 and no delay between each word
		 *
		 * If one of the two last case is true, this also change the bits_per_word of this
		 * transfer to make it a bit faster.
		 * It's not an issue to change the bits_per_word here even if the multi-mode is not
		 * applicable for this message, the signal on the wire will be the same.
		 */
		if (bits_per_word < 8 && tr->len == 1) {
			/* multi-mode is applicable, only one word (1..7 bits) */
		} else if (tr->word_delay.value == 0 && bits_per_word == 8 && tr->len <= 4) {
			/* multi-mode is applicable, only one "bigger" word (8,16,24,32 bits) */
			tr->bits_per_word = tr->len * bits_per_word;
		} else if (tr->word_delay.value == 0 && bits_per_word == 16 && tr->len <= 2) {
			/* multi-mode is applicable, only one "bigger" word (16,32 bits) */
			tr->bits_per_word = tr->len * bits_per_word / 2;
		} else if (bits_per_word >= 8 && tr->len == bits_per_word / 8) {
			/* multi-mode is applicable, only one word (9..15,17..32 bits) */
			/* multi-mode is applicable, only one word (8..32 bits) */
		} else {
			/* multi-mode is not applicable: more than one word in the transfer */
			mcspi->use_multi_mode = false;