OSDN Git Service

spi: spi-fsl-dspi: Fix MCR register handling
authorEsben Haabendal <eha@deif.com>
Wed, 20 Jun 2018 07:34:37 +0000 (09:34 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 20 Jun 2018 13:46:15 +0000 (14:46 +0100)
commitd87e08f1421373f010308b1d065a1f0c3b251a52
treeefc054cfb659b883e07ebc4fb6a6b32ad0b87846
parentdadcf4abd60ba6401b592c329a19719a6e1dd444
spi: spi-fsl-dspi: Fix MCR register handling

The MCR register is not changed, so initialize it in dspi_init().

The exception is the CLR_TXF and CLR_RXF bits, which should be written to
before each transfer to make sure we start with empty FIFOs.  With MCR
register now configured as volatile, the regmap_update_bits will do a real
read-modify-write cycle.

Signed-off-by: Esben Haabendal <eha@deif.com>
Acked-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c