16 Nov, 2013

1 commit

  • Pull dmaengine changes from Dan

    1/ Bartlomiej and Dan finalized a rework of the dma address unmap
    implementation.

    2/ In the course of testing 1/ a collection of enhancements to dmatest
    fell out. Notably basic performance statistics, and fixed / enhanced
    test control through new module parameters 'run', 'wait', 'noverify',
    and 'verbose'. Thanks to Andriy and Linus for their review.

    3/ Testing the raid related corner cases of 1/ triggered bugs in the
    recently added 16-source operation support in the ioatdma driver.

    4/ Some minor fixes / cleanups to mv_xor and ioatdma.

    Conflicts:
    drivers/dma/dmatest.c

    Signed-off-by: Vinod Koul

    Vinod Koul
     

15 Nov, 2013

2 commits

  • Remove no longer needed DMA unmap flags:
    - DMA_COMPL_SKIP_SRC_UNMAP
    - DMA_COMPL_SKIP_DEST_UNMAP
    - DMA_COMPL_SRC_UNMAP_SINGLE
    - DMA_COMPL_DEST_UNMAP_SINGLE

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Acked-by: Jon Mason
    Acked-by: Mark Brown
    [djbw: clean up straggling skip unmap flags in ntb]
    Signed-off-by: Dan Williams

    Bartlomiej Zolnierkiewicz
     
  • Use the generic unmap object to unmap dma buffers.

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Reported-by: Bartlomiej Zolnierkiewicz
    [bzolnier: add missing unmap->len initialization]
    [bzolnier: fix whitespace damage]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    [djbw: add DMA_ENGINE=n support]
    Signed-off-by: Dan Williams

    Dan Williams
     

14 Nov, 2013

2 commits

  • Hang a common 'unmap' object off of dma descriptors for the purpose of
    providing a unified unmapping interface. The lifetime of a mapping may
    span multiple descriptors, so these unmap objects are reference counted
    by related descriptor.

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    [bzolnier: fix IS_ENABLED() check]
    [bzolnier: fix release ordering in dmaengine_destroy_unmap_pool()]
    [bzolnier: fix check for success in dmaengine_init_unmap_pool()]
    [bzolnier: use mempool_free() instead of kmem_cache_free()]
    [bzolnier: add missing unmap->len initializations]
    [bzolnier: add __init tag to dmaengine_init_unmap_pool()]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    [djbw: move DMAENGINE=n support to this patch for async_tx]
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Add a hook for a common dma unmap implementation to enable removal of
    the per driver custom unmap code. (A reworked version of Bartlomiej
    Zolnierkiewicz's patches to remove the custom callbacks and the size
    increase of dma_async_tx_descriptor for drivers that don't care about
    raid).

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    [bzolnier: prepare pl330 driver for adding missing unmap while at it]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dan Williams

    Dan Williams
     

25 Oct, 2013

2 commits


11 Sep, 2013

1 commit

  • Pull slave-dmaengine updates from Vinod Koul:
    "This pull brings:
    - Andy's DW driver updates
    - Guennadi's sh driver updates
    - Pl08x driver fixes from Tomasz & Alban
    - Improvements to mmp_pdma by Daniel
    - TI EDMA fixes by Joel
    - New drivers:
    - Hisilicon k3dma driver
    - Renesas rcar dma driver
    - New API for publishing slave driver capablities
    - Various fixes across the subsystem by Andy, Jingoo, Sachin etc..."

    * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (94 commits)
    dma: edma: Remove limits on number of slots
    dma: edma: Leave linked to Null slot instead of DUMMY slot
    dma: edma: Find missed events and issue them
    ARM: edma: Add function to manually trigger an EDMA channel
    dma: edma: Write out and handle MAX_NR_SG at a given time
    dma: edma: Setup parameters to DMA MAX_NR_SG at a time
    dmaengine: pl330: use dma_set_max_seg_size to set the sg limit
    dmaengine: dma_slave_caps: remove sg entries
    dma: replace devm_request_and_ioremap by devm_ioremap_resource
    dma: ste_dma40: Fix potential null pointer dereference
    dma: ste_dma40: Remove duplicate const
    dma: imx-dma: Remove redundant NULL check
    dma: dmagengine: fix function names in comments
    dma: add driver for R-Car HPB-DMAC
    dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap()
    dma: imx-sdma: Staticize sdma_driver_data structures
    pch_dma: Add MODULE_DEVICE_TABLE
    dmaengine: PL08x: Add cyclic transfer support
    dmaengine: PL08x: Fix reading the byte count in cctl
    dmaengine: PL08x: Add support for different maximum transfer size
    ...

    Linus Torvalds
     

