- 07 7月, 2016 1 次提交
-
-
由 Arnd Bergmann 提交于
When building this driver on arm64, we get a harmless type mismatch warning: drivers/dma/bcm2835-dma.c: In function 'bcm2835_dma_fill_cb_chain_with_sg': include/linux/kernel.h:743:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ drivers/dma/bcm2835-dma.c:409:21: note: in expansion of macro 'min' cb->cb->length = min(len, max_len); This changes the type of the 'len' variable to size_t, which avoids the problem. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: 388cc7a2 ("dmaengine: bcm2835: add slave_sg support to bcm2835-dma") Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 01 7月, 2016 1 次提交
-
-
由 Arnd Bergmann 提交于
When building this driver on arm64, we get a harmless type mismatch warning: drivers/dma/bcm2835-dma.c: In function 'bcm2835_dma_fill_cb_chain_with_sg': include/linux/kernel.h:743:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ drivers/dma/bcm2835-dma.c:409:21: note: in expansion of macro 'min' cb->cb->length = min(len, max_len); This changes the type of the 'len' variable to size_t, which avoids the problem. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: 388cc7a2 ("dmaengine: bcm2835: add slave_sg support to bcm2835-dma") Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 08 6月, 2016 1 次提交
-
-
由 Ben Dooks 提交于
The bcm2835_dma_prep_dma_memcpy() function is not exported outside the driver, so make it static to avoid the following warning: drivers/dma/bcm2835-dma.c:616:32: warning: symbol 'bcm2835_dma_prep_dma_memcpy' was not declared. Should it be static? Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 02 5月, 2016 1 次提交
-
-
由 Martin Sperl 提交于
Fix typo in warning message that there is no "interrupt-names" property defined in the device-tree and legacy-mode is used. Also added newline to end of message. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 19 4月, 2016 1 次提交
-
-
由 Martin Sperl 提交于
Use platform_get_irq_byname to allow for correct mapping of interrupts to dma channels. The currently implemented device tree is unfortunately implemented with the wrong assumption, that each dma-channel has its own dma channel, but dma-irq 11 is handling dma-channel 11-14 and dma-irq 12 is actually a "catch all" interrupt. So here we use the byname variant and require that interrupts are explicitly named via the interrupts-name property in the device tree. The use of shared interrupts is also implemented. As a side-effect this means we can now use dma channels 12, 13 and 14 in a correct manner - also testing shows that onl using channels 11 to 14 for spi and i2s works perfectly (when playing some video) Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Acked-by: NEric Anholt <eric@anholt.net> Acked-by: NMark Rutland <mark.rutland@arm.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 15 4月, 2016 8 次提交
-
-
由 Martin Sperl 提交于
Also added check for an error condition in bcm2835_dma_create_cb_chain that showed up during development of this patch. Tested using dmatest for all enabled channels. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
Add slave_sg support to bcm2835-dma using shared allocation code for bcm2835_desc and DMA-control blocks already used by dma_cyclic. Note that bcm2835_dma_callback had to get modified to support both modes of operation (cyclic and non-cyclic). Tested using: * Hifiberry I2S card (using cyclic DMA) * fb_st7735r SPI-framebuffer (using slave_sg DMA via spi-bcm2835) playing BigBuckBunny for audio and video. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
The bcm2835 dma system has 2 basic types of dma-channels: * "normal" channels * "light" channels Lite channels are limited in several aspects: * internal data-structure is 128 bit (not 256) * does not support BCM2835_DMA_TDMODE (2D) * DMA length register is limited to 16 bit. so 0-65535 (not 0-65536 as mentioned in the official datasheet) * BCM2835_DMA_S/D_IGNORE are not supported The detection of the type of mode is implemented by looking at the LITE bit in the DEBUG register for each channel. This allows automatic detection. Based on this the maximum block size is set to (64K - 4) or to 1G and this limit is honored during generation of control block chains. The effect is that when a LITE channel is used more control blocks are used to do the same transfer (compared to a normal channel). As there are several sources/target DREQS that are 32 bit wide we need to have the transfer to be a multiple of 4 as this would break the transfer otherwise. This is why the limit of (64K - 4) was chosen over the alternative of (64K - 4K). Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
In preparation of adding slave_sg functionality this patch moves the generation/allocation of bcm2835_desc and the building of the corresponding DMA-control-block chain from bcm2835_dma_prep_dma_cyclic into the newly created method bcm2835_dma_create_cb_chain. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
In preparation to consolidating code we move the cyclic member into the bcm_2835_desc structure. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
Add additional defines describing the DMA registers as well as adding some more documentation to those registers. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
The original patch contained 3 dma channels that were masked out. These - as far as research and discussions show - are a artefacts remaining from the downstream legacy dma-api. Right now down-stream still includes a legacy api used only in a single (downstream only) driver (bcm2708_fb) that requires 2D DMA for speedup (DMA-channel 0). Formerly the sd-card support driver also was using this legacy api (DMA-channel 2), but since has been moved over to use dmaengine directly. The DMA-channel 3 is already masked out in the devicetree in the default property "brcm,dma-channel-mask = <0x7f35>;" So we can remove the whole masking of DMA channels. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Martin Sperl 提交于
bcm2835-dma supports residue reporting at burst level but didn't report this via the residue_granularity field. See also: https://github.com/raspberrypi/linux/commit/b015555327afa402f70ddc86e3632f59df1cd9d7 for the downstream patch. Signed-off-by: NMatthias Reichl <hias@horus.com> Signed-off-by: NNoralf Trønnes <noralf@tronnes.org> Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 05 12月, 2015 1 次提交
-
-
由 Peter Ujfalusi 提交于
f9317829 dmaengine: bcm2835-dma: Fix memory leak when stopping a running transfer Fixed the memleak, but introduced another issue: the terminate_all callback might be called with interrupts disabled and the dma_free_coherent() is not allowed to be called when IRQs are disabled. Convert the driver to use dma_pool_* for managing the list of control blocks for the transfer. Fixes: f9317829 ("dmaengine: bcm2835-dma: Fix memory leak when stopping a running transfer") Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: NMatthias Reichl <hias@horus.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 31 3月, 2015 1 次提交
-
-
由 Peter Ujfalusi 提交于
The vd->node is removed from the lists when the transfer started so the vchan_get_all_descriptors() will not find it. This results memory leak. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 22 12月, 2014 3 次提交
-
-
由 Maxime Ripard 提交于
Now that the generic slave caps code can make use of the device assigned capabilities, instead of relying on a callback to be implemented. Make use of this code. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Maxime Ripard 提交于
Split the device_control callback of the Broadcom BCM2835 DMA driver to make use of the newly introduced callbacks, that will eventually be used to retrieve slave capabilities. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Maxime Ripard 提交于
The dmaengine header abbreviates destination as at least two different strings. Make a coherent use of a single one. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NMark Brown <broonie@kernel.org> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 06 11月, 2014 2 次提交
-
-
由 Kiran Padwal 提交于
There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: NKiran Padwal <kiran.padwal@smartplayin.com> [for nvidia] Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Maxime Ripard 提交于
chanctnt is already filled by dma_async_device_register, which uses the channel list to know how much channels there is. Since it's already filled, we can safely remove it from the drivers' probe function. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 8月, 2014 1 次提交
-
-
由 Laurent Pinchart 提交于
The argument is always set to NULL and never used. Remove it. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 20 1月, 2014 1 次提交
-
-
由 Florian Meier 提交于
Without DMA_PRIVATE the driver is not able to allocate more than one channel. Since it uses dma_get_any_slave_channel that calls private_candidate, the second allocation fails at /* some channels are already publicly allocated */ Maybe it should be fixed in the core, but at least this fixes the bug. Signed-off-by: NFlorian Meier <florian.meier@koalo.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 08 1月, 2014 1 次提交
-
-
由 Florian Meier 提交于
Add support for DMA controller of BCM2835 as used in the Raspberry Pi. Currently it only supports cyclic DMA. Signed-off-by: NFlorian Meier <florian.meier@koalo.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-