spi: atmel: init FIFOs before spi enable
authorEugen Hristev <eugen.hristev@microchip.com>
Tue, 27 Feb 2018 10:25:07 +0000 (12:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:42:51 +0000 (09:42 +0200)
commitd4870729a63e57a7f2f91ec23e7c565b4e8470f9
tree05d1c4aec85c7159bd71a6bd666f9b8ea700c496
parenteac13cb73e4f2f684f4e32cd98a1a6b6856da51d
spi: atmel: init FIFOs before spi enable

commit 9581329eff9db72ab4fbb46a594fd7fdda3c51b0 upstream.

The datasheet recommends initializing FIFOs before
SPI enable. If we do not do it like this, there may be
a strange behavior. We noticed that DMA does not work properly
with FIFOs if we do not clear them beforehand or enable them
before SPIEN.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-atmel.c