10 Sep, 2013

1 commit

  • dma_sync_wait and dma_find_channel are declared regardless of whether
    CONFIG_DMA_ENGINE is enabled, but calling the function without
    CONFIG_DMA_ENGINE enabled results "undefined reference" errors.

    To get around this, declare dma_sync_wait and dma_find_channel as inline
    functions if CONFIG_DMA_ENGINE is undefined.

    Signed-off-by: Jon Mason
    Signed-off-by: Dan Williams

    Jon Mason
     

04 Sep, 2013

1 commit


02 Sep, 2013

2 commits


23 Aug, 2013

1 commit

  • The problem here is that the dma_xfer() functions in
    drivers/ata/pata_arasan_cf.c and drivers/mtd/nand/fsmc_nand.c expect
    dma_submit_error() to return an error code so they return 1 when they
    intended to return a negative.

    So far as I can tell, none of the ->tx_submit() functions ever do
    return error codes so this patch should have no effect in the current
    code.

    I also changed it from a define to an inline.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Dan Williams

    Dan Carpenter
     

13 Aug, 2013

1 commit

  • Suggested by Arnd, add dma_get_slave_channel interface
    Dma host driver could get specific channel specificied by request line, rather than filter.

    host example:
    static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
    struct of_dma *ofdma)
    {
    struct xx_dma_dev *d = ofdma->of_dma_data;
    unsigned int request = dma_spec->args[0];

    if (request > d->dma_requests)
    return NULL;

    return dma_get_slave_channel(&(d->chans[request].vc.chan));
    }

    probe:
    of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d);

    Signed-off-by: Zhangfei Gao
    Acked-by: Arnd Bergmann
    Signed-off-by: Vinod Koul

    Zhangfei Gao
     

16 Jul, 2013

1 commit

  • add new device callback .device_slave_caps api which can be used by clients to
    query the dma channel capablties before they program the channel. This can help
    is removing errors during the channel programming. Also add helper
    dma_slave_get_caps API

    This patch folds the work done by Matt earlier
    https://patchwork.kernel.org/patch/2094891/

    Signed-off-by: Vinod Koul

    Vinod Koul
     

04 Jul, 2013

