14 Feb, 2013

1 commit


21 Jan, 2013

1 commit


14 Jan, 2013

13 commits

  • Clock code was changed to use clk_prepare_enable in:

    b707c65 dma/ste_dma40: Fixup clock usage during probe

    but clk_disable on probe fail path was not updated. This patch fix this
    by using clk_disable_unprepare in place of clk_disable.

    Acked-by: Ulf Hansson
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • Some DMA channels may be used by other cores in the SoC. This patch
    modifies the dma interrupt handler to ignore interrupts from unknown
    channels.

    Cc: Rabin Vincent
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • This patch add support to manage LLI by SW for select phy channels.

    There is a HW issue in certain controllers due to which on certain
    occassions HW LLI cannot be used on some physical channels. To avoid
    the HW issue on a specific phy channel, the phy channel number can be
    added to the list of soft_lli_channels and there after all the transfers
    on that channel will use software LLI, for peripheral to memory
    transfers.

    SoftLLI introduces relink overhead, that could impact performace for
    certain use cases.

    This is based on a previous patch of Narayanan Gopalakrishnan.

    Cc: Shreshtha Kumar Sahu
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • Use internal variables to the cycles to improve code readability, no
    functional changes.

    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • This patch contains various non functional cosmetic fixes.

    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • This is to keep the active queue for only those transfers which are
    actually active in the hardware. Descriptors will be moved to the done
    queue after they are completed in the hardware (interrupt handler) but
    before all the cleanup work has been completed (tasklet).

    Mostly based on a previous patch by Rabin Vincent.

    Cc: Rabin Vincent
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Fabio Baltieri
     
  • U8540 DMA controller is different from u9540 we need define new
    registers and use them to support handling more than 128 event lines.

    Signed-off-by: Tong Liu
    Reviewed-by: Per Forlin
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Tong Liu
     
  • DMAC_ICFG[0:2]=SCHNB only allows to count 'multiple of 4' physical
    channels so it was ok with platforms having 8 channels but cannot be
    used for next versions (with 10 or 14 channels). This patch allows to
    provide the number of physical channels for a DMA device via
    platform_data, or still rely on SCHNB if platform_data announces 0
    channel.

    Signed-off-by: Gerald Baeza
    Reviewed-by: Per Forlin
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Gerald Baeza
     
  • This patch makes existing use_fixed_channel field (of stedma40_chan_cfg
    structure) applicable to physical channels.

    Signed-off-by: Gerald Baeza
    Tested-by: Yannick Fertre
    Reviewed-by: Per Forlin
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Gerald Baeza
     
  • Hardware bug: when a logical channel is triggerred by a high priority
    destination event line, an extra packet transaction is generated in case
    of important data write response latency on previous logical channel A
    and if the source transfer of current logical channel B is already
    completed and if no other channel with a higher priority than B is
    waiting for execution.

    Software workaround: do not set the high priority level for the
    destination event lines that trigger logical channels.

    Signed-off-by: Rabin Vincent
    Reviewed-by: Shreshtha Kumar Sahu
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Rabin Vincent
     
  • The check for runtime suspend is not needed during a regular suspend, as
    the framework takes care of this. This fixes the issue of DMA driver
    not letting the system to go to deepsleep in the first attempt.

    Signed-off-by: Narayanan G
    Reviewed-by: Rabin Vincent
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Narayanan G
     
  • The client is not aware of the maximum burst size in the dma driver. If
    the size exceeds 16 set max to 16.

    Signed-off-by: Per Forlin
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Per Forlin
     
  • Maximum DMA seg size is (0xffff x data_width). If max seg
    size is not set it deafults to 64k. This results in failure
    if transferring 64k in byte mode.
    Large seg sizes may be supported by splitting large transfer.

    Signed-off-by: Per Forlin
    Acked-by: Linus Walleij
    Acked-by: Vinod Koul
    Signed-off-by: Fabio Baltieri

    Per Forlin
     

12 Jan, 2013

1 commit


05 Nov, 2012

1 commit


10 Oct, 2012

1 commit

  • Pull slave-dmaengine updates from Vinod Koul:
    "This time we have Andy updates on dw_dmac which is attempting to make
    this IP block available as PCI and platform device though not fully
    complete this time.

    We also have TI EDMA moving the dma driver to use dmaengine APIs, also
    have a new driver for mmp-tdma, along with bunch of small updates.

    Now for your excitement the merge is little unusual here, while
    merging the auto merge on linux-next picks wrong choice for pl330
    (drivers/dma/pl330.c) and this causes build failure. The correct
    resolution is in linux-next. (DMA: PL330: Fix build error) I didn't
    back merge your tree this time as you are better than me so no point
    in doing that for me :)"

    Fixed the pl330 conflict as in linux-next, along with trivial header
    file conflicts due to changed includes.

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits)
    dma: tegra: fix interrupt name issue with apb dma.
    dw_dmac: fix a regression in dwc_prep_dma_memcpy
    dw_dmac: introduce software emulation of LLP transfers
    dw_dmac: autoconfigure data_width or get it via platform data
    dw_dmac: autoconfigure block_size or use platform data
    dw_dmac: get number of channels from hardware if possible
    dw_dmac: fill optional encoded parameters in register structure
    dw_dmac: mark dwc_dump_chan_regs as inline
    DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
    DMA: PL330: Remove redundant runtime_suspend/resume functions
    DMA: PL330: Remove controller clock enable/disable
    dmaengine: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
    DMA: PL330: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
    ARM: EXYNOS: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
    dma: tegra: use list_move_tail instead of list_del/list_add_tail
    mxs/dma: Enlarge the CCW descriptor area to 4 pages
    dw_dmac: utilize slave_id to pass request line
    dmaengine: mmp_tdma: add dt support
    dmaengine: mmp-pdma support
    spi: davici - make davinci select edma
    ...

    Linus Torvalds
     

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
     

