- 22 4月, 2016 1 次提交
-
-
由 Thomas Petazzoni 提交于
The SPI controller managed by the spi-orion is used on the new ARM64 Marvell Armada 7K/8K SoCs. In order to allow this driver to be built for this platform, we allow it to be selected for ARCH_MVEBU=y configurations. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 3月, 2016 1 次提交
-
-
由 Javier Martinez Canillas 提交于
The spi_split_transfers_maxsize() gfp parameter is missing in the function kernel-doc so building gives the following warning: .//drivers/spi/spi.c:2359: warning: No description found for parameter 'gfp' Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2016 2 次提交
-
-
由 Shawn Lin 提交于
rsd_nsecs is defined as u8 memeber of struct rockchip_spi, but using of_property_read_u32. That means we take risk of truncation by type conversion if we pass on big value from dt. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
Remove some of unused header files and reoder it into alphabetical order. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 3月, 2016 5 次提交
-
-
由 Andy Shevchenko 提交于
The device which is actually does DMA may have a limitation of the maximum segment size. Respect this setting when preparing scatter-gather list. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
Let's defer probing the driver if the return value of dma_request_slave_channel is ERR_PTR(-EPROBE_DEFER) instead of disabling dma capability directly. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
dmaengine_terminate_all is deprecated, let's use dmaengine_terminate_async for interrupt handling. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
We should check return value of dmaengine_prep_slave_sg, otherwise we take risk of null pointer. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jon Hunter 提交于
The function __spi_pump_messages() is called by spi_pump_messages() and __spi_sync(). The function __spi_sync() has an argument 'bus_locked' that indicates if it is called with the SPI bus mutex held or not. If 'bus_locked' is false then __spi_sync() will acquire the mutex itself. Commit 556351f1 ("spi: introduce accelerated read support for spi flash devices") made a change to acquire the SPI bus mutex within __spi_pump_messages(). However, this change did not check to see if the mutex is already held. If __spi_sync() is called with the mutex held (ie. 'bus_locked' is true), then a deadlock occurs when __spi_pump_messages() is called. Fix this deadlock by passing the 'bus_locked' state from __spi_sync() to __spi_pump_messages() and only acquire the mutex if not already held. In the case where __spi_pump_messages() is called from spi_pump_messages() it is assumed that the mutex is not held and so call __spi_pump_messages() with 'bus_locked' set to false. Finally, move the unlocking of the mutex to the end of the __spi_pump_messages() function to simplify the code and only call cond_resched() if there are no errors. Fixes: 556351f1 ("spi: introduce accelerated read support for spi flash devices") Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 3月, 2016 1 次提交
-
-
由 Alexander Kochetkov 提交于
16-bit transfers must be in big endian mode on wire. Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 3月, 2016 1 次提交
-
-
由 Huibin Hong 提交于
Rockchip_spi_set_cs could be called by spi_setup, but spi_setup may be called by device driver after runtime suspend. Then the spi clock is closed, rockchip_spi_set_cs may access the spi registers, which causes cpu block in some socs. Fixes: 64e36824 ("spi/rockchip: add driver for Rockchip RK3xxx") Signed-off-by: NHuibin Hong <huibin.hong@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 3月, 2016 1 次提交
-
-
由 Jarkko Nikula 提交于
Commit b36f09c3 ("dmaengine: Add transfer termination synchronization support") marked dmaengine_terminate_all() as deprecated and is being replaced by explicit synchronous and asynchronous terminate functions. Here DMA termination are done in two cases: FIFO overrun and module removal. FIFO overrun is handled in interrupt context and converting dmaengine_terminate_all() to dmaengine_terminate_async() does the same than before. Using synchronous termination in module removal however adds a bit more robustness as it waits all completion callbacks have finished. Although it looks all known DMA engines used with spi-pxa2xx don't implement device_synchronize() callback so this too appears to be a no-op in practice. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 3月, 2016 1 次提交
-
-
由 Jarkko Nikula 提交于
Add support for third Intel Broxton variant and update comment for A-Step variant. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: NSteve Sakoman <steve.sakoman@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 2月, 2016 9 次提交
-
-
由 Arnd Bergmann 提交于
The spi_lp8841_rtc_probe() function misses an initialization of the return code when it fails to get its memory resource, as gcc notices: drivers/spi/spi-lp8841-rtc.c: In function 'spi_lp8841_rtc_probe': drivers/spi/spi-lp8841-rtc.c:239:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the code to propagate the error from devm_ioremap_resource(). Fixes: 7ecbfff6 ("spi: master driver to enable RTC on ICPDAS LP-8841") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Tested-by: NSergei Ianovich <ynvich@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
The driver tries to be clever by only setting up DMA channels when the corresponding sg tables are non NULL. The sg tables are embedded structs in struct spi_transfer, so they are guaranteed to be non NULL which makes the if(tx)/if(rx) tests completely bogus. The driver even sets the SPI_MASTER_MUST_RX / SPI_MASTER_MUST_TX flags which makes sure the sg tables are not only present but also non empty. Drop the tests and make the DMA path easier to follow. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
Now that the config function knows whether we are doing DMA or not we can do the necessary register setup in the config function and no longer have to do this in the trigger function. With this the trigger function becomes a no-op for DMA, so instead of testing if we are doing DMA or not in the trigger function we simply no longer call it in the DMA case. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
The watermark levels in the DMA register are write only, the driver should never have to read them back from the hardware. Replace the current _MASK and _OFFSET defines with defines taking the watermark level directly. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
This reverts patch 1476253c (spi: imx: fix ecspi mode setup) The patch tried to fix something by clearing bits in the cfg variable, but cfg is initialized to zero on function entry. There are no bits to clear. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
DMA transfer for SPI was limited to up to 8 bits word size until now. Sync in SPI burst size and DMA bus width is necessary to correctly support 16 and 32 BPW. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
There's no need for an extra dma_is_inited variable when we can equally well check for the existence of a DMA channel. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
When the MX51_ECSPI_DMA is configured we control every single bit of the register, so there's no need to read/modify/write it. Instead just write the value we want to have in the register. Also, drop unnecessary check if we are actually doing DMA. The values written to the register have no effect in PIO mode and value written there during the last DMA transfer is still in the register, so we can equally well always write a value. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sascha Hauer 提交于
The SoC specific config function does not know if DMA will be used or not. This information will be useful to configure the SPI controller correctly for DMA in following patches, so initialize the usedma variable before calling into the SoC specific config function. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 2月, 2016 2 次提交
-
-
由 Sascha Hauer 提交于
At the moment the driver decides to fallback to PIO mode the buffers are already mapped for DMA. It's a bug to access them with the CPU afterwards, so we cannot just fallback to PIO mode. It should not be necessary anyway, since we only use DMA when we verified that it's possible in the fist place, so when prep_slave_sg fails it's a bug, either in the SDMA driver or in the can_dma implementation. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sergei Ianovich 提交于
ICP DAS LP-8841 contains a DS-1302 RTC. This driver provides an SPI master which makes the RTC usable. The driver is not supposed to work with anything else. The driver uses the standard MicroWire half-duplex transfer timing. Master output is set on low clock and sensed by the RTC on the rising edge. Master input is set by the RTC on the trailing edge and is sensed by the master on low clock. Signed-off-by: NSergei Ianovich <ynvich@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 2月, 2016 1 次提交
-
-
由 Masanari Iida 提交于
This patch fix following warnings while make xmldocs. .//drivers/spi/spi.c:2354: warning: Excess function parameter 'message' description in 'spi_split_transfers_maxsize' .//drivers/spi/spi.c:2354: warning: Excess function parameter 'max_size' description in 'spi_split_transfers_maxsize' Signed-off-by: NMasanari Iida <standby24x7@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 2月, 2016 2 次提交
-
-
由 Leif Liddy 提交于
WildcatPoint PCH as seen on MacBook 12-inch (Early 2015) has a PCI enabled SPI controller. Enable it by adding its ID to the corresponding driver. The ACPI enumerated name for this SPI controller (found in spi-pxa2xx.c) is INT33C1. Therefore, we associate the SPI controller with the corresponding type of LPSS_LPT_SSP. Signed-off-by: NLeif Liddy <leif.liddy@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jarkko Nikula 提交于
Only legacy PXA DMA implementation was using these rx_dma and tx_dma DMA addresses so they are not needed after commit 6356437e ("spi: spi-pxa2xx: remove legacy PXA DMA bits"). Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 2月, 2016 4 次提交
-
-
由 Anton Bondarenko 提交于
Fixed timeout value can fire while transaction is ongoing. This may happen because there are no strict requirements on SPI transaction duration. Dynamic timeout value is generated based on SCLK and transaction size. There is also 4 * SCLK delay between TX bursts related to HW internal CS change. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gao Pan 提交于
In spi_imx_dma_transfer(), when desc_rx = dmaengine_prep_slave_sg() fails, the context goes to label no_dma and then return. However, the memory allocated for desc_tx has not been freed yet, which leads to resource leak. Signed-off-by: NGao Pan <pandy.gao@nxp.com> Reviewed-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mark Brown 提交于
When a controller has only PIO support it is very likely that we will run into use cases where we spend a very large amount of time consuming CPU. Code that does this should call cond_resched() every once in a while to give other tasks more of a chance to run so do that in the main SPI loop, the overhead is negligable if it's not needed. Suggested-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
Add missing docbook documentation for the gfp parameter in function spi_replace_transfers. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 2月, 2016 4 次提交
-
-
由 Simon Horman 提交于
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Xu Jianqun 提交于
Add devicetree bindings for Rockchip rk3399 spi which found on Rockchip rk3399 SoCs. Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Use min_t(size_t,..) in order to avoid the following build warning on ARM64: include/linux/kernel.h:754:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ drivers/spi/spi.c:2304:17: note: in expansion of macro 'min' xfers[0].len = min(maxsize, xfer[0].len); Suggested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Acked-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Use %zu for printing 'size_t' type in order to fix the following build warning on ARM64: drivers/spi/spi.c: In function '__spi_split_transfer_maxsize': drivers/spi/spi.c:2278:2: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=] Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 2月, 2016 3 次提交
-
-
由 Sascha Hauer 提交于
Add a struct device * member to the private driver data and use it to print messages using dev_* functions rather than pr_*. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
RX DMA tail data handling doesn't work correctly in many cases with current implementation. It happens because SPI core was setup to generates both RX and RX TAIL events. And RX TAIL event does not work correctly. This can be easily verified by sending SPI transaction with size modulus WML(32 in our case) not equal 0. Also removing change introduced in f6ee9b58 since this change only fix usecases with transfer size from 33 to 128 bytes and doesn't fix 129 bytes and bigger. This is output from transaction with len 138 bytes in loopback mode at 10Mhz: TX0000: a3 97 a2 55 53 be f1 fc f9 79 6b 52 14 13 e9 e2 TX0010: 2d 51 8e 1f 56 08 57 27 a7 05 d4 d0 52 82 77 75 TX0020: 1b 99 4a ed 58 3d 6a 52 36 d5 24 4a 68 8e ad 95 TX0030: 5f 3c 35 b5 c4 8c dd 6c 11 32 3d e2 b4 b4 59 cf TX0040: ce 23 3d 27 df a7 f9 96 fc 1e e0 66 2c 0e 7b 8c TX0050: ca 30 42 8f bc 9f 7b ce d1 b8 b1 87 ec 8a d6 bb TX0060: 2e 15 63 0e 3c dc a4 3a 7a 06 20 a7 93 1b 34 dd TX0070: 4c f5 ec 88 96 68 d6 68 a0 09 6f 8e 93 47 c9 41 TX0080: db ac cf 97 89 f3 51 05 79 71 RX0000: a3 97 a2 55 53 be f1 fc f9 79 6b 52 14 13 e9 e2 RX0010: 2d 51 8e 1f 56 08 57 27 a7 05 d4 d0 52 82 77 75 RX0020: 1b 99 4a ed 58 3d 6a 52 36 d5 24 4a 68 8e ad 95 RX0030: 5f 3c 35 00 00 b5 00 00 00 c4 00 00 8c 00 00 dd RX0040: 6c 11 32 3d e2 b4 b4 59 cf ce 23 3d 27 df a7 f9 RX0050: 96 fc 1e e0 66 2c 0e 7b 8c ca 30 42 8f 1f 1f bc RX0060: 9f 7b ce d1 b8 b1 87 ec 8a d6 bb 2e 15 63 0e ed RX0070: ed 3c 58 58 58 dc 3d 3d a4 6a 6a 3a 52 52 7a 36 RX0080: 06 20 a7 93 1b 34 dd 4c f5 ec Zeros at offset 33 and 34 caused by reading empty RX FIFO which not possible if DMA RX read was triggered by RX event. This mean DMA was triggered by RX TAIL event. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jarkko Nikula 提交于
These structure members were removed in 2012 by the commit ffbbdd21 ("spi: create a message queueing infrastructure"). Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 2月, 2016 2 次提交
-
-
由 Shawn Lin 提交于
xfer_completion isn't been used anywhere, so it can be removed. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephan Olbrich 提交于
The auxiliary spi supports only CPHA=0 modes as the first bit is always output to the pin before the first clock cycle. In CPHA=1 modes the first clock edge outputs the second bit hence the slave can never read the first bit. Also the CPHA registers switch between clocking data in/out on rising/falling edge hence depend on the CPOL setting. Signed-off-by: NStephan Olbrich <stephanolbrich@gmx.de> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-