diff options
author | Mark Brown <broonie@linaro.org> | 2014-04-11 00:39:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-11 00:39:52 +0200 |
commit | 09c0998efcb4a23e27c297f48309e0b2abc76563 (patch) | |
tree | e2c1d589095af11d2a56239df9beb7ddad566f67 /drivers/spi/spi-xcomm.c | |
parent | Linux 3.14 (diff) | |
parent | Merge remote-tracking branches 'spi/topic/xilinx' and 'spi/topic/xtfpga' into... (diff) | |
download | linux-09c0998efcb4a23e27c297f48309e0b2abc76563.tar.xz linux-09c0998efcb4a23e27c297f48309e0b2abc76563.zip |
Merge tag 'spi-v3.15' into spi-linus
spi: Updates for v3.15
A busy release for both cleanups and new drivers this time along with
further factoring out of replicated code into the core:
- Provide support in the core for DMA mapping transfers - essentially
all drivers weren't implementing this properly, now there's no
excuse.
- Dual and quad mode support for spidev.
- Fix handling of cs_change in the generic implementation.
- Remove the S3C_DMA code from the s3c64xx driver now that all the
platforms using it have been converted to dmaengine.
- Lots of improvements to the Renesas SPI controllers.
- Drivers for Allwinner A10 and A31, Qualcomm QUP and Xylinx xtfpga.
- Removal of the bitrotted ti-ssp driver.
# gpg: Signature made Mon 31 Mar 2014 12:03:09 BST using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'drivers/spi/spi-xcomm.c')
-rw-r--r-- | drivers/spi/spi-xcomm.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c index 24c40b13dab1..bb478dccf1d8 100644 --- a/drivers/spi/spi-xcomm.c +++ b/drivers/spi/spi-xcomm.c @@ -8,7 +8,6 @@ */ #include <linux/kernel.h> -#include <linux/init.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/i2c.h> @@ -74,15 +73,13 @@ static void spi_xcomm_chipselect(struct spi_xcomm *spi_xcomm, static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm, struct spi_device *spi, struct spi_transfer *t, unsigned int *settings) { - unsigned int speed; - if (t->len > 62) return -EINVAL; - speed = t->speed_hz ? t->speed_hz : spi->max_speed_hz; + if (t->speed_hz != spi_xcomm->current_speed) { + unsigned int divider; - if (speed != spi_xcomm->current_speed) { - unsigned int divider = DIV_ROUND_UP(SPI_XCOMM_CLOCK, speed); + divider = DIV_ROUND_UP(SPI_XCOMM_CLOCK, t->speed_hz); if (divider >= 64) *settings |= SPI_XCOMM_SETTINGS_CLOCK_DIV_64; else if (divider >= 16) @@ -90,7 +87,7 @@ static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm, else *settings |= SPI_XCOMM_SETTINGS_CLOCK_DIV_4; - spi_xcomm->current_speed = speed; + spi_xcomm->current_speed = t->speed_hz; } if (spi->mode & SPI_CPOL) @@ -148,8 +145,6 @@ static int spi_xcomm_transfer_one(struct spi_master *master, int status = 0; bool is_last; - is_first = true; - spi_xcomm_chipselect(spi_xcomm, spi, true); list_for_each_entry(t, &msg->transfers, transfer_list) { |