1 commit

  • There have never been any real users of MEMSET operations since they
    have been introduced in January 2007 by commit 7405f74badf4 ("dmaengine:
    refactor dmaengine around dma_async_tx_descriptor"). Therefore remove
    support for them for now, it can be always brought back when needed.

    [sebastian.hesselbarth@gmail.com: fix drivers/dma/mv_xor]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Sebastian Hesselbarth
    Cc: Vinod Koul
    Acked-by: Dan Williams
    Cc: Tomasz Figa
    Cc: Herbert Xu
    Cc: Olof Johansson
    Cc: Kevin Hilman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bartlomiej Zolnierkiewicz
     

03 May, 2013

1 commit


15 Apr, 2013

2 commits


28 Feb, 2013

1 commit

  • Adds a dma_request_slave_channel_compat() wrapper which accepts
    both the arguments from dma_request_channel() and
    dma_request_slave_channel(). Based on whether the driver is
    instantiated via DT, the appropriate channel request call will be
    made.

    This allows for a much cleaner migration of drivers to the
    dmaengine DT API as platforms continue to be mixed between those
    that boot using DT and those that do not.

    Suggested-by: Tony Lindgren
    Signed-off-by: Matt Porter
    Acked-by: Tony Lindgren
    Acked-by: Arnd Bergmann
    Signed-off-by: Vinod Koul

    Matt Porter
     

14 Feb, 2013

1 commit


12 Jan, 2013

1 commit


08 Jan, 2013

5 commits


07 Jan, 2013

2 commits

  • Reported-by: Fengguang Wu
    Signed-off-by: Vinod Koul

    Vinod Koul
     
  • Currently slave DMA channels are requested by calling dma_request_channel()
    and requires DMA clients to pass various filter parameters to obtain the
    appropriate channel.

    With device-tree being used by architectures such as arm and the addition of
    device-tree helper functions to extract the relevant DMA client information
    from device-tree, add a new function to request a slave DMA channel using
    device-tree. This function is currently a simple wrapper that calls the
    device-tree of_dma_request_slave_channel() function.

    Cc: Nicolas Ferre
    Cc: Benoit Cousson
    Cc: Stephen Warren
    Cc: Grant Likely
    Cc: Russell King
    Cc: Rob Herring
    Cc: Arnd Bergmann
    Cc: Vinod Koul
    Cc: Dan Williams

    Acked-by: Arnd Bergmann
    Signed-off-by: Jon Hunter
    Reviewed-by: Stephen Warren
    Acked-by: Rob Herring
    Signed-off-by: Vinod Koul

    Jon Hunter
     

25 Sep, 2012

1 commit

  • With this parameter added to dmaengine_prep_dma_cyclic() the API will be in
    sync with other dmaengine_prep_*() functions.
    The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic
    transfer required by ALSA, we use the from audio to ask dma drivers to
    suppress interrupts (if DMA_PREP_INTERRUPT is cleared) when it is supported
    on the platform.

    Signed-off-by: Peter Ujfalusi
    CC: Lars-Peter Clausen
    Acked-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Peter Ujfalusi
     

22 Sep, 2012

1 commit

  • Change the parameter list of device_prep_dma_cyclic() so the DMA drivers
    can receive the flags coming from clients.
    This feature can be used during audio operation to disable all audio
    related interrupts when the DMA_PREP_INTERRUPT is cleared from the flags.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Nicolas Ferre
    Acked-by: Shawn Guo
    Acked-by: Vinod Koul
    Signed-off-by: Mark Brown

    Peter Ujfalusi
     

20 Jun, 2012

1 commit

  • This patch adds a small inline wrapper for the devivce_tx_status callback of a
    dma device. This makes the source code of users of this function a bit more
    compact and a bit more legible.

    E.g.:
    -status = chan->device->device_tx_status(chan, cookie, &state)
    +status = dmaengine_tx_status(chan, cookie, &state)

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Vinod Koul

    Lars-Peter Clausen
     

08 Jun, 2012

1 commit

  • The DMA controller like Nvidia's Tegra Dma controller
    supports the different slave requestor id from different slave.
    This need to be configure in dma controller to handle the request
    properly.

    Adding the slave-id in the slave configuration so that information
    can be passed from client when configuring for slave.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Vinod Koul

    Laxman Dewangan
     

01 Jun, 2012

1 commit

  • Adds DMA Engine framework support into RapidIO subsystem.

    Uses DMA Engine DMA_SLAVE interface to generate data transfers to/from
    remote RapidIO target devices.

    Introduces RapidIO-specific wrapper for prep_slave_sg() interface with an
    extra parameter to pass target specific information.

    Uses scatterlist to describe local data buffer. Address flat data buffer
    on a remote side.

    Signed-off-by: Alexandre Bounine
    Cc: Dan Williams
    Acked-by: Vinod Koul
    Cc: Li Yang
    Cc: Matt Porter
    Cc: Paul Gortmaker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

26 May, 2012

1 commit

  • Pull slave-dmaengine updates from Vinod Koul:
    "Nothing exciting this time, odd fixes in a bunch of drivers"

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: at_hdmac: take maxburst from slave configuration
    dmaengine: at_hdmac: remove ATC_DEFAULT_CTRLA constant
    dmaengine: at_hdmac: remove some at_dma_slave comments
    dma: imx-sdma: make channel0 operations atomic
    dmaengine: Fixup dmaengine_prep_slave_single() to be actually useful
    dmaengine: Use dma_sg_len(sg) instead of sg->length
    dmaengine: Use sg_dma_address instead of sg_phys
    DMA: PL330: Remove duplicate header file inclusion
    dma: imx-sdma: keep the callbacks invoked in the tasklet
    dmaengine: dw_dma: add Device Tree probing capability
    dmaengine: dw_dmac: Add clk_{un}prepare() support
    dma/amba-pl08x: add support for the Nomadik variant
    dma/amba-pl08x: check for terminal count status only

    Linus Torvalds
     

11 May, 2012

1 commit

  • dmaengine_prep_slave_single() is a helper function which is supposed to be used
    to prepare a transfer of a single contingous buffer. Currently the function
    takes a pointer to such a buffer from which it builds a scatterlist and passes
    it on to device_prep_slave_sg. The dmaengine framework requires that any
    scatterlist that is passed to device_prep_slave_sg is mapped and it may not be
    unmapped until the DMA operation has completed. This is not the here and any use
    of dmaengine_prep_slave_single() will lead to undefined behaviour (Most likely a
    system crash).

    This patch changes dmaengine_prep_slave_single() to take a dma_addr_t instead of
    a pointer to a buffer and moves the responsibility of mapping and unmapping the
    buffer up to the caller.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Lars-Peter Clausen
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Kuninori Morimoto
     

11 Apr, 2012

1 commit

  • Pull dmaengine fixes from Dan Williams:

    1/ regression fix for Xen as it now trips over a broken assumption
    about the dma address size on 32-bit builds

    2/ new quirk for netdma to ignore dma channels that cannot meet
    netdma alignment requirements

    3/ fixes for two long standing issues in ioatdma (ring size overflow)
    and iop-adma (potential stack corruption)

    * tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
    netdma: adding alignment check for NETDMA ops
    ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
    ioat: ring size variables need to be 32bit to avoid overflow
    iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
    ioat: fix size of 'completion' for Xen

    Linus Torvalds
     

06 Apr, 2012

1 commit


30 Mar, 2012

1 commit

  • Pull slave-dmaengine update from Vinod Koul:
    "This includes the cookie cleanup by Russell, the addition of context
    parameter for dmaengine APIs, more arm dmaengine driver cleanup by
    moving code to dmaengine, this time for imx by Javier and pl330 by
    Boojin along with the usual driver fixes."

    Fix up some fairly trivial conflicts with various other cleanups.

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
    dmaengine: imx: fix the build failure on x86_64
    dmaengine: i.MX: Fix merge of cookie branch.
    dmaengine: i.MX: Add support for interleaved transfers.
    dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
    dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
    dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
    dmaengine: imx-dma: remove internal structure.
    dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
    dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
    dmaengine: imx-dma: remove sg member from internal structure.
    dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
    dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
    dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
    dmaengine: imx-dma: remove dma_mode member of internal structure.
    dmaengine: imx-dma: remove data member from internal structure.
    dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
    dmaengine: at_hdmac: add slave config operation
    dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
    dmaengine/dma_slave: introduce inline wrappers
    dma: imx-sdma: Treat firmware messages as warnings instead of erros
    ...

    Linus Torvalds
     

21 Mar, 2012

1 commit