aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)AuthorFilesLines
2013-07-31spi/atmel: Fix format specifier warningsEmil Goode1-9/+11
This patch fixes the following sparse warnings. dma_addr_t can be either u32 or u64 so we should cast to the largest type and use the format specifier %llx. drivers/spi/spi-atmel.c: In function ‘atmel_spi_next_xfer_dma_submit’: drivers/spi/spi-atmel.c:631:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat] drivers/spi/spi-atmel.c:631:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat] drivers/spi/spi-atmel.c: In function ‘atmel_spi_pdc_next_xfer’: drivers/spi/spi-atmel.c:734:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat] drivers/spi/spi-atmel.c:734:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat] drivers/spi/spi-atmel.c:773:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat] drivers/spi/spi-atmel.c:773:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat] Signed-off-by: Emil Goode <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-30spi/txx9: Use linux/gpio.h not asm/gpio.hMark Brown1-1/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi: spi-davinci: Fix direction in dma_map_single()Christian Eggers1-1/+1
Commit 048177ce3b3962852fd34a7e04938959271c7e70 (spi: spi-davinci: convert to DMA engine API) introduced a regression: dma_map_single() is called with direction DMA_FROM_DEVICE for rx and for tx. Signed-off-by: Christian Eggers <[email protected]> Acked-by: Matt Porter <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected] # v3.7.x+
2013-07-29spi/tegra20-slink: Use core runtime PMMark Brown1-25/+1
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Stephen Warren <[email protected]>
2013-07-29spi/tegra20-sflash: Use core runtime PMMark Brown1-25/+1
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Stephen Warren <[email protected]>
2013-07-29spi/tegra114: Use core runtime PMMark Brown1-25/+1
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Stephen Warren <[email protected]>
2013-07-29spi/s3c64xx: Use core for runtime PMMark Brown1-3/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/hspi: Convert to core runtime PMMark Brown1-17/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/pxa2xx: Convert to core runtime PMMark Brown1-11/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/pl022: Convert to core runtime PMMark Brown1-20/+1
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
2013-07-29spi/omap2: Covert to core runtime PMMark Brown1-19/+1
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Felipe Balbi <[email protected]>
2013-07-29spi/coldfire-qspi: Convert to core runtime PMMark Brown1-20/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/bcm63xx: Convert to core runtime PMMark Brown1-20/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi: Provide core support for runtime PM during transfersMark Brown1-0/+16
Most SPI drivers that implement runtime PM support use identical code to do so: they acquire a runtime PM lock in prepare_transfer_hardware() and then they release it in unprepare_transfer_hardware(). The variations in this are mostly missing error checking and the choice to use autosuspend. Since these runtime PM calls are normally the only thing in the prepare and unprepare callbacks and the autosuspend API transparently does the right thing on devices with autosuspend disabled factor all of this out into the core with a flag to enable the behaviour. Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Stephen Warren <[email protected]> Acked-by: Linus Walleij <[email protected]>
2013-07-29spi/tegra-slink: Factor runtime PM out into transfer prepare/unprepareMark Brown1-7/+25
Currently the tegra slink driver acquires a runtime PM reference for the duration of each transfer. This may result in the IP being powered down between transfers which would be at best wasteful. Instead it is better to do this in the callbacks that are generated before and after starting a series of transfers, keeping the IP powered throughout. Signed-off-by: Mark Brown <[email protected]> Acked-by: Laxman Dewangan <[email protected]>
2013-07-29spi/tegra-sflash: Factor runtime PM out into transfer prepare/unprepareMark Brown1-7/+25
Currently the tegra sflash driver acquires a runtime PM reference for the duration of each transfer. This may result in the IP being powered down between transfers which would be at best wasteful. Instead it is better to do this in the callbacks that are generated before and after starting a series of transfers, keeping the IP powered throughout. Signed-off-by: Mark Brown <[email protected]> Acked-by: Laxman Dewangan <[email protected]>
2013-07-29spi/tegra114: Factor runtime PM out into transfer prepare/unprepareMark Brown1-9/+25
Currently the tegra114 driver acquires a runtime PM reference for the duration of each transfer. This may result in the IP being powered down between transfers which would be at best wasteful. Instead it is better to do this in the callbacks that are generated before and after starting a series of transfers, keeping the IP powered throughout. Signed-off-by: Mark Brown <[email protected]> Acked-by: Laxman Dewangan <[email protected]>
2013-07-29spi/orion: Convert to devm_ioremap_resource()Mark Brown1-17/+5
Signed-off-by: Mark Brown <[email protected]> Acked-by: Andrew Lunn <[email protected]>
2013-07-29spi/imx: expose module alias for loading from device-treeNiels de Vos1-0/+1
Enable auto loading by udev when spi-imx is compiled as a module. Signed-off-by: Niels de Vos <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/drivers: Enable build of drivers with COMPILE_TESTMark Brown1-14/+14
Enable the build of drivers which don't have any real build time dependency on their architecture or platform with COMPILE_TEST, providing better build time coverage. Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/orion: Directly include linux/size.hMark Brown1-0/+1
Signed-off-by: Mark Brown <[email protected]>
2013-07-28spi/atmel: Annotate lock/unlock functionsMark Brown1-2/+2
Let checkers like sparse know that the locking imbalances are intentional in these functions. Signed-off-by: Mark Brown <[email protected]>
2013-07-28spi/sh-msiof: Remove unneeded empty runtime PM callbacksMark Brown1-18/+0
Previously the runtime PM API insisted on having callbacks for everything but this requirement was removed a while ago so the empty callbacks can also be removed. Signed-off-by: Mark Brown <[email protected]>
2013-07-28spi/sh-hspi: Remove noisy printMark Brown1-2/+0
This adds no meaningful value. Signed-off-by: Mark Brown <[email protected]>
2013-07-25spi: davinci: Update configs to make it selectable on KeystoneSantosh Shilimkar1-1/+1
Keystone2 SOCs share the SPI IP block with DaVinci based SOCs. Update the config bits so that its usable on Keystone2 based SOCs. Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24spi: s3c64xx: fix casting warningJingoo Han1-4/+4
sdd->ops->request is unsigned int, not unsigned long. Also, sdd->rx_dma.ch is a 'struct dma_chan *'. Thus, (void *) is converted to (struct dma_chan *)(unsigned long), in order to fix possible sparse warnings. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24spi: s3c64xx: fix printk warningsJingoo Han1-2/+2
Fix the following build warnings when LPAE is enabled: drivers/spi/spi-s3c64xx.c:1466:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat] drivers/spi/spi-s3c64xx.c:1466:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t' [-Wformat] Use vsprintf extension %pR to format resource. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24spi: s3c64xx: fix checkpatch error and warningsJingoo Han1-8/+8
Fix the following checkpatch error and warnings: ERROR: "(foo*)" should be "(foo *)" WARNING: line over 80 characters WARNING: quoted string split across lines Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24spi/s3c64xx: Remove unused message queueMark Brown1-21/+0
Since the driver has been converted to use the core message pump code the only use of the messsage queue in the driver is a check to see if it is empty which will always succeed since nothing ever adds to the queue. Just remove the queue. Signed-off-by: Mark Brown <[email protected]> Acked-by: Kukjin Kim <[email protected]>
2013-07-24spi: bcm2835: don't check resource with devm_ioremap_resourceWolfram Sang1-6/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-22spi: spi-mxs: Remove unneeded check for platform_get_resource()Fabio Estevam1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-18driver: spi: Modify core to compute the message lengthSourav Poddar1-0/+1
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-17spi: spi-bitbang: Fix conversion of spi_bitbang_transfer_one()Fabio Estevam1-3/+4
Since commit 2025172e3 (spi/bitbang: Use core message pump), the following kernel crash is seen: Unable to handle kernel NULL pointer dereference at virtual address 0000000d pgd = 80004000 [0000000d] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 1 PID: 48 Comm: spi32766 Not tainted 3.11.0-rc1+ #4 task: bfa3e580 ti: bfb90000 task.ti: bfb90000 PC is at spi_bitbang_transfer_one+0x50/0x248 LR is at spi_bitbang_transfer_one+0x20/0x248 ... ,and also the following build warning: drivers/spi/spi-bitbang.c: In function 'spi_bitbang_start': drivers/spi/spi-bitbang.c:436:31: warning: assignment from incompatible pointer type [enabled by default] In order to fix it, we need to change the first parameter of spi_bitbang_transfer_one() to 'struct spi_master *master'. Tested on a mx6qsabrelite by succesfully probing a SPI NOR flash. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-17spi/xilinx: signedness issue checking platform_get_irq()Dan Carpenter1-1/+1
In xilinx_spi_probe() we use xspi->irq to store negative error codes so it has to be signed. We weren't going to use the upper bit any way so this is fine. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-17spi/bitbang: Use core message pumpMark Brown1-70/+30
Convert drivers using bitbang to use the core mesasge pump infrastructure, saving some code and meaning that these drivers get to take advantage of work done on improving the core implementation. Signed-off-by: Mark Brown <[email protected]>
2013-07-17spi: spi-ep93xx: convert to the queued driver infrastructureH Hartley Sweeten1-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 <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-17spi: atmel: prepare clk before calling enableBoris BREZILLON1-5/+7
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15Merge remote-tracking branch 'spi/fix/xilinx' into spi-linusMark Brown1-0/+16
2013-07-15Merge remote-tracking branch 'spi/fix/setup' into spi-linusMark Brown2-0/+25
2013-07-15Merge remote-tracking branch 'spi/fix/s3c64xx' into spi-linusMark Brown1-0/+3
2013-07-15spi/xilinx: Simplify irq allocationMichal Simek1-13/+16
Use devm_request_irq() for irq allocation which simplify driver code. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi/xilinx: Use of_property_read_u32 for reading value from nodeMichal Simek1-11/+3
It simplifies driver probing. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi/xilinx: Clean ioremap callingMichal Simek1-9/+4
devm_ioremap_resource() automatically checks that struct resource is initialized. Also group platform_get_resource() and devm_ioremap_resource() together. And remove mem resource from struct xilinx_spi. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi/xilinx: Remove CONFIG_OF from the driverMichal Simek1-2/+0
dev.of_node is in struct device all the time. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi/xilinx: Refer to platform device as pdev in probe() and remove()Mark Brown1-16/+17
This is a more traditional name and makes things a bit clearer when referring to actual struct devices as we do frequently during probe(). Signed-off-by: Mark Brown <[email protected]> Acked-by: Michal Simek <[email protected]>
2013-07-15spi/xilinx: Remove remains of of_platform device registrationMark Brown1-82/+63
In the past there used to be a separate platform device type for device tree systems so the probe and removal functions were split into generic and bus sections. Since this is no longer the case simplify the code (and remove some unprototyped exports) by factoring everything into the bus probe() and remove(). Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi/xilinx: Convert to devm_ioremap_resource()Mark Brown1-15/+5
Saves code and reduces the possibility of error. Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi: tle62x0: dump small buffers using %*phAndy Shevchenko1-2/+1
We have nice specifier in kernel for that. It changes separator from ',' (comma) to space, though it's not a big deal since it's just a debug message. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi: tegra114: remove redundant dev_err call in tegra_spi_probe()Wei Yongjun1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-15spi: sirf: add missed spi mode_bits that SiRFSoC hardware supportsQipan Li1-0/+1
Missing this will cause some user cases fail when they want to change spi transfer mode. Signed-off-by: Qipan Li <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Mark Brown <[email protected]>