linux/drivers/spi
Chris Boot f8043872e7 spi: add driver for BCM2835
The BCM2835 contains two forms of SPI master controller (one known
simply as SPI0, and the other known as the "Universal SPI Master", in
the auxilliary block) and one form of SPI slave controller. This patch
adds support for the SPI0 controller.

This driver is taken from Chris Boot's repository at
git://github.com/bootc/linux.git rpi-linear
as of commit 6de2905 "spi-bcm2708: fix printf with spurious %s".
In the first SPI-related commit there, Chris wrote:

Thanks to csoutreach / A Robinson for his driver which I used as an
inspiration. You can find his version here:
http://piface.openlx.org.uk/raspberry-pi-spi-kernel-driver-available-for

Changes made during upstreaming:
* Renamed bcm2708 to bcm2835 as per upstream naming for this SoC.
* Removed support for brcm,realtime property.
* Increased transfer timeout to 30 seconds.
* Return IRQ_NONE from the IRQ handler if no interrupt was handled.
* Disable TA (Transfer Active) and clear FIFOs on a transfer timeout.
* Wrote device tree binding documentation.
* Request unnamed clock rather than "sys_pclk"; the DT will provide the
  correct clock.
* Assume that tfr->speed_hz and tfr->bits_per_word are always set in
  bcm2835_spi_start_transfer(), bcm2835_spi_transfer_one(), so no need
  to check spi->speed_hz or tft->bits_per_word.
* Re-ordered probe() to remove the need for temporary variables.
* Call clk_disable_unprepare() rather than just clk_unprepare() on probe()
  failure.
* Don't use devm_request_irq(), to ensure that the IRQ doesn't fire after
  we've torn down the device, but not unhooked the IRQ.
* Moved probe()'s call to clk_prepare_enable() so we can be sure the clock
  is enabled if the IRQ handler fires immediately.
* Remove redundant checks from bcm2835_spi_check_transfer() and
  bcm2835_spi_setup().
* Re-ordered IRQ handler to check for RXR before DONE. Added comments to
  ISR.
* Removed empty prepare/unprepare implementations.
* Removed use of devinit/devexit.
* Added BCM2835_ prefix to defines.

Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-12 18:23:49 +00:00
..
Kconfig spi: add driver for BCM2835 2013-03-12 18:23:49 +00:00
Makefile spi: add driver for BCM2835 2013-03-12 18:23:49 +00:00
spi-altera.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-ath79.c spi/ath79: add shutdown handler 2013-02-06 10:41:12 +00:00
spi-atmel.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-au1550.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-bcm63xx.c spi/bcm63xx: work around inability to keep CS up 2013-02-05 17:14:33 +00:00
spi-bcm2835.c spi: add driver for BCM2835 2013-03-12 18:23:49 +00:00
spi-bfin5xx.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-bfin-sport.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-bitbang-txrx.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-bitbang.c Merge branch 'broonie/spi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git 2013-02-05 12:30:13 +00:00
spi-butterfly.c spi: Add module.h to implicit users in drivers/spi 2011-10-31 19:32:17 -04:00
spi-clps711x.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-coldfire-qspi.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-davinci.c spi/davinci: use request_threaded_irq() to fix deadlock 2013-02-05 17:12:26 +00:00
spi-dw-mid.c dmaengine/dma_slave: introduce inline wrappers 2012-03-21 19:20:22 +05:30
spi-dw-mmio.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-dw-pci.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-dw.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-dw.h spi: spi-dw: fix all sparse warnings 2011-09-21 09:41:48 -06:00
spi-ep93xx.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-falcon.c spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag 2013-02-05 17:16:55 +00:00
spi-fsl-espi.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-fsl-lib.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-fsl-lib.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-fsl-spi.c gpio: Make of_count_named_gpios() use new of_count_phandle_with_args() 2013-02-13 10:11:53 +00:00
spi-gpio.c spi: spi-gpio: Add checks for the dt properties 2013-01-26 15:35:56 +08:00
spi-imx.c spi/imx: Add MODULE_ALIAS() 2013-02-05 13:17:12 +00:00
spi-lm70llp.c spi: By default setup spi_masters with 1 chipselect and dynamics bus number 2012-05-19 23:42:08 -06:00
spi-mpc52xx-psc.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-mpc52xx.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-mpc512x-psc.c spi/spi-mpc512x-psc: init mode bits supported by the driver 2013-02-05 14:44:12 +00:00
spi-mxs.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-nuc900.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-oc-tiny.c gpio: Make of_count_named_gpios() use new of_count_phandle_with_args() 2013-02-13 10:11:53 +00:00
spi-octeon.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-omap2-mcspi.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-omap-100k.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-omap-uwire.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-orion.c spi/orion: Use module_platform_driver() 2013-02-05 14:44:14 +00:00
spi-pl022.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-ppc4xx.c Device tree changes for v3.9 2013-02-20 11:04:46 -08:00
spi-pxa2xx-dma.c spi/pxa2xx: add support for DMA engine 2013-02-08 12:15:28 +00:00
spi-pxa2xx-pci.c spi: fix return value check in ce4100_spi_probe() 2013-03-12 18:23:17 +00:00
spi-pxa2xx-pxadma.c spi/pxa2xx: break out the private DMA API usage into a separate file 2013-02-08 12:15:21 +00:00
spi-pxa2xx.c spi/pxa2xx: add support for Lynxpoint SPI controllers 2013-02-08 13:15:34 +00:00
spi-pxa2xx.h spi/pxa2xx: add support for Intel Low Power Subsystem SPI 2013-02-08 13:14:40 +00:00
spi-rspi.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-s3c24xx-fiq.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx-fiq.S spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-s3c64xx.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-sc18is602.c spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch 2012-08-23 12:13:54 +01:00
spi-sh-hspi.c spi/sh-hspi: fix return value check in hspi_probe(). 2012-12-19 15:11:41 +00:00
spi-sh-msiof.c spi/sh-msiof: Add device tree parsing to driver 2013-02-05 12:26:58 +00:00
spi-sh-sci.c spi: Add module.h to implicit users in drivers/spi 2011-10-31 19:32:17 -04:00
spi-sh.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-sirf.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-tegra20-sflash.c arm-soc: soc-specific updates 2013-02-21 15:27:22 -08:00
spi-tegra20-slink.c arm-soc: soc-specific updates 2013-02-21 15:27:22 -08:00
spi-ti-ssp.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-tle62x0.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-topcliff-pch.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-txx9.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-xcomm.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-xilinx.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spidev.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00