12 Feb, 2014

1 commit


24 Jan, 2014

1 commit

  • Pull ARM SoC cleanups from Olof Johansson:
    "This is the branch where we usually queue up cleanup efforts, moving
    drivers out of the architecture directory, header file restructuring,
    etc. Sometimes they tangle with new development so it's hard to keep
    it strictly to cleanups.

    Some of the things included in this branch are:

    * Atmel SAMA5 conversion to common clock
    * Reset framework conversion for tegra platforms
    - Some of this depends on tegra clock driver reworks that are shared
    with Mike Turquette's clk tree.
    * Tegra DMA refactoring, which are shared branches with the DMA tree.
    * Removal of some header files on exynos to prepare for
    multiplatform"

    * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
    ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
    ARM: mvebu: remove prototypes of non-existing functions from common.h
    ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
    serial: sh-sci: Rework baud rate calculation
    serial: sh-sci: Compute overrun_bit without using baud rate algo
    serial: sh-sci: Remove unused GPIO request code
    serial: sh-sci: Move overrun_bit and error_mask fields out of pdata
    serial: sh-sci: Support resources passed through platform resources
    serial: sh-sci: Don't check IRQ in verify port operation
    serial: sh-sci: Set the UPF_FIXED_PORT flag
    serial: sh-sci: Remove duplicate interrupt check in verify port op
    serial: sh-sci: Simplify baud rate calculation algorithms
    serial: sh-sci: Remove baud rate calculation algorithm 5
    serial: sh-sci: Sort headers alphabetically
    ARM: EXYNOS: Kill exynos_pm_late_initcall()
    ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4
    ARM: at91: switch Calao QIL-A9260 board to DT
    clk: at91: fix pmc_clk_ids data type attriubte
    PM / devfreq: use inclusion instead of
    ARM: EXYNOS: remove for exynos
    ...

    Linus Torvalds
     

02 Jan, 2014

1 commit


27 Dec, 2013

1 commit

  • Merging in external dependencies for the Tegra DMA and reset controller
    refactoring from external trees.

    Per Stephen Warren, the stability of these branches have been negotiated
    with the relevant parties (Vinod/Mark/Mike)

    * depends/asoc-dma:
    ASoC: dmaengine: fix deferred probe detection
    ASoC: dmaengine: support deferred probe for DMA channels
    dma: add channel request API that supports deferred probe
    ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config
    ASoC: don't leak on error in snd_dmaengine_pcm_register
    ASoC: restructure dmaengine_pcm_request_chan_of()
    ASoC: generic-dmaengine-pcm: Set BATCH flag when residue reporting is not supported
    ASoC: Add resource managed snd_dmaengine_pcm_register()

    * depends/dma-of:
    dma: add dma_get_any_slave_channel(), for use in of_xlate()

    * depends/tegra-clk: (42 commits)
    clk: tegra: fix __clk_lookup() return value checks
    clk: tegra: Do not print errors for clk_round_rate()
    clk: tegra: Initialize DSI low-power clocks
    clk: tegra: add FUSE clock device
    clk: tegra: Properly setup PWM clock on Tegra30
    clk: tegra: Initialize secondary gr3d clock on Tegra30
    clk: tegra114: Initialize clocks needed for HDMI
    clk: tegra124: add suspend/resume function for tegra_cpu_car_ops
    clk: tegra124: add wait_for_reset and disable_clock for tegra_cpu_car_ops
    clk: tegra124: Add support for Tegra124 clocks
    clk: tegra124: Add new peripheral clocks
    clk: tegra124: Add common clk IDs to clk-id.h
    clk: tegra: add TEGRA_PERIPH_NO_GATE
    clk: tegra: add locking to periph clks
    clk: tegra: Add periph regs bank X
    clk: tegra: Add support for PLLSS
    clk: tegra: move tegra20 to common infra
    clk: tegra: move tegra30 to common infra
    clk: tegra: introduce common gen4 super clock
    clk: tegra: move PMC, fixed clocks to common files
    ...

    Signed-off-by: Olof Johansson

    Olof Johansson
     

13 Dec, 2013

2 commits

  • BUG: sleeping function called from invalid context at mm/mempool.c:203
    in_atomic(): 1, irqs_disabled(): 0, pid: 43502, name: linbug
    no locks held by linbug/43502.
    CPU: 7 PID: 43502 Comm: linbug Not tainted 3.13.0-rc1+ #15
    Hardware name:
    0000000000000010 ffff88005ebd1878 ffffffff8172d512 ffff8801752bc1c0
    ffff8801752bc1c0 ffff88005ebd1898 ffffffff8109d1f6 ffff88005f9a3c58
    ffff880177f0f080 ffff88005ebd1918 ffffffff81161f43 ffff88005ebd18f8
    Call Trace:
    [] dump_stack+0x4e/0x68
    [] __might_sleep+0xe6/0x120
    [] mempool_alloc+0x93/0x170
    [] ? mark_held_locks+0x74/0x140
    [] ? follow_page_mask+0x556/0x600
    [] dmaengine_get_unmap_data+0x2e/0x60
    [] dma_async_memcpy_pg_to_pg+0x41/0x1c0
    [] dma_async_memcpy_buf_to_pg+0x50/0x60
    [] dma_memcpy_to_iovec+0xfc/0x190
    [] dma_skb_copy_datagram_iovec+0x6f/0x2b0

    Signed-off-by: Dan Williams

    Dan Williams
     
  • The higher order mempools support raid operations, and we want to
    disable them when raid support is not enabled. Making them conditional
    on ASYNC_TX_DMA is not sufficient as other users (specifically dmatest)
    will also issue raid operations. Make raid drivers explicitly request
    that the core carry the higher order pools.

    Reported-by: Ezequiel Garcia
    Tested-by: Ezequiel Garcia
    Signed-off-by: Dan Williams

    Dan Williams
     