31 Aug, 2012

1 commit


11 May, 2012

1 commit

  • sg->length may or may not contain the length of the dma region to transfer,
    depending on the architecture - dma_sg_len(sg) always will though. For the
    architectures which use the drivers modified by this patch it probably is the
    case that sg->length contains the dma transfer length. But to be consistent and
    future proof change them to use dma_sg_len.

    To quote Russel King:
    sg->length is meaningless to something performing DMA.

    In cases where sg_dma_len(sg) and sg->length are the same storage, then
    there's no problem. But scatterlists _can_ (and one some architectures) do
    split them - especially when you have an IOMMU which can allow you to
    combine a scatterlist into fewer entries.

    So, anything using sg->length for the size of a scatterlist's DMA transfer
    _after_ a call to dma_map_sg() is almost certainly buggy.

    The patch has been generated using the following coccinelle patch:

    @@
    struct scatterlist *sg;
    expression X;
    @@
    -sg[X].length
    +sg_dma_len(&sg[X])
    @@
    struct scatterlist *sg;
    @@
    -sg->length
    +sg_dma_len(sg)

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

    Lars-Peter Clausen
     

23 Apr, 2012

3 commits

  • A small fallout from Vinod's conversions to dma_transfer_direction,
    this small comparison was done with a dma_data_direction instead.
    Fix it by comparing against the correct enum.

    Signed-off-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Linus Walleij
     
  • The patch "ARM: amba: Remove AMBA level regulator support" breaks
    the DMA40 driver since the header implicitly
    included the regulator consumer header. So include it explicitly
    and fix the build error.

    Cc: Mark Brown
    Signed-off-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Linus Walleij
     
  • can be directly stopped by issuing a SUSPEND_REQ on the EE
    bits. There is no need to suspend the physical channel and
    restart it.

    Also, the support for pre-V2 hw is discontinued.

    EE bits for writing:

    00: disable only if AS=11 or AS=00
    01: enable
    10: suspend_req only if AS=01 & EE=01 or EE=11
    11: round / no change for writing

    Signed-off-by: Narayanan G
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Narayanan G
     

21 Mar, 2012

1 commit


13 Mar, 2012

6 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
     
  • Provide a common function to do the cookie mechanics for completing
    a DMA descriptor.

    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
     

02 Jan, 2012

1 commit

  • Otherwise if a previously physical channel is used as a logical channel, the
    LNK may have old values which affect the operation of the logical channel since
    the LNK register has different semantics between physical and logical channels.

    Signed-off-by: Rabin Vincent
    Reviewed-by: Jonas ABERG
    Signed-off-by: Narayanan G
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Rabin Vincent
     

05 Dec, 2011

1 commit

  • Allow logical channels to specify the physical channel they want to use.
    This is needed to avoid two peripherals operating on the same physical
    channel during some special use-cases. (like mmc and usb during a
    usb mass storage case).

    Signed-off-by: Rabin Vincent
    Signed-off-by: Narayanan G
    Reviewed-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Narayanan G
     

28 Nov, 2011

1 commit

  • This patch provides an option of having the lcla (link address)
    in ESRAM instead of allocating it. The bool value (use_esram_lcla)
    in the stedma40_platform_data if set to true, then the lcla
    address would be taken from platform resources. Also, the
    corresponding esram regulator is managed in the
    suspend/resume functions.

    Signed-off-by: Narayanan G
    Signed-off-by: Vinod Koul

    Narayanan G
     

22 Nov, 2011

1 commit

  • This patch adds power management support to the dma40
    driver. The DMA registers are backed up and restored,
    during suspend/resume. Also flags to track the dma usage
    have been introduced to facilitate this. Patch also includes
    few other minor changes, related to formatting, comments.

    Signed-off-by: Narayanan G
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Narayanan G
     

17 Nov, 2011

1 commit


01 Nov, 2011

1 commit


27 Oct, 2011

1 commit

  • fixup usage of dma direction by introducing dma_transfer_direction,
    this patch moves dma/drivers/* to use new enum

    Cc: Jassi Brar
    Cc: Russell King
    Cc: Viresh Kumar
    Cc: Linus Walleij
    Cc: Nicolas Ferre
    Cc: Mika Westerberg
    Cc: H Hartley Sweeten
    Cc: Li Yang
    Cc: Zhang Wei
    Cc: Sascha Hauer
    Cc: Guennadi Liakhovetski
    Cc: Shawn Guo
    Cc: Yong Wang
    Cc: Tomoya MORINAGA
    Cc: Boojin Kim
    Cc: Barry Song
    Acked-by: Mika Westerberg
    Acked-by: Linus Walleij
    Acked-by: Viresh Kumar
    Acked-by: Nicolas Ferre
    Signed-off-by: Vinod Koul

    Vinod Koul
     

05 Sep, 2011

2 commits

  • Prepared descriptors that are not submitted will not be freed. Add
    prepared descriptor to a list to be able to release them upon
    dmaengine_terminate_all().

    Signed-off-by: Per Forlin
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Per Forlin
     
  • The client list may exist in two lists at the same time. This makes free
    fail since the same desc is freed multiple times. Remove desc from
    client list when adding it to the pending queue. Move free of client owned
    descriptors from free_dma() to terminate_all().

    Unable to handle kernel paging request at virtual address 00100104
    pgd = dea8c000
    [00100104] *pgd=1ea62831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 817 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 Not tainted (3.1.0-rc3+ #58)
    PC is at d40_free_chan_resources+0x64/0x330

    Signed-off-by: Per Forlin
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Per Forlin