18 Sep, 2020

1 commit

  • In preparation for unconditionally passing the
    struct tasklet_struct pointer to all tasklet
    callbacks, switch to using the new tasklet_setup()
    and from_tasklet() to pass the tasklet pointer explicitly.

    Signed-off-by: Romain Perier
    Signed-off-by: Allen Pais
    Link: https://lore.kernel.org/r/20200831103542.305571-16-allen.lkml@gmail.com
    Signed-off-by: Vinod Koul

    Allen Pais
     

21 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details the full
    gnu general public license is included in this distribution in the
    file called copying

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 9 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Steve Winslow
    Reviewed-by: Kate Stewart
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154041.244154651@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

03 Oct, 2016

1 commit


14 Sep, 2016

1 commit


08 Aug, 2016

1 commit

  • This is in preperation of moving to a callback that provides results to the
    callback for the transaction. The conversion will maintain current behavior
    and the driver must convert to new callback mechanism at a later time in
    order to receive results.

    Signed-off-by: Dave Jiang
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Vinod Koul

    Dave Jiang
     

16 Jul, 2016

1 commit


05 Apr, 2016

3 commits

  • Signed-off-by: Mario Six
    Signed-off-by: Vinod Koul

    Mario Six
     
  • This patch extends the capabilities of the driver to handle DMA
    transfers to and from devices of 1, 2, 4, 16 (for MPC512x), and 32 byte
    widths.

    Signed-off-by: Mario Six
    Signed-off-by: Vinod Koul

    Mario Six
     
  • Since the MPC8308 has no external request lines to initiate DMA transfers,
    all transfers must be triggered by software.

    Because of this, the current implementation of DMA transfers from and to
    devices on MPC8308 SoCs using major and minor loops is faulty: After the
    completion of the first major loop, the DMA engine resets the start flag in
    the channel's TCD, thus halting the transfer. The driver would have to set
    the start bit again to trigger the next iteration of the major loop; on
    MPC512x SoCs, this is done via the external request lines, so in this case,
    the driver doesn't have to interfer in any way.

    This has the effect that on MPC8308s, every DMA transfer to or from a
    device hangs after executing the first major loop.

    The patch fixes this behavior by using just one major loop for the whole
    DMA transfer on MPC8308s.

    Signed-off-by: Mario Six
    Signed-off-by: Vinod Koul

    Mario Six
     

01 Oct, 2015

1 commit


19 Mar, 2015

1 commit


17 Mar, 2015

1 commit

  • Free Software Foundation mailing address has been moved in the past and some
    of the addresses here are outdated. Remove them from file headers since the
    COPYING file in the kernel sources includes it.

    Signed-off-by: Jarkko Nikula
    Signed-off-by: Vinod Koul

    Jarkko Nikula
     

22 Dec, 2014

1 commit


06 Nov, 2014

2 commits

  • There is no need to init .owner field.

    Based on the patch from Peter Griffin
    "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: Kiran Padwal
    [for nvidia]
    Acked-by: Thierry Reding
    Signed-off-by: Vinod Koul

    Kiran Padwal
     
  • 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: Maxime Ripard
    Signed-off-by: Vinod Koul

    Maxime Ripard
     

26 Jul, 2014

1 commit


22 May, 2014

1 commit

  • Introduce support for slave s/g transfer preparation and the associated
    device control callback in the MPC512x DMA controller driver, which adds
    support for data transfers between memory and peripheral I/O to the
    previously supported mem-to-mem transfers.

    Signed-off-by: Alexander Popov
    [fixed subsytem name]
    Signed-off-by: Vinod Koul

    Alexander Popov
     

03 May, 2014

3 commits


10 Oct, 2013

1 commit


05 Aug, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitconst,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Viresh Kumar
    Cc: Dan Williams
    Cc: Vinod Koul
    Cc: Barry Song
    Cc: Jeff Kirsher
    Cc: Alexander Duyck
    Cc: Russell King
    Cc: Linus Walleij
    Cc: Jassi Brar
    Cc: Dave Jiang
    Cc: Bill Pemberton
    Cc: Guennadi Liakhovetski
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Nov, 2012

