Commit Graph

3 Commits

Author SHA1 Message Date
Axel Lin b2b3024ca5 spi: rb4xx: Fix checking return value of devm_ioremap_resource()
devm_ioremap_resource() returns ERR_PTR on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-01 17:35:54 +01:00
Bert Vermeulen 4a1ae8be45 spi: rb4xx: Fix set_cs logic.
As it turns out, the set_cs() enable parameter refers to the logic level
on the CS pin, not the state of chip selection.

This broke functionality of the LEDs behind the CPLD, or at least delayed
the commands until another one came in to toggle CS.

Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-20 21:34:59 +01:00
Bert Vermeulen 05aec35787 spi: Add SPI driver for Mikrotik RB4xx series boards
This driver mediates access between the connected CPLD and other devices
on the bus.

The m25p80-compatible boot flash and (some models) MMC use regular SPI,
bitbanged as required by the SoC. However the SPI-connected CPLD has
a two-wire mode, in which two bits are transferred per SPI clock
cycle. The second bit is transmitted with the SoC's CS2 pin.

Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-18 13:57:58 +01:00