11 Oct, 2013

2 commits

  • Commit 4981c4dc194efb18f0e9a02f1b43e926f2f0d2bb (DMA: shdma: switch DT mode to
    use configuration data from a match table) added a new parameter to set_slave()
    method but unfortunately got merged later than commit c4f6c41ba790bbbfcebb4c47a
    (dma: add driver for R-Car HPB-DMAC), so that the HPB-DMAC driver retained the
    old prototype which caused this warning:

    drivers/dma/sh/rcar-hpbdma.c:485: warning: initialization from incompatible
    pointer type

    The newly added parameter is used to override DMA slave address from 'struct
    hpb_dmae_slave_config', so we have to add the 'slave_addr' field to 'struct
    hpb_dmae_chan', conditionally assign it in set_slave() method, and return in
    slave_addr() method.

    Signed-off-by: Sergei Shtylyov
    Tested-by: Simon Horman
    Signed-off-by: Vinod Koul

    Sergei Shtylyov
     
  • Commit c1c63a14f4f2419d093acd7164eccdff315baa86 (DMA: shdma: switch to managed
    resource allocation) got rid of shdma_free_irq() but unfortunately got merged
    later than commit c4f6c41ba790bbbfcebb4c47a709ac8ff1fe1af9 (dma: add driver for
    R-Car HPB-DMAC), so that the HPB-DMAC driver retained the calls and got broken:

    drivers/dma/sh/rcar-hpbdma.c: In function `hpb_dmae_alloc_chan_resources':
    drivers/dma/sh/rcar-hpbdma.c:435: error: implicit declaration of function
    `shdma_free_irq'

    Fix this compilation error by removing the remaining shdma_free_irq() calls.

    Reported-by: Simon Horman
    Signed-off-by: Sergei Shtylyov
    Tested-by: Simon Horman
    Signed-off-by: Vinod Koul

    Sergei Shtylyov
     

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
     

02 Sep, 2013

