11 Sep, 2014
1 commit
-
We need to make sure to deqeueue the descriptor from the active list before
we call vchan_cookie_complete(). Also we need obviously only set chan->desc
to NULL after we stopped using it.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Vinod Koul
11 Aug, 2014
1 commit
-
Pull slave-dma updates from Vinod Koul:
"Some notable changes are:
- new driver for AMBA AXI NBPF by Guennadi
- new driver for sun6i controller by Maxime
- pl330 drivers fixes from Lar's
- sh-dma updates and fixes from Laurent, Geert and Kuninori
- Documentation updates from Geert
- drivers fixes and updates spread over dw, edma, freescale, mpc512x
etc.."* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (72 commits)
dmaengine: sun6i: depends on RESET_CONTROLLER
dma: at_hdmac: fix invalid remaining bytes detection
dmaengine: nbpfaxi: don't build this driver where it cannot be used
dmaengine: nbpf_error_get_channel() can be static
dma: pl08x: Use correct specifier for size_t values
dmaengine: Remove the context argument to the prep_dma_cyclic operation
dmaengine: nbpfaxi: convert to tasklet
dmaengine: nbpfaxi: fix a theoretical race
dmaengine: add a driver for AMBA AXI NBPF DMAC IP cores
dmaengine: add device tree binding documentation for the nbpfaxi driver
dmaengine: edma: Do not register second device when booted with DT
dmaengine: edma: Do not change the error code returned from edma_alloc_slot
dmaengine: rcar-dmac: Add device tree bindings documentation
dmaengine: shdma: Allocate cyclic sg list dynamically
dmaengine: shdma: Make channel filter ignore unrelated devices
dmaengine: sh: Rework Kconfig and Makefile
dmaengine: sun6i: Fix memory leaks
dmaengine: sun6i: Free the interrupt before killing the tasklet
dmaengine: sun6i: Remove switch statement from buswidth convertion routine
dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selected
...
09 Aug, 2014
1 commit
-
Fixes a compilation error when RESET_CONTROLLER is not enabled in the
configuration.drivers/dma/sun6i-dma.c: In function 'sun6i_dma_probe':
drivers/dma/sun6i-dma.c:911:2: error: implicit declaration of function 'devm_reset_control_get' [-Werror=implicit-function-declaration]Signed-off-by: Maxime Ripard
Reported-by: Randy Dunlap
Signed-off-by: Vinod Koul
08 Aug, 2014
1 commit
-
Found using smatch:
drivers/dma/at_hdmac.c:299 atc_get_bytes_left() warn: unsigned
'atchan->remain_desc' is never less than zero.Signed-off-by: Alexandre Belloni
Signed-off-by: Vinod Koul
07 Aug, 2014
2 commits
-
Although this driver doesn't have any explicit compile-time architecture
dependencies, it is better not to bloat kernels on those platforms, where
this driver isn't needed, unless a compile test is being performed.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Vinod Koul -
Pull sound updates from Takashi Iwai:
"There've been many updates in ASoC side at this time, especially the
framework enhancement for multiple CODECs on a single DAI and more
componentization works.The only major change in ALSA core is the addition of timestamp type
in sw_params field. This should behave in backward compatible way.Other than that, there are lots of small changes and new drivers in
wide range, including a large code cut in HD-audio driver for
deprecated static quirks. Some highlights are below:ALSA Core:
- Add the new timestamp type field to sw_params to choose
MONOTONIC_RAW typeHD-audio:
- Continued conversion to standard printk macros, generic code
cleanups
- Removal of obsoleted static quirk codes for Conexant and C-Media
codecs
- Fixups for HP Envy TS, Dell XPS 15, HP and Dell mute/mic LED,
Gigabyte BXBT-2807 mobo
- Intel Braswell supportASoC:
- Support for multiple CODECs attached to a single DAI, enabling
systems with for example multiple DAC/speaker drivers on a single
link, contributed by Benoit Cousson based on work from Misael Lopez
Cruz
- Support for byte controls larger than 256 bytes based on the use of
TLVs contributed by Omair Mohammed Abdullah
- More componentisation work from Lars-Peter Clausen
- The remainder of the conversions of CODEC drivers to params_width()
by Mark Brown
- Drivers for Cirrus Logic CS4265, Freescale i.MX ASRC blocks,
Realtek RT286 and RT5670, Rockchip RK3xxx I2S controllers and Texas
Instruments TAS2552
- Lots of updates and fixes, especially to the DaVinci, Intel,
Freescale, Realtek, and rcar drivers"* tag 'sound-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (402 commits)
ALSA: usb-audio: Whitespace cleanups for sound/usb/midi.*
ALSA: usb-audio: Respond to suspend and resume callbacks for MIDI input
sound/oss/pss: Remove typedefs pss_mixerdata and pss_confdata
sound/oss/opl3: Remove typedef opl_devinfo
ALSA: fireworks: fix specifiers in format strings for propper output
ASoC: imx-audmux: Use uintptr_t for port numbers
ASoC: davinci: Enable menuconfig entry for McASP
ASoC: fsl_asrc: Don't access members of config before checking it
ASoC: fsl_sarc_dma: Check pair before using it
ASoC: adau1977: Fix truncation warning on 64 bit architectures
ALSA: virtuoso: add Xonar Essence STX II support
ALSA: riptide: fix %d confusingly prefixed with 0x in format strings
ALSA: fireworks: fix %d confusingly prefixed with 0x in format strings
ALSA: hda - add codec ID for Braswell display audio codec
ALSA: hda - add PCI IDs for Intel Braswell
ALSA: usb-audio: Adjust Gamecom 780 volume level
ALSA: usb-audio: improve dmesg source grepability
ASoC: rt5670: Fix duplicate const warnings
ASoC: rt5670: Staticise non-exported symbols
ASoC: Intel: update stream only on stream IPC msgs
...
06 Aug, 2014
1 commit
-
CC: Guennadi Liakhovetski
CC: Vinod Koul
Signed-off-by: Fengguang Wu
Signed-off-by: Vinod Koul
04 Aug, 2014
6 commits
-
When printing size_t values we should use the %zd or %zx format specifier
in order to ensure the value is displayed correctly and avoid warnings from
sparse.Signed-off-by: Mark Brown
Signed-off-by: Vinod Koul -
The argument is always set to NULL and never used. Remove it.
Signed-off-by: Laurent Pinchart
Signed-off-by: Vinod Koul -
It is common among dmaengine drivers to use a tasklet for bottom half
interrupt processing. Convert nbpfaxi to do the same.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Vinod Koul -
A race possibility exists if a DMA slave driver tries to free channel
resources witout waiting for all transfers to complete and without
explicitly terminating all requests. In such a case the IRQ processing
thread can race with .device_free_chan_resources(). To fix this race empty
all descriptor lists before freeing descriptor cache.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Vinod Koul -
This patch adds a driver for NBPF DMAC IP cores from Renesas, designed for
the AMBA AXI bus.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Vinod Koul
31 Jul, 2014
5 commits
-
DT boot does not yet support more than one edma device. To avoid issues at
runtime we should not register the second device when the kernel is booted
with DT.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vinod Koul -
In case of edma_alloc_slot() failure during probe we should return the error
unchanged to make debugging easier.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vinod Koul -
The sg list used to prepare cyclic DMA descriptors is currently
allocated statically on the stack as an array of 32 elements. This makes
the shdma_prep_dma_cyclic() function consume a lot of stack space, as
reported by the compiler:drivers/dma/sh/shdma-base.c: In function ‘shdma_prep_dma_cyclic’:
drivers/dma/sh/shdma-base.c:715:1: warning: the frame size of 1056 bytes
is larger than 1024 bytes [-Wframe-larger-than=]Given the limited Linux kernel stack size, this could lead to stack
overflows. Fix the problem by allocating the sg list dynamically.Signed-off-by: Laurent Pinchart
Signed-off-by: Simon Horman
Signed-off-by: Vinod Koul -
The shdma_chan_filter() function relies on the DMA channel being
embedded in an shdma_chan structure. If this assumption isn't true, for
instance when the system contains DMA channels supported by an unrelated
driver, the function will crash.Avoid this by returning false directly when the channel belongs to an
unrelated device.Signed-off-by: Laurent Pinchart
Signed-off-by: Simon Horman
Signed-off-by: Vinod Koul -
Separate helpers and drivers in the Kconfig and Makefile to improve
readability and move the CONFIG_OF dependency from the Makefile to
Kconfig.[pebolle@tiscali.nl: reported need to rename SHDMA_R8A73A4 instances]
Reported-by: Paul Bolle
Signed-off-by: Laurent Pinchart
[horms+renesas@verge.net.au: squashed rename of SHDMA_R8A73A4 instances]
Signed-off-by: Simon Horman
Signed-off-by: Vinod Koul
30 Jul, 2014
4 commits
-
The sun6i_dma_prep_memcpy and sun6i_dma_prep_slave_sg functions were both
leaking the descriptor they allocated if an error was happening after a
successful dma_pool_alloc call.It also fixes a memleak that was happening in the scatter gather list
traversal, that was allocating as much descriptor as there was scatter gather
items, but only freeing the current descriptor if an error was to arise.Reported-by: Dan Carpenter
Signed-off-by: Maxime Ripard
Signed-off-by: Vinod Koul -
There's still a small window between the call to sun6i_kill_tasklet and the end
of the driver remove function where a spurious interrupt might trigger, and
start using deallocated resources.Replace the call to synchronize_irq by a free_irq, so that we're sure that we
won't get any further interrupts when we're deallocating resources.Signed-off-by: Maxime Ripard
Signed-off-by: Vinod Koul -
Since the conversion routine is quite trivial, we don't need this switch, and
we can just use a simple calculation.Signed-off-by: Maxime Ripard
Signed-off-by: Vinod Koul -
Select DMA_ENGINE when DMA_OF is selected since
of_dma_xlate_by_chan_id() from drivers/dma/of-dma.c uses
dma_get_slave_channel() from drivers/dma/dmaengine.cThis resolves error reported:
drivers/built-in.o: In function `of_dma_xlate_by_chan_id':
drivers/dma/of-dma.c:253: undefined reference to `dma_get_slave_channel'Signed-off-by: Alexander Popov
Reported-by: kbuild test robot
Signed-off-by: Vinod Koul
28 Jul, 2014
6 commits
-
Move the DMA channel used in cyclic mode (audio) to the highest priority
event queue which helps to reduce audio problems.
When the channel is terminated, move it back to the default queue.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vinod Koul -
If the client (audio) does not request interrupts for every period we can
disable them.
With updated audio driver stack we can play audio w/o the need to process
any edma interrupts.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vinod Koul -
The edma can report accurate DMA position so update the residue_granularity
to DMA_RESIDUE_GRANULARITY_BURST.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vinod Koul -
The sg_dma_len() returns unsigned int but we had driver print it as %zu, use
%u as documented in Documentation/printk-formats.txtdrivers/dma/sun6i-dma.c: In function ‘sun6i_dma_prep_slave_sg’:
drivers/dma/sun6i-dma.c:643: warning: format ‘%zu’ expects type ‘size_t’,
but argument 8 has type ‘unsigned int’
drivers/dma/sun6i-dma.c:661: warning: format ‘%zu’ expects type ‘size_t’,
but argument 8 has type ‘unsigned int’Reported-by: kbuild test robot
Signed-off-by: Vinod Koul -
Since the driver defined COMPILE_TEST, it gets compiled for different arch's
The driver uses __virt_to_phys() insteadof virt_to_phys, so replace itdrivers/dma/sun6i-dma.c: In function ‘sun6i_dma_dump_chan_regs’:
drivers/dma/sun6i-dma.c:203: error: implicit declaration of function '__virt_to_phys'Reported-by: kbuild test robot
Reported-by: Stephen Rothwell
Signed-off-by: Vinod Koul
26 Jul, 2014
2 commits
-
Register the controller for device tree based lookup of DMA channels
(non-fatal for backwards compatibility with older device trees) and
provide the '#dma-cells' property in the shared mpc5121.dtsi fileSigned-off-by: Alexander Popov
Signed-off-by: Vinod Koul -
This patch adds a new common OF dma xlate callback function which will match a
channel by it's id. The binding expects one integer argument which it will use to
lookup the channel by the id.Unlike of_dma_simple_xlate this function is able to handle a system with
multiple DMA controllers. When registering the of dma provider with
of_dma_controller_register a pointer to the dma_device struct which is
associated with the dt node needs to passed as the data parameter.
New function will use this pointer to match only channels which belong to the
specified DMA controller.Signed-off-by: Alexander Popov
Signed-off-by: Vinod Koul
25 Jul, 2014
6 commits
-
The Allwinner A31 has a 16 channels DMA controller that it shares with the
newer A23. Although sharing some similarities with the DMA controller of the
older Allwinner SoCs, it's significantly different, I don't expect it to be
possible to share the driver for these two.The A31 Controller is able to memory-to-memory or memory-to-device transfers on
the 16 channels in parallel.Signed-off-by: Maxime Ripard
Acked-by: Arnd Bergmann
Signed-off-by: Vinod Koul -
Commit - 653e67f7e5: "dmaengine: inherit debug settings from the subsystem
for subdirectories" introduced debug option for subdirectories too
This exposed issue with ipu driver not using return valueFor now just warn users about it
Reported-by: kbuild test robot
Signed-off-by: Vinod Koul -
Per license_is_gpl_compatible(), the MODULE_LICENSE() string for GPL v2 is
"GPL v2", not "GPLv2". Use "GPL v2" so this module doesn't taint the
kernel.Signed-off-by: Bjorn Helgaas
Acked-by: Lars-Peter Clausen
Signed-off-by: Vinod Koul -
Signed-off-by: Jingchang Lu
Tested-by: Stefan Agner
Signed-off-by: Vinod Koul -
Shared Peripheral ASRC, running on SPBA, needs to use shp sciprts for
DMA transfer. So this patch just adds a new DMATYPE for it.Signed-off-by: Nicolin Chen
Acked-by: Shawn Guo
Signed-off-by: Vinod Koul -
The filter() function is currently called by xlate() while it transfers
imx_dma_data as a local variable to the filter() but releases the data
right after returning a DMA channel pointer, which results chan->private
pointing an invalid memory space.So this patch just stores the imx_dma_data into sdmac to make usre the
private pointer valid as long as the channel exists.Signed-off-by: Nicolin Chen
Signed-off-by: Vinod Koul
23 Jul, 2014
1 commit
-
Commit 6079d38 ("dmaengine: pl330: Remove useless xfer_cb indirection")
removed the __callback() function which created an unnecessary level of
indirection to execute the tranfer callback .xfer_cbUnfortunately the commit also changed the semantics slightly since that
function used to check if the request was not NULL before attempting to
execute the callback function. Not checking this could lead to a kernel
NULL pointer dereference error.Signed-off-by: Javier Martinez Canillas
Acked-by: Lars-Peter Clausen
Signed-off-by: Vinod Koul
21 Jul, 2014
1 commit
17 Jul, 2014
1 commit
-
Select DMA_ENGINE instead of DMAENGINE and delete the default
line as the default is 'n' anyways.Link: https://lkml.org/lkml/2014/7/14/90
Reported-by: Paul Bolle
Signed-off-by: Sudeep Dutt
Signed-off-by: Greg Kroah-Hartman
16 Jul, 2014
1 commit
-
Accordingly to discussion [1] and followed up documentation the DMA controller
driver shouldn't start any DMA operations when dmaengine_submit() is called.This patch fixes the workflow in dw_dmac driver to follow the documentation.
[1] http://www.spinics.net/lists/arm-kernel/msg125987.html
Signed-off-by: Andy Shevchenko
Signed-off-by: Vinod Koul