2 commits


13 Mar, 2012

5 commits

  • Provide a common function to initialize a channels cookie values.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Now that we have the completed cookie in the dma_chan structure, we
    can consolidate the tx_status functions by providing a function to set
    the txstate structure and returning the DMA status. We also provide
    a separate helper to set the residue for cookies which are still in
    progress.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Everyone deals with assigning DMA cookies in the same way (it's part of
    the API so they should be), so lets consolidate the common code into a
    helper function to avoid this duplication.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Add a local private header file to contain definitions and declarations
    which should only be used by DMA engine drivers.

    We also fix linux/dmaengine.h to use LINUX_DMAENGINE_H to guard against
    multiple inclusion.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     
  • Every DMA engine implementation declares a last completed dma cookie
    in their private dma channel structures. This is pointless, and
    forces driver specific code. Move this out into the common dma_chan
    structure.

    Signed-off-by: Russell King
    Tested-by: Linus Walleij
    Reviewed-by: Linus Walleij
    Acked-by: Jassi Brar
    [imx-sdma.c & mxs-dma.c]
    Tested-by: Shawn Guo
    Signed-off-by: Vinod Koul

    Russell King - ARM Linux
     

05 Dec, 2011

1 commit


20 Sep, 2011

1 commit


31 Mar, 2011

1 commit


28 Feb, 2011

1 commit


30 Dec, 2010

4 commits

  • Currently completed descriptors are processed in the tasklet. This can
    lead to dead lock in case of CONFIG_NET_DMA enabled (new requests are
    submitted from softirq context and dma_memcpy_to_iovec() busy loops until
    the requests is submitted). To prevent this we should process completed
    descriptors from the allocation failure path in prepare_memcpy too.

    Signed-off-by: Ilya Yanok
    Cc: Piotr Ziecik
    Signed-off-by: Grant Likely

    Ilya Yanok
     
  • MPC8308 has pretty much the same DMA controller as MPC5121 and
    this patch adds support for MPC8308 to the mpc512x_dma driver.

    Signed-off-by: Ilya Yanok
    Acked-by: Wolfgang Denk
    Signed-off-by: Grant Likely

    Ilya Yanok
     
  • Current code clears interrupt active status _after_ submitting new
    transfers. This leaves a possibility of clearing the interrupt for this
    new transfer (if it is triggered fast enough) and thus lose this
    interrupt. We want to clear interrupt active status _before_ new
    transfers is submitted and for current channel only.

    Signed-off-by: Ilya Yanok
    Acked-by: Wolfgang Denk
    Signed-off-by: Grant Likely

    Ilya Yanok
     
  • While testing mpc512x-dma driver with dmatest module I've found that
    I can hang the mpc512x-dma issuing request from multiple threads to
    the single channel.

    insmod dmatest.ko max_channels=1 threads_per_chan=16

    After investigating this case I've managed to find that this happens
    if and only if we have more than one queued requests.
    In this case the driver tries to make use of hardware scatter/gather
    functionality. I've found two problems with scatter/gather:

    1. When TCD is copied form RAM to the TCD register space with memcpy_io()
    e_sg bit eventually gets cleared. This results in only first TCD being
    executed. I've added setting of e_sg bit explicitly in the TCD registers.
    BTW, what is the correct way to do this? (How can I use setbits with bitfield
    structure?) After that hardware loads consecutive TCDs and we hit the
    second issue.

    2. Existing code clears int_maj bit in the last TCD so we never get
    an interrupt on transfer completion.

    With these fixes my tests with many threads of single channel succeed but
    tests that use many channels simultaneously still don't work reliable.

    Signed-off-by: Ilya Yanok
    Acked-by: Wolfgang Denk
    Signed-off-by: Grant Likely

    Ilya Yanok
     

06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

03 Jun, 2010

1 commit