3 commits

  • Conflicts:
    drivers/dma/sh/Kconfig
    drivers/dma/sh/shdmac.c

    Signed-off-by: Vinod Koul

    Vinod Koul
     
  • Use devm_ioremap_resource instead of devm_request_and_ioremap.

    This was done using the semantic patch
    scripts/coccinelle/api/devm_ioremap_resource.cocci

    The relevant call to platform_get_resource was manually moved down to the
    call to devm_ioremap_resource.

    Signed-off-by: Julia Lawall
    Signed-off-by: Vinod Koul

    Julia Lawall
     
  • Add support for HPB-DMAC found in Renesas R-Car SoCs, using 'shdma-base' DMA
    driver framework.

    Based on the original patch by Phil Edworthy .

    Signed-off-by: Max Filippov
    [Sergei: removed useless #include, sorted #include's, fixed HPB_DMA_TCR_MAX,
    fixed formats and removed line breaks in the dev_dbg() calls, rephrased and
    added IRQ # to the shdma_request_irq() failure message, added MODULE_AUTHOR(),
    removed '__init'/'__exit' annotations from the probe()/remove() methods, removed
    '__initdata' annotation from 'hpb_dmae_driver', fixed guard macro name in the
    header file, fixed #define ASYNCRSTR_ASRST20, added #define ASYNCRSTR_ASRST24,
    added the necessary runtime PM calls to the probe() and remove() methods,
    handled errors returned by dma_async_device_register(), beautified comments
    and #define's.]
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Vinod Koul

    Max Filippov
     

27 Aug, 2013

10 commits


25 Aug, 2013

2 commits

  • In the shdma driver __iomem pointers are used to point to hardware
    registers. Using typed pointers like "u32 __iomem *" in this case is
    inconvenient, because then offsets, added to such pointers, have to be
    devided by sizeof(u32) or similar. Switch the driver to use void
    pointers, which avoids this clumsiness.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     
  • struct sh_dmae_device::chan_reg is a pointer to u32, therefore when adding
    offsets to it care should be taken to add offsets in sizeof(u32) units, not
    in bytes. This patch corrects such a bug. While at it we also remove the
    redundant parameter of the affected function.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     

13 Aug, 2013

1 commit


31 Jul, 2013

1 commit

  • sh_desc->hw.tcr is controlling real data size,
    and, register TCR is controlling data transfer count
    which was xmit_shifted value of hw.tcr.
    Current sh_dmae_get_partial() is calculating in different unit.
    This patch fixes it.

    This bug has been present since c014906a870ce70e009def0c9d170ccabeb0be63
    ("dmaengine: shdma: extend .device_terminate_all() to record partial
    transfer"), which was added in 2.6.34-rc1.

    Cc: Vinod Koul
    Signed-off-by: Kuninori Morimoto
    Acked-by: Guennadi Liakhovetski
    Signed-off-by: Simon Horman

    Kuninori Morimoto
     

05 Jul, 2013

2 commits


30 Apr, 2013

2 commits

  • Some Renesas USB modules have SUDMAC. This patch supports it using
    the shdma-base driver.

    Signed-off-by: Yoshihiro Shimoda
    Reviewed-by: Guennadi Liakhovetski
    Acked-by: Kuninori Morimoto
    Signed-off-by: Vinod Koul

    Shimoda, Yoshihiro
     
  • This patch adds Kconfig in the drivers/dma/sh. This patch also adds
    a new config "SH_DMAE_BASE" and the "config SH_DMAE" depends on it.
    Since some drivers (e.g. sh_mmcif.c) depends on shdma-base.c if
    CONFIG_DMA_ENGINE=y, the "config SH_DMAE_BASE" is set as "bool".

    Signed-off-by: Yoshihiro Shimoda
    Acked-by: Kuninori Morimoto
    Signed-off-by: Vinod Koul

    Shimoda, Yoshihiro
     

27 Feb, 2013

1 commit

  • Pull slave-dmaengine updates from Vinod Koul:
    "This is fairly big pull by my standards as I had missed last merge
    window. So we have the support for device tree for slave-dmaengine,
    large updates to dw_dmac driver from Andy for reusing on different
    architectures. Along with this we have fixes on bunch of the drivers"

    Fix up trivial conflicts, usually due to #include line movement next to
    each other.

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (111 commits)
    Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"
    ARM: dts: pl330: Add #dma-cells for generic dma binding support
    DMA: PL330: Register the DMA controller with the generic DMA helpers
    DMA: PL330: Add xlate function
    DMA: PL330: Add new pl330 filter for DT case.
    dma: tegra20-apb-dma: remove unnecessary assignment
    edma: do not waste memory for dma_mask
    dma: coh901318: set residue only if dma is in progress
    dma: coh901318: avoid unbalanced locking
    dmaengine.h: remove redundant else keyword
    dma: of-dma: protect list write operation by spin_lock
    dmaengine: ste_dma40: do not remove descriptors for cyclic transfers
    dma: of-dma.c: fix memory leakage
    dw_dmac: apply default dma_mask if needed
    dmaengine: ioat - fix spare sparse complain
    dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c
    ioatdma: fix race between updating ioat->head and IOAT_COMPLETION_PENDING
    dw_dmac: add support for Lynxpoint DMA controllers
    dw_dmac: return proper residue value
    dw_dmac: fill individual length of descriptor
    ...

    Linus Torvalds
     

20 Jan, 2013

1 commit


08 Jan, 2013

1 commit

  • If dmaengine driver's .device_alloc_chan_resources() method returns -ENODEV,
    dma_request_channel() will decide, that the driver has been removed and will
    remove the device from its list. To prevent this use ENXIO if a slave lookup
    fails.

    Reported-by: Kuninori Morimoto
    Signed-off-by: Guennadi Liakhovetski
    Cc: stable@vger.kernel.org
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     

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


01 Aug, 2012

1 commit


20 Jul, 2012

4 commits

  • This patch extends the sh dmaengine driver to support the preferred channel
    selection and configuration method, instead of using the "private" field
    from struct dma_chan. We add a standard filter function to be used by
    slave drivers instead of implementing their own ones, and add support for
    the DMA_SLAVE_CONFIG control operation, which must accompany the new
    channel selection method. We still support the legacy .private channel
    allocation method to cater for a smooth driver migration.

    Signed-off-by: Guennadi Liakhovetski
    [applied a trvial checkpath fix]
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     
  • Initially struct shdma_slave has been introduced with the only member - an
    unsigned slave ID - to describe common properties of DMA slaves in an
    extensible way. However, experience shows, that a slave ID is indeed the
    only parameter, needed to identify DMA slaves. This is also, what is used
    by the core dmaengine API in struct dma_slave_config. We switch to using
    the slave_id directly, instead of passing a pointer to struct shdma_slave
    to improve compatibility with the core. We also make the slave_id signed
    for easier error checking.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     
  • Using struct dma_chan::private is deprecated. To update the shdma driver to
    stop using it we first have to eliminate internal runtime uses of it. After
    that we will also be able to stop using it for channel configuration.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     
  • dmae_find_slave() needs only the slave_id field from the slave object, no
    need to pass the pointer to the object, pass the slave_id directly.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Vinod Koul

    Guennadi Liakhovetski
     

13 Jul, 2012

3 commits