20 Aug, 2015
1 commit
-
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.Signed-off-by: Rob Herring
Cc: Dan Williams
Cc: Vinod Koul
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul
19 Aug, 2015
16 commits
-
The new Solo X has more requirements for SDMA events. So it creates
a event mux to remap most of event numbers in GPR (General Purpose
Register). If we want to use SDMA support for those module who do
not get the even number as default, we need to configure GPR first.Thus this patch adds this support of GPR event remapping configuration
to the SDMA driver.Signed-off-by: Zidan Wang
Signed-off-by: Vinod Koul -
In cyclic mode, the round chaining has been broken by the introduction
of at_xdmac_queue_desc(): AT_XDMAC_MBR_UBC_NDE is set for all descriptors
excepted for the last one. at_xdmac_queue_desc() has to be called one
more time to chain the last and the first descriptors.Signed-off-by: Ludovic Desroches
Fixes: 0d0ee751f7f7 ("dmaengine: xdmac: Rework the chaining logic")
Signed-off-by: Vinod Koul -
Tasklets may have been scheduled as a result of an earlier interrupt
that could still be running. Kill them before unregistering the
device.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
We must explicitly free the IRQ before the device is unregistered in
case any device interrupt still occurs, so there's no point in using
the managed variations of the IRQ functions. Change to the regular
versions.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
The header just includes definitions of hardware-specific numbers which
can be written directly in the device tree, there's no need for a public
header containing these definitions.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
When scanning for a free DMA channel, the filter function should ensure
that the channel is on the controller that it was requested to be on in
the DT.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
When the DT requests a specific channel to use it is not necesssary
to scan through all DMA channels in the system. Just return the
requested channel using dma_get_slave_channel().Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
There are a some signedness bugs such as testing for < 0 on unsigned
return values. Additionally there are some cases where functions which
should return NULL on error actually return a PTR_ERR value which can
result in oopses on error. Fix these issues.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
For some reason the controller does not support 8 byte transfers (but
does support all other powers of 2 up to 128). In this case fall back
to 4 bytes. In addition, fall back to 128 bytes when any larger power
of 2 would be possible within the alignment constraints, as this is
the maximum supported.It makes no sense to outright reject 8 or >128 bytes just because the
alignment constraints make those the maximum possible size given the
parameters for the transaction. For instance, this can result in a DMA
from/to an 8 byte aligned address failing.It is perfectly safe to fall back to smaller transfer sizes, the only
consequence is reduced transfer efficiency, which is far better than
not allowing the transfer at all.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
Several function prototypes did not match the dmaengine API they were
implementing, resulting in build warnings. Correct these.Signed-off-by: Alex Smith
Cc: Vinod Koul
Cc: Zubair Lutfullah Kakakhel
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
If DMA interrupt comes and is latched by IRQ controller during the
execution of dma_terminate_all(), dma_irq routine will be executed
after dma terminated, and it will cause kernel panic.
We clear DMA interrupts in dma_terminate_all() to avoid this useless
interrupt.Signed-off-by: Yanchang Li
Signed-off-by: Barry Song
Signed-off-by: Vinod Koul -
Add device tree bindings documentation for the
lpc1850-dmamux DMA router.Signed-off-by: Joachim Eastwood
Signed-off-by: Vinod Koul -
Add support for DMA on NXP LPC18xx/43xx platforms which has
a multiplexer in front of the PL080 dma request lines.The mux is a single register in the LPC18xx/43xx CREG block
and can multiplex up to 4 request lines to each of the 16
lines on the PL080.Signed-off-by: Joachim Eastwood
Signed-off-by: Vinod Koul -
This introduces device tree bindings for the PL08x DMA controllers
when used with fixed signal assignment per channel, i.e. if each
channel on the PL08x is assigned precisely one burst/single signal
set.[je: remove channel sub-node parsing, use cell value to assign AHB]
Signed-off-by: Linus Walleij
Signed-off-by: Joachim Eastwood
Signed-off-by: Vinod Koul -
Add support for assigning DMA channels from a device tree.
[je: remove channel sub-node parsing, dynamic channel creation on xlate]
Signed-off-by: Linus Walleij
Signed-off-by: Joachim Eastwood
Signed-off-by: Vinod Koul -
This fixes the following error:
drivers/dma/pxa_dma.c: In function ‘dbg_show_requester_chan’:
drivers/dma/pxa_dma.c:192:2: error: void value not ignored as it ought to be
pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx);
^
drivers/dma/pxa_dma.c:197:8: error: void value not ignored as it ought to be
!!(drcmr & DRCMR_MAPVLD));
^
scripts/Makefile.build:258: recipe for target 'drivers/dma/pxa_dma.o' failedSigned-off-by: Robert Jarzmik
Signed-off-by: Vinod Koul
17 Aug, 2015
20 commits
-
Inline function __dma_request_slave_channel_compat() doesn't modify "name"
argument but passes it to dma_request_slave_channel() which already takes
it as a constant.Signed-off-by: Jarkko Nikula
Signed-off-by: Vinod Koul -
Don't use the direction passed in the configuration, and rely on each
transfer's direction to prepare the transfers. This will enable
future removal of direction parameter from dma_slave_config.Signed-off-by: Robert Jarzmik
Signed-off-by: Vinod Koul -
This adds new descriptor flag for reusing a descriptor by submitting
multiple times by a client, for example video buffer.
Add helper APIs for this as wellSigned-off-by: Vinod Koul
Acked-by:Robert Jarzmik -
Signed-off-by: Vinod Koul
Acked-by:Robert Jarzmik -
As discussed recently the meaning of DMA_CTRL_ACK is that a desc cannot be
reused by provider until the client acknowledges receipt, i.e. has has a
chance to establish any dependency chains. So update documentationSigned-off-by: Vinod Koul
Acked-by:Robert Jarzmik -
IOAT_COMPLETION_PENDING flag was deprecated for v2 and v3 drivers but was
not cleaned up. Doing that now. The commit deprecated this flag was
4dec23d7 ioatdma: fix race between updating ioat->head and
IOAT_COMPLETION_PENDING.Signed-off-by: Dave Jiang
Signed-off-by: Vinod Koul -
./scripts/kerne-doc is reporting errors on dma.h. Clean up all reported
errors.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Since we are a "single" device driver now we no longer require the function
pointers in ioatdma_device. Remove.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Moving the relevant functions to their respective .c files and removal of
dma_v3.c file. Also removed various ioat3 references when appropriate.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Move all DMA descriptor prepping functions to prep.c file. Fixup all
broken bits caused by the move.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Moving all the init routines to init.c and fixup anything broken during
the move.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Move and fixup all sysfs related bits to sysfs.c file.
Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Clean out dma_v2 and remove ioat2 calls since we are moving everything
to just ioat.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Changing the variable names for ioatdma_device to be consistently named
ioat_dma instead of device/dma in order to avoid confusion and distinct
from struct device. This will clearly indicate that it is an
ioatdma_device. This also make all the naming consistent that the dma
device is ioat_dma and all the channels are ioat_chan.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Kill the common ioatdma channel structure and everything that is not
dma_chan to be ioat_dma_chan. Since we don't have to worry about v1
and v2 ioatdma anymore this makes it much cleaner and obvious for
maintenance.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Removal of support for ioatdma v2 device support.
Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Cleaning up of ioat1 specific code as it is no longer supported
Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
Removal of any devices that are ioatdma pre-3.0. This is the first step
in attempting to clean up the ioatdma driver and remove hw no longer
supported.Signed-off-by: Dave Jiang
Acked-by: Dan Williams
Signed-off-by: Vinod Koul -
If the allocation order is 16, then the u16 count will overflow and wrap
to zero when assigned the value 1 << 16.Change the type of 'total_descs' to int, so that it is large enough to
store a value equal or greater than 1 << 16.Signed-off-by: Allen Hubbe
Acked-by: Dave Jiang
Signed-off-by: Vinod Koul -
If the allocation order is 16, then the u16 index will overflow and wrap
to zero instead of being equal or greater than 1 << 16. The loop
condition will always be true, and the loop will run until all the
memory resources are depleted.Change the type of index 'i' to u32, so that it is large enough to store
a value equal or greater than 1 << 16.Signed-off-by: Allen Hubbe
Acked-by: Dave Jiang
Signed-off-by: Vinod Koul
06 Aug, 2015
3 commits
-
The functions irq_irq_err and ipu_irq_fn are identical plus/minus the
comments. Remove one.Signed-off-by: Thomas Gleixner
Cc: Vinod Koul
Cc: Dan Williams
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
The irq argument of most interrupt flow handlers is unused or merily
used instead of a local variable. The handlers which need the irq
argument can retrieve the irq number from the irq descriptor.Search and update was done with coccinelle and the invaluable help of
Julia Lawall.Signed-off-by: Thomas Gleixner
Cc: Julia Lawall
Cc: Vinod Koul
Cc: Dan Williams
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul -
The XDMAC also supports memset operations over discontiguous areas. Add the
necessary logic to support this.Signed-off-by: Maxime Ripard
Acked-by: Ludovic Desroches
Signed-off-by: Vinod Koul