spi: dw-mmio: add MSCC Ocelot support
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 27 Jul 2018 19:53:56 +0000 (21:53 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 30 Jul 2018 11:02:08 +0000 (12:02 +0100)
commitc2c25cc397026ec705e050248539df400d2563f8
tree5a20ba821111c513d68074d70e0b58875230c38f
parentc79bdbb490a1d05c6169cbffd37c19f5aa96587a
spi: dw-mmio: add MSCC Ocelot support

Because the SPI controller deasserts the chip select when the TX fifo is
empty (which may happen in the middle of a transfer), the CS should be
handled by linux. Unfortunately, some or all of the first four chip
selects are not muxable as GPIOs, depending on the SoC.

There is a way to bitbang those pins by using the SPI boot controller so
use it to set the chip selects.

At init time, it is also necessary to give control of the SPI interface to
the Designware IP.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-mmio.c