12 Mar, 2011

3 commits

  • Enabling poisoning in the dmapool API quickly showed that the DMA
    controller was fetching descriptors that should not have been in use.
    This has caused intermittent controller lockups during testing.

    I have been unable to figure out the exact set of conditions which cause
    this to happen. However, I believe it is related to the driver using the
    hardware registers to track whether the controller is busy or not. The
    code can incorrectly decide that the hardware is idle due to lag between
    register writes and the hardware actually becoming busy.

    To fix this, the driver has been reworked to explicitly track the state
    of the hardware, rather than try to guess what it is doing based on the
    register values.

    This has passed dmatest with 10 threads per channel, 100000 iterations
    per thread several times without error. Previously, this would fail
    within a few seconds.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • This fixes some minor violations of the coding style. It also changes
    the style of the device_prep_dma_*() function definitions so they are
    identical.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • This makes debugging the driver much easier when multiple channels are
    running concurrently. In addition, you can see how much descriptor
    memory each channel has allocated via the dmapool API in sysfs.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     

14 Dec, 2010

1 commit

  • Fixed fsl dma slow issue by initializing dma mode register with
    bandwidth control. It boosts dma performance and should works
    with 85xx board.

    Signed-off-by: Forrest Shi
    Signed-off-by: Li Yang
    Signed-off-by: Dan Williams

    Forrest Shi
     

03 Feb, 2010

5 commits

  • Fix locking. Use two queues in the driver, one for pending transacions, and
    one for transactions which are actually running on the hardware. Call
    dma_run_dependencies() on descriptor cleanup so that the async_tx API works
    correctly.

    There are a number of places throughout the code where lists of descriptors
    are freed in a loop. Create functions to handle this, and use them instead
    of open-coding the loop each time.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • This fixes some errors in the cleanup paths of the OF subsystem, including
    missing checks for ioremap failing. Also, some variables were renamed for
    brevity.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • Most functions in the standard library use "dst" as a parameter, rather
    than "dest". This renames all use of "dest" to "dst" to match the usual
    convention.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • This is the beginning of a cleanup which will change all instances of
    "fsl_dma" to "fsldma" to match the name of the driver itself.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • Remove some unused members from the fsldma data structures. A few trivial
    uses of struct resource were converted to use the stack rather than keeping
    the memory allocated for the lifetime of the driver.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     

09 Sep, 2009

2 commits

  • When using the Freescale DMA controller in external control mode, both the
    request count and external pause bits need to be setup correctly. This was
    being done with the same function.

    The 83xx controller lacks the external pause feature, but has a similar
    feature called external start. This feature requires that the request count
    bits be setup correctly.

    Split the function into two parts, to make it possible to use the external
    start feature on the 83xx controller.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • Drop fsldma's use of tx_list from struct dma_async_tx_descriptor in
    preparation for removal of this field.

    Cc: Li Yang
    Signed-off-by: Dan Williams

    Dan Williams
     

17 Jun, 2009

1 commit

  • By default, the Freescale 83xx DMA controller uses the PCI Read Line
    command when reading data over the PCI bus. Setting the controller to use
    the PCI Read Multiple command instead allows the controller to read much
    larger bursts of data, which provides a drastic speed increase.

    The slowdown due to using PCI Read Line was only observed when a PCI-to-PCI
    bridge was between the devices trying to communicate.

    A simple test driver showed an increase from 4MB/sec to 116MB/sec when
    performing DMA over the PCI bus. Using DMA to transfer between blocks of
    local SDRAM showed no change in performance with this patch. The dmatest
    driver was also used to verify the correctness of the transfers, and showed
    no errors.

    Signed-off-by: Ira W. Snyder
    Acked-by: Timur Tabi
    Acked-by: Kumar Gala
    Signed-off-by: Dan Williams

    Ira W. Snyder
     

27 Sep, 2008

1 commit

  • Modify the Freescale Elo / Elo Plus DMA driver so that it can be compiled as
    a module.

    The primary change is to stop treating the DMA controller as a bus, and the
    DMA channels as devices on the bus. This is because the Open Firmware (OF)
    kernel code does not allow busses to be removed, so although we can call
    of_platform_bus_probe() to probe the DMA channels, there is no
    of_platform_bus_remove(). Instead, the DMA channels are manually probed,
    similar to what fsl_elbc_nand.c does.

    Cc: Scott Wood
    Acked-by: Li Yang
    Signed-off-by: Timur Tabi
    Signed-off-by: Dan Williams

    Timur Tabi
     

31 Mar, 2008

1 commit

  • a) every bitwise declaration will give a unique type; use typedefs.

    b) no need to bother with the stuff pointed to by iomem pointers,
    unless it's accessed directly. noderef will force us to use helpers
    anyway.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

19 Mar, 2008

1 commit

  • The DMA_INTERRUPT async_tx is a NULL transfer, thus the BCR(count register)
    is 0. When the transfer started with a byte count of zero, the DMA
    controller will triger a PE(programming error) event and halt, not a normal
    interrupt. I add special codes for PE event and DMA_INTERRUPT
    async_tx testing.

    Signed-off-by: Zhang Wei
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Zhang Wei
     

05 Mar, 2008

1 commit

  • The driver implements DMA engine API for Freescale MPC85xx DMA controller,
    which could be used by devices in the silicon. The driver supports the
    Basic mode of Freescale MPC85xx DMA controller. The MPC85xx processors
    supported include MPC8540/60, MPC8555, MPC8548, MPC8641 and so on.

    The MPC83xx(MPC8349, MPC8360) are also supported.

    [kamalesh@linux.vnet.ibm.com: build fix]
    [dan.j.williams@intel.com: merge mm fixes, rebase on async_tx-2.6.25]
    Signed-off-by: Zhang Wei
    Signed-off-by: Ebony Zhu
    Acked-by: Kumar Gala
    Cc: Shannon Nelson
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Zhang Wei