summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'spi/topic/orion' into spi-nextMark Brown2013-09-011-17/+5
|\
| * spi/orion: Convert to devm_ioremap_resource()Mark Brown2013-07-291-17/+5
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Andrew Lunn <andrew@lunn.ch>
* | Merge remote-tracking branch 'spi/topic/omap-100k' into spi-nextMark Brown2013-09-011-198/+78
|\ \
| * | spi/omap-100k: Convert to module_platform_driver()Mark Brown2013-07-151-13/+2
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Prepare and unprepare clocksMark Brown2013-07-151-8/+8
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Convert to devm_clk_get()Mark Brown2013-07-151-13/+6
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Convert to use core message queue implementationMark Brown2013-07-151-86/+17
| | | | | | | | | | | | | | | | | | | | | Saves some code duplication and gets us the benefits of any improvements in the core code. Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Factor message transfer function out of work queueMark Brown2013-07-151-65/+68
| | | | | | | | | | | | | | | | | | In preparation for removing the custom workqueue. Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Use core functionality to check validity of transfersMark Brown2013-07-151-30/+2
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * | spi/omap-100k: Remove empty reset functionMark Brown2013-07-151-8/+0
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'spi/topic/octeon' into spi-nextMark Brown2013-09-011-44/+5
|\ \ \
| * | | spi: octeon: Convert to use bits_per_word_maskAxel Lin2013-08-201-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 543bb25 "spi: add ability to validate xfer->bits_per_word in SPI core", the driver can set bits_per_word_mask for the master then the SPI core will reject transfers that attempt to use an unsupported bits_per_word value. So we can remove octeon_spi_validate_bpw() and let SPI core handle the checking. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | spi: octeon: Remove unused bits_per_word variable in octeon_spi_do_transferAxel Lin2013-08-201-4/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | spi: octeon: Remove empty octeon_spi_nop_transfer_hardware functionAxel Lin2013-08-201-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both prepare_transfer_hardware and unprepare_transfer_hardware callbacks are optional, so we don't need to implement an empty function for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | spi: octeon: Remove my_master pointer from struct octeon_spiAxel Lin2013-08-051-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass master to platform_set_drvdata() then we can remove my_master pointer. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | Merge remote-tracking branch 'spi/topic/nuc900' into spi-nextMark Brown2013-09-011-1/+1
|\ \ \ \
| * | | | spi: nuc900: Fix mode_bits settingAxel Lin2013-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code in nuc900_slave_select() supports handling SPI_CS_HIGH. Thus set SPI_CS_HIGH bit in master->mode_bits to make it work. Otherwise, spi_setup() will return unsupported mode bits error message if SPI_CS_HIGH is set in the mode field of struct spi_device. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | Merge remote-tracking branch 'spi/topic/mxs' into spi-nextMark Brown2013-09-011-15/+13
|\ \ \ \ \
| * | | | | spi: spi-mxs: Remove unused bits_per_word variableAxel Lin2013-08-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bits_per_word variable is not used after commit 24778be20f8 "spi: convert drivers to use bits_per_word_mask". Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | spi: spi-mxs: Remove unneeded check for platform_get_resource()Fabio Estevam2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As devm_ioremap_resource() is used on probe, there is no need to explicitly check the return value from platform_get_resource(), as this is something that devm_ioremap_resource() takes care by itself. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | spi: spi-mxs: Check the return value from stmp_reset_block()Fabio Estevam2013-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | spi: spi-mxs: Check the return value from clk_prepare_enable()Fabio Estevam2013-07-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. While at it, rename 'out_free_dma' to 'out_disable_clk' so that it can properly describe its purpose. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | spi: spi-mxs: Fix the error path sequenceFabio Estevam2013-07-151-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On mxs_spi_probe() the dma channels are requested prior to enabling the SSP clock, so in the error path we should disable the SSP clock first and release the DMA channels later. Same logic applies in mxs_spi_remove(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | Merge remote-tracking branch 'spi/topic/msglen' into spi-nextMark Brown2013-09-012-0/+2
|\ \ \ \ \ \
| * | | | | | driver: spi: Modify core to compute the message lengthSourav Poddar2013-07-182-0/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make spi core calculate the message length while populating the other transfer parameters. Usecase, driver can use it to populate framelength filed in their controller. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | Merge remote-tracking branch 'spi/topic/mpc512x' into spi-nextMark Brown2013-09-011-18/+30
|\ \ \ \ \ \
| * | | | | | spi: mpc512x: cleanup clock API useGerhard Sittig2013-08-221-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup the MPC512x SoC's SPI master's use of the clock API - get, prepare, and enable the MCLK during probe; disable, unprepare and put the MCLK upon remove; hold a reference to the clock over the period of use - fetch MCLK rate (reference) once during probe and slightly reword BCLK (bitrate) determination to reduce redundancy as well as to not exceed the maximum text line length - stick with the PPC_CLOCK 'psc%d_mclk' name for clock lookup, only switch to a fixed string later after device tree based clock lookup will have become available Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | Merge remote-tracking branch 'spi/topic/ioremap' into spi-nextMark Brown2013-09-012-14/+2
|\ \ \ \ \ \ \
| * | | | | | | spi/spi-{bcm63xx.c,bfin-v3.c}: simplify use of devm_ioremap_resourceJulia Lawall2013-08-142-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | | Merge remote-tracking branch 'spi/topic/imx' into spi-nextMark Brown2013-09-011-50/+26
|\ \ \ \ \ \ \ \
| * | | | | | | | spi/imx: expose module alias for loading from device-treeNiels de Vos2013-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable auto loading by udev when spi-imx is compiled as a module. Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-imx: Check the return value from clk_prepare_enable()Fabio Estevam2013-07-151-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. While at it, fix the order of clk_disable_unprepare calls: clk_ipg should be disabled first, followed by clk_per. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-imx: Use devm functionsFabio Estevam2013-07-151-46/+15
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using devm functions can make the code smaller and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | | Merge remote-tracking branch 'spi/topic/ep93xx' into spi-nextMark Brown2013-09-011-272/+81
|\ \ \ \ \ \ \ \
| * | | | | | | | spi/ep93xx: Fix format specifier warningEmil Goode2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following sparse warning by changing the the format specifier for size_t to %zu. drivers/spi/spi-ep93xx.c:512:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: convert to the queued driver infrastructureH Hartley Sweeten2013-07-171-146/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPI core provides infrastructure for standard message queueing. Use that instead of handling it in the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: move the clock divider calcs into ep93xx_spi_chip_setup()H Hartley Sweeten2013-07-151-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The divider values stored in the per chip data are only used to set the registers in the hardware to generate the desired SPI clock. Since these are calculated per transfer based on the t->speed_hz there is no reason keep them in the per chip data. Move the ep93xx_spi_calc_divisors() call into ep93xx_spi_chip_setup() and return the dividers thru pointers. Remove the divider values from the per chip data structure. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: don't bother calculating the divisors in ep93xx_spi_setup()H Hartley Sweeten2013-07-151-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The divisors needed to generate the SPI clock are calculated per transfer based on the t->speed_hz. There is no reason to calculate them in ep93xx_spi_setup(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: use devm_clk_get()H Hartley Sweeten2013-07-151-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_clk_get() so that the clk_put() happens automatically when the last reference to this driver is dropped. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: remove 'dss' from per chip private dataH Hartley Sweeten2013-07-151-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This value is only needed to set the bits per word for each transfer of a message. There is no reason to set the value in ep93xx_spi_enable() because ep93xx_spi_process_transfer() sets it again for each transfer. Just pass the t->bits_per_word directly to ep93xx_spi_chip_setup() in ep93xx_spi_process_transfer() and remove 'dss' from the per chip private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: remove dev_err() for kzalloc() failureH Hartley Sweeten2013-07-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kzalloc() failure will have already output a message. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: get platform resources early in (*probe)H Hartley Sweeten2013-07-151-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the platform resources early in the (*probe) to minimize the number of goto's in the error path. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: remove bits_per_word() helperH Hartley Sweeten2013-07-151-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check t->bits_per_word directly and remove the inline helper function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: use read,write instead of __raw_* variantsH Hartley Sweeten2013-07-151-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants. Also, remove the inline tag on the helper functions and let the compiler decide if they are inlined. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-ep93xx: always handle transfer specific settingsH Hartley Sweeten2013-07-151-33/+10
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __spi_async(), which starts every SPI message transfer, initializes the bits_per_word and max speed for every transfer in the message. Since the conditional test in ep93xx_spi_process_transfer() will always succeed just remove it and always call ep93xx_spi_chip_setup() to configure the hardware for each transfer in the message. Remove the redundant ep93xx_spi_chp_setup() in ep93xx_spi_process_transfer() which just initializes the hardware to the "default" based on the SPI device. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | | Merge remote-tracking branch 'spi/topic/efm32' into spi-nextMark Brown2013-09-015-0/+572
|\ \ \ \ \ \ \ \
| * | | | | | | | spi: efm32: Fix build errorAxel Lin2013-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obviously the of_device_id table name is wrong. Fix below build error: CC [M] drivers/spi/spi-efm32.o drivers/spi/spi-efm32.c:499:1: error: '__mod_of_device_table' aliased to undefined symbol 'efm32_uart_dt_ids' make[2]: *** [drivers/spi/spi-efm32.o] Error 1 make[1]: *** [drivers/spi] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: spi-efm32: remove redundant dev_err call in efm32_spi_probe()Wei Yongjun2013-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | | spi: new controller driver for efm32 SoCsUwe Kleine-König2013-08-095-0/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | | | Merge remote-tracking branch 'spi/topic/dspi' into spi-nextMark Brown2013-09-014-0/+607
|\ \ \ \ \ \ \ \ \
OpenPOWER on IntegriCloud