diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 11:51:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 11:51:05 -0700 |
commit | 750b2d7b93f2ba19f4f238cc641bda22fe07c155 (patch) | |
tree | bfef33ef5444ac2ac78c61e47baa7a5d19916214 /drivers/spi/spi-ppc4xx.c | |
parent | 3dbde57ad941c55345fd7fac0ee3f70f204b02d8 (diff) | |
parent | ed893559c9799df3b32051871c22017151394d82 (diff) | |
download | op-kernel-dev-750b2d7b93f2ba19f4f238cc641bda22fe07c155.zip op-kernel-dev-750b2d7b93f2ba19f4f238cc641bda22fe07c155.tar.gz |
Merge tag 'spi-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown:
"A fairly quiet release for the SPI subsystem, the standout changes
being:
- Core support for implementing bits per word constraints implemented
by Stephen Warren, factoring some code out of drivers.
- Addition of polling mode support for the s3c64xx driver as some
newer Exynos systems have taken the unusual step of removing
interrupt support.
- Use of the in-IP FIFO and generic dmaengine support for the OMAP2
driver, providing improved performance.
- Conversion of the mpc512x driver to use the core message queue
infrastructure.
The nicest thing being that all the factoring out into common code
leads to a negative diffstat overall."
* tag 'spi-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (42 commits)
spi/s3c64xx: Rely on the compiler eliminating the OF ID table
spi: s3c64xx: Added support for exynos5440 spi
spi: s3c64xx: Added provision for dedicated cs pin
spi: omap2-mcspi: add generic DMA request support to the DT binding
spi: omap2-mcspi: convert to dma_request_slave_channel_compat()
spi/s3c64xx: Make wait_for_timeout() function name less generic
spi: s3c64xx: added support for polling mode
spi: omap2-mcspi: Add FIFO buffer support
spi: omap2-mcspi: Move bytes per word calculation to the function
spi: spi-xilinx: cleanup a check in xilinx_spi_txrx_bufs()
spi: spi-nuc900: Remove redundant platform_set_drvdata()
spi: spi-fsl-lib: Make mpc8xxx_spi_work static
spi: spi-topcliff-pch: Fix sparse warnings
spi: spi-xilinx: Remove redundant platform_set_drvdata()
spi: spi-xilinx: Add run run-time endian detection
spi: mpc512x: use the SPI subsystem's message queue
spi: mpc512x: improve throughput in the RX/TX func
spi: mpc512x: minor prep before feature change
spi: atmel: convert to dma_request_slave_channel_compat()
spi: sirf: avoid uninitialized-use warning
...
Diffstat (limited to 'drivers/spi/spi-ppc4xx.c')
-rw-r--r-- | drivers/spi/spi-ppc4xx.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index 357f183..0ee53c2 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c @@ -190,12 +190,6 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t) speed = min(t->speed_hz, spi->max_speed_hz); } - if (bits_per_word != 8) { - dev_err(&spi->dev, "invalid bits-per-word (%d)\n", - bits_per_word); - return -EINVAL; - } - if (!speed || (speed > spi->max_speed_hz)) { dev_err(&spi->dev, "invalid speed_hz (%d)\n", speed); return -EINVAL; @@ -229,12 +223,6 @@ static int spi_ppc4xx_setup(struct spi_device *spi) { struct spi_ppc4xx_cs *cs = spi->controller_state; - if (spi->bits_per_word != 8) { - dev_err(&spi->dev, "invalid bits-per-word (%d)\n", - spi->bits_per_word); - return -EINVAL; - } - if (!spi->max_speed_hz) { dev_err(&spi->dev, "invalid max_speed_hz (must be non-zero)\n"); return -EINVAL; @@ -406,7 +394,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op) if (master == NULL) return -ENOMEM; master->dev.of_node = np; - dev_set_drvdata(dev, master); + platform_set_drvdata(op, master); hw = spi_master_get_devdata(master); hw->master = spi_master_get(master); hw->dev = dev; @@ -465,6 +453,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op) bbp->use_dma = 0; bbp->master->setup = spi_ppc4xx_setup; bbp->master->cleanup = spi_ppc4xx_cleanup; + bbp->master->bits_per_word_mask = SPI_BPW_MASK(8); /* the spi->mode bits understood by this driver: */ bbp->master->mode_bits = @@ -553,7 +542,6 @@ request_mem_error: free_gpios: free_gpios(hw); free_master: - dev_set_drvdata(dev, NULL); spi_master_put(master); dev_err(dev, "initialization failed\n"); @@ -562,11 +550,10 @@ free_master: static int spi_ppc4xx_of_remove(struct platform_device *op) { - struct spi_master *master = dev_get_drvdata(&op->dev); + struct spi_master *master = platform_get_drvdata(op); struct ppc4xx_spi *hw = spi_master_get_devdata(master); spi_bitbang_stop(&hw->bitbang); - dev_set_drvdata(&op->dev, NULL); release_mem_region(hw->mapbase, hw->mapsize); free_irq(hw->irqnum, hw); iounmap(hw->regs); |