ASoC: RT5677-SPI: Disable 16Bit SPI Transfers
authorCurtis Malainey <cujomalainey@chromium.org>
Fri, 3 May 2019 19:32:14 +0000 (12:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 16:50:16 +0000 (18:50 +0200)
commite047bab50092704805ca0d14fa85ab65ff4b56c0
tree2c416a7dda3604e7e9357a637d3e6cd9e7458cae
parentb93d5632c8ba66cd7c0a163fa0b6149a95871505
ASoC: RT5677-SPI: Disable 16Bit SPI Transfers

commit a46eb523220e242affb9a6bc9bb8efc05f4f7459 upstream.

The current algorithm allows 3 types of transfers, 16bit, 32bit and
burst. According to Realtek, 16bit transfers have a special restriction
in that it is restricted to the memory region of
0x18020000 ~ 0x18021000. This region is the memory location of the I2C
registers. The current algorithm does not uphold this restriction and
therefore fails to complete writes.

Since this has been broken for some time it likely no one is using it.
Better to simply disable the 16 bit writes. This will allow users to
properly load firmware over SPI without data corruption.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/rt5677-spi.c