summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-cadence.c
Commit message (Collapse)AuthorAgeFilesLines
* spi: cadence: use to_platform_device()Geliang Tang2016-01-051-4/+2
| | | | | | | | Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/cadence', ↵Mark Brown2014-12-081-13/+11
|\ \ | | | | | | | | | 'spi/topic/dw' and 'spi/topic/fsl-cpm' into spi-next
| | * spi: cadence: Init HW after reading devicetree attributesPaul Cercueil2014-11-281-13/+11
| |/ | | | | | | | | | | | | | | | | | | This will make it possible to use the settings specified in the devicetree to configure the hardware. Signed-off-by: Paul Cercueil <paul.cercueil@analog.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: cadence: Fix 3-to-8 mux modeLars-Peter Clausen2014-11-281-2/+7
|/ | | | | | | | | | | In 3-to-8 mux mode for the CS pins we need to set the PERI_SEL bit in the control register. Currently the driver never sets this bit even when configured for 3-to-8 mux mode. This patch adds code which sets the bit during device initialization when necessary. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Harini Katakam <harinik@xilinx.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: cadence: Remove .owner field for driverMichal Simek2014-08-161-1/+0
| | | | | | | | | | | | | | There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'spi/topic/adi-v3', 'spi/topic/atmel', ↵Mark Brown2014-08-041-1/+1
|\ \ | | | | | | | | | 'spi/topic/cleanup' and 'spi/topic/davinci' into spi-next
| | * spi: cadence: Make of_device_id array constJingoo Han2014-06-061-1/+1
| |/ | | | | | | | | | | | | | | | | Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Harini Katakam <harinik@xilinx.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: cadence: Configure SPI clock in the prepare_message() callbackLars-Peter Clausen2014-07-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the cadence SPI driver does the SPI clock configuration (setup CPOL and CPHA) in the prepare_transfer_hardware() callback. The prepare_transfer_hardware() callback is only called though when the controller transitions from a idle state to a non-idle state. Such a transitions happens when the message queue goes from empty to non-empty. If multiple messages from different SPI slaves with different clock settings are in the message queue the clock settings will not be properly updated when switching from one slave device to another. Instead do the updating of the clock configuration in the prepare_message() callback which will be called for each individual message. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: cadence: Make sure that clock polarity changes are appliedLars-Peter Clausen2014-07-111-7/+19
|/ | | | | | | | | | | | | | It seems that the cadence SPI controller does not immediately change the clock polarity setting when writing the CR register. Instead the change is delayed until the next transfer starts. This happens after the chip select line has already been asserted. As a result the first transfer after a clock polarity change will generate spurious clock transitions which typically results in the SPI slave not being able to properly understand the message. Toggling the ER register seems to cause the SPI controller to apply the clock polarity changes, so implement this as a workaround to fix the issue. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: Add driver for Cadence SPI controllerHarini Katakam2014-04-141-0/+673
Add driver for Cadence SPI controller. This is used in Xilinx Zynq. Signed-off-by: Harini Katakam <harinik@xilinx.com> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud