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:36:24 +0000 (09:36 +0200)
commitfaddb17685f9f0507dcd28a3a4af3c63d5765407
tree49589f58a01e0c221ff177c2a85feff3ecd3dc97
parent38866e866121454b5c6e2fc7eefe82fec97e810e
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