aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bcm2835aux.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10spi: bcm2835aux: fix bitmask definesStephan Olbrich1-2/+2
The bitmasks for txempty and idle interrupts were interchanged. Signed-off-by: Stephan Olbrich <stephanolbrich@gmx.de> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-16spi: bcm2835aux: change initialization order and switch to platform_get_irqMartin Sperl1-4/+4
Change the initialization order of the HW so that the interrupt is only requested after the HW is initialized Also the use of irq_of_parse_and_map is replaced by platform_get_irq. Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-16spi: bcm2835aux: fixed bad data on longer transfersMartin Sperl1-12/+31
There are strange issues with the auxiliary spi device that result in "lost" data in the RX path if the fifo is filled by too much (even though the status register is checked if new data can get filled in). This has been observed primarily for the interrupt case. Polling works fine, probably because the RX fifo is pulled immediately when in the tight polling loop. For that reason we have to limit the pending bytes to less than 15 when filling the fifo in interrupt mode. There also was an issue returning the "wrong" last 1/2 bytes of a transfer when the transfer is not a multiple of 3 bytes. (this impacted polling and interrupt modes) Also fixed an overflow in the estimation of the transfer time used to decide if we run in interrupt or polling mode (found with the spi-bcm2835.c driver originally). Reported-by: Georgii Staroselskii <georgii.staroselskii@emlid.com> Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-07spi: bcm2835aux: add bcm2835 auxiliary spi device driverMartin Sperl1-0/+493
The bcm2835 has 2 auxiliary spi bus masters spi1 and spi2. This implements the driver to enable these devices. The driver does not implement native chip-selects but uses the aribtrary GPIO-chip-selects provided by the spi-chipselect. Note that this driver relies on the fact that the clock is implemented by the clk-bcm2835-aux driver, which enables/disables the HW block when requesting/releasing the clock. Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Mark Brown <broonie@kernel.org>