10 Dec, 2013

2 commits

  • mmp_pdma.c implements a custom of_xlate() function that is 95% identical
    to what Tegra will need. Create a function to implement the common part,
    so everyone doesn't just cut/paste the implementation.

    Cc: Dan Williams
    Cc: Vinod Koul
    Cc: Lars-Peter Clausen
    Cc: dmaengine@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Stephen Warren
    Signed-off-by: Vinod Koul

    Stephen Warren
     
  • dma_request_slave_channel() simply returns NULL whenever DMA channel
    lookup fails. Lookup could fail for two distinct reasons:

    a) No DMA specification exists for the channel name.
    This includes situations where no DMA specifications exist at all, or
    other general lookup problems.

    b) A DMA specification does exist, yet the driver for that channel is not
    yet registered.

    Case (b) should trigger deferred probe in client drivers. However, since
    they have no way to differentiate the two situations, it cannot.

    Implement new function dma_request_slave_channel_reason(), which performs
    identically to dma_request_slave_channel(), except that it returns an
    error-pointer rather than NULL, which allows callers to detect when
    deferred probe should occur.

    Eventually, all drivers should be converted to this new API, the old API
    removed, and the new API renamed to the more desirable name. This patch
    doesn't convert the existing API and all drivers in one go, since some
    drivers call dma_request_slave_channel() then dma_request_channel() if
    that fails. That would require either modifying dma_request_channel() in
    the same way, or adding extra error-handling code to all affected
    drivers, and there are close to 100 drivers using the other API, rather
    than just the 15-20 or so that use dma_request_slave_channel(), which
    might be tenable in a single patch.

    acpi_dma_request_slave_chan_by_name() doesn't currently implement
    deferred probe. It should, but this will be addressed later.

    Acked-by: Dan Williams
    Signed-off-by: Stephen Warren
    Signed-off-by: Vinod Koul

    Stephen Warren
     

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

3 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: keep temporary dma_dest array in do_async_gen_syndrome()]
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dan Williams

    Dan Williams
     
  • 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
     
  • Copying from page to page (dma_async_memcpy_pg_to_pg) is the superset,
    make the other two apis use that one in preparation for providing a
    common dma unmap implementation. The common implementation just wants
    to assume all buffers are mapped with dma_map_page().

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Dan Williams

    Dan Williams
     

25 Oct, 2013

1 commit


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

  • Pull dmaengine update from Dan Williams:
    "Collection of random updates to the core and some end-driver fixups
    for ioatdma and mv_xor:
    - NUMA aware channel allocation
    - Cleanup dmatest debugfs interface
    - ioat: make raid-support Atom only
    - mv_xor: big endian

    Aside from the top three commits these have all had some soak time in
    -next. The top commit fixes a recent build breakage.

    It has been a long while since my last pull request, hopefully it does
    not show. Thanks to Vinod for keeping an eye on drivers/dma/ this
    past year"

    * tag 'dmaengine-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
    dmaengine: dma_sync_wait and dma_find_channel undefined
    MAINTAINERS: update email for Dan Williams
    dma: mv_xor: Fix incorrect error path
    ioatdma: silence GCC warnings
    dmaengine: make dma_channel_rebalance() NUMA aware
    dmaengine: make dma_submit_error() return an error code
    ioatdma: disable RAID on non-Atom platforms and reenable unaligned copies
    mv_xor: support big endian systems using descriptor swap feature
    mv_xor: use {readl, writel}_relaxed instead of __raw_{readl, writel}
    dmatest: print message on debug level in case of no error
    dmatest: remove IS_ERR_OR_NULL checks of debugfs calls
    dmatest: make module parameters writable

    Linus Torvalds
     

02 Sep, 2013

2 commits


23 Aug, 2013

1 commit

  • dma_channel_rebalance() currently distributes channels by processor ID.
    These IDs often change with the BIOS, and the order isn't related to
    the DMA channel list (related to PCI bus ids).
    * On my SuperMicro dual E5 machine, first socket has processor IDs [0-7]
    (and [16-23] for hyperthreads), second socket has [8-15]+[24-31]
    => channels are properly allocated to local CPUs.
    * On Dells R720 with same processors, first socket has even processor IDs,
    second socket has odd numbers
    => half the processors get channels on the remote socket, causing
    cross-NUMA traffic and lower DMA performance.

    Change nth_chan() to return the channel with min table_count and in the
    NUMA node of the given CPU, if any. If none, the (non-local) channel with
    min table_count is returned. nth_chan() is therefore renamed into min_chan()
    since we don't iterate until the nth channel anymore. In practice, the
    behavior is the same because first channels are taken first and are then
    ignored because they got an additional reference.

    The new code has a slightly higher complexity since we always scan the
    entire list of channels for finding the minimal table_count (instead
    of stopping after N chans), and because we check whether the CPU is in the
    DMA device locality mask. Overall we still have time complexity =
    number of chans x number of processors. This rebalance is rarely used,
    so this won't hurt.

    On the above SuperMicro machine, channels are still allocated the same.
    On the Dells, there are no locality issue anymore (MEMCPY channel X goes
    to processor X and to its hyperthread sibling).

    Signed-off-by: Brice Goglin
    Signed-off-by: Dan Williams

    Brice Goglin
     

19 Aug, 2013

1 commit


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
     

26 Jul, 2013

1 commit


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


16 Apr, 2013

1 commit


15 Apr, 2013

2 commits


28 Feb, 2013

1 commit


08 Jan, 2013

1 commit


07 Jan, 2013

1 commit

  • 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
     

06 Oct, 2012

1 commit

  • Do the same as commit a03a202e95fd ("dmaengine: failure to get a
    specific DMA channel is not critical") to get rid of the following
    messages during kernel boot:

    dmaengine_get: failed to get dma1chan0: (-22)
    dmaengine_get: failed to get dma1chan1: (-22)
    dmaengine_get: failed to get dma1chan2: (-22)
    dmaengine_get: failed to get dma1chan3: (-22)
    ..

    Signed-off-by: Fabio Estevam
    Cc: Vinod Koul
    Cc: Dan Williams
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabio Estevam
     

20 Jul, 2012

1 commit

  • Use a more current logging style.

    Add pr_fmt to prefix dmaengine: to messages.
    Convert printk(KERN_ERR to pr_err(.
    Convert embedded function name use to "%s: ", __func__
    Align arguments.

    Original-patch-by: Andy Shevchenko
    Signed-off-by: Joe Perches
    Signed-off-by: Vinod Koul

    Joe Perches
     

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


06 Mar, 2012

1 commit


18 Nov, 2011

1 commit

  • Define a new api that could be used for doing fancy data transfers
    like interleaved to contiguous copy and vice-versa.
    Traditional SG_list based transfers tend to be very inefficient in
    such cases as where the interleave and chunk are only a few bytes,
    which call for a very condensed api to convey pattern of the transfer.
    This api supports all 4 variants of scatter-gather and contiguous transfer.

    Of course, neither can this api help transfers that don't lend to DMA by
    nature, i.e, scattered tiny read/writes with no periodic pattern.

    Also since now we support SLAVE channels that might not provide
    device_prep_slave_sg callback but device_prep_interleaved_dma,
    remove the BUG_ON check.

    Signed-off-by: Jassi Brar
    Acked-by: Barry Song
    [renamed dmaxfer_template to dma_interleaved_template
    did fixup after the enum dma_transfer_merge]
    Signed-off-by: Vinod Koul

    Jassi Brar
     

05 Aug, 2011

1 commit


04 Aug, 2011

1 commit

  • We could use DEFINE_IDR for statically allocated idr
    that allow us to save a few lines of code.

    And also remove unneeded mutex_init() for dma_list_mutex, as
    dma_list_mutex is initialized automatically by DEFINE_MUTEX().

    Signed-off-by: Axel Lin
    Signed-off-by: Dan Williams

    Axel Lin
     

02 Aug, 2011

1 commit

  • * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (37 commits)
    Improve slave/cyclic DMA engine documentation
    dmaengine: pl08x: handle the rest of enums in pl08x_width
    DMA: PL08x: cleanup selection of burst size
    DMA: PL08x: avoid recalculating cctl at each prepare
    DMA: PL08x: cleanup selection of buswidth
    DMA: PL08x: constify plchan->cd and plat->slave_channels
    DMA: PL08x: separately store source/destination cctl
    DMA: PL08x: separately store source/destination slave address
    DMA: PL08x: clean up LLI debugging
    DMA: PL08x: select LLI bus only once per LLI setup
    DMA: PL08x: remove unused constants
    ARM: mxs-dma: reset after disable channel
    dma: intel_mid_dma: remove redundant pci_set_drvdata calls
    dma: mxs-dma: fix unterminated platform_device_id table
    dmaengine: pl330: make platform data optional
    dmaengine: imx-sdma: return proper error if kzalloc fails
    pch_dma: Fix CTL register access issue
    dmaengine: mxs-dma: skip request_irq for NO_IRQ
    dmaengine/coh901318: fix slave submission semantics
    dmaengine/ste_dma40: allow memory buswidth/burst to be configured
    ...

    Fix trivial whitespace conflict in drivers/dma/mv_xor.c

    Linus Torvalds