15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

17 Nov, 2014

1 commit

  • This patch fixes a race condition about a list of shdma-base driver.
    If we don't apply this patch, a dma slave driver (especially a usb
    peripheral driver) may not be able to start the transfer.

    If a dma slave driver has a callback, __ld_cleanup() will call
    the callback before this driver removes the list. After the callback,
    since the return value of __ld_cleanup() is not zero,
    shdma_chan_ld_cleanup() calls __ld_cleanup() again. And, __ld_clean()
    will removes the list.

    At this time, if a dma slave driver calls dmaengine_submit() before
    this driver removes the list, this driver will set schan->pm_state
    to SHDMA_PM_PENDING in shdma_tx_submit(). And then, even if a dma
    slave driver calls dma_async_issue_pending(), this driver don't
    start the transfer because the schan->pm_state is SHDMA_PM_PENDING
    in shdma_issue_pending().

    So, this patch adds a new condition in __ld_clean() to check if the
    schan->pm_state is SHDMA_PM_PENDING or not.

    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Vinod Koul

    Yoshihiro Shimoda
     

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
    Acked-by: Laurent Pinchart
    Signed-off-by: Vinod Koul

    Maxime Ripard
     

20 Oct, 2014

1 commit


28 Aug, 2014

1 commit

  • In case of no corresponding slave ID, the audmapp_set_slave() returns
    -ENXIO same as sh_dmae_set_slave() of shdmac.c.
    DMAEngine might return wrong channel without this patch

    Signed-off-by: Ryo Kataoka
    Signed-off-by: Jun Watanabe ,
    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Vinod Koul

    Ryo Kataoka
     

04 Aug, 2014

1 commit


31 Jul, 2014

3 commits

  • The sg list used to prepare cyclic DMA descriptors is currently
    allocated statically on the stack as an array of 32 elements. This makes
    the shdma_prep_dma_cyclic() function consume a lot of stack space, as
    reported by the compiler:

    drivers/dma/sh/shdma-base.c: In function ‘shdma_prep_dma_cyclic’:
    drivers/dma/sh/shdma-base.c:715:1: warning: the frame size of 1056 bytes
    is larger than 1024 bytes [-Wframe-larger-than=]

    Given the limited Linux kernel stack size, this could lead to stack
    overflows. Fix the problem by allocating the sg list dynamically.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Simon Horman
    Signed-off-by: Vinod Koul

    Laurent Pinchart
     
  • The shdma_chan_filter() function relies on the DMA channel being
    embedded in an shdma_chan structure. If this assumption isn't true, for
    instance when the system contains DMA channels supported by an unrelated
    driver, the function will crash.

    Avoid this by returning false directly when the channel belongs to an
    unrelated device.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Simon Horman
    Signed-off-by: Vinod Koul

    Laurent Pinchart
     
  • Separate helpers and drivers in the Kconfig and Makefile to improve
    readability and move the CONFIG_OF dependency from the Makefile to
    Kconfig.

    [pebolle@tiscali.nl: reported need to rename SHDMA_R8A73A4 instances]
    Reported-by: Paul Bolle
    Signed-off-by: Laurent Pinchart
    [horms+renesas@verge.net.au: squashed rename of SHDMA_R8A73A4 instances]
    Signed-off-by: Simon Horman
    Signed-off-by: Vinod Koul

    Laurent Pinchart
     

28 Jul, 2014

1 commit


15 Jul, 2014

1 commit


11 Jul, 2014

1 commit

  • This patch adds DT support to Audio DMAC peri peri driver.

    Signed-off-by: Kuninori Morimoto
    [horms+renesas@verge.net.au: Do not add trailing blank line to rcar-audmapp.txt]
    [horms+renesas@verge.net.au: squashed patch to add NULL terminater to audmapp_of_match]
    Signed-off-by: Simon Horman

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Simon Horman

    Kuninori Morimoto
     

09 Jul, 2014

1 commit


08 Jul, 2014

2 commits


03 Jun, 2014

3 commits

  • dynamic stack allocation in kernel is considered bad as kernel stack is low and
    we get warns on few archs as reported by kbuild test robot

    >> drivers/dma/sh/shdma-base.c:671:32: sparse: Variable length array is used.
    >> drivers/dma/sh/shdma-base.c:701:1: warning: 'shdma_prep_dma_cyclic' uses
    >> dynamic stack allocation [enabled by default]

    Fix this by making a static array of 32 which should be sufficient for
    shdma_prep_dma_cyclic which only user in kernel is audio and 32 periods for
    audio seems quite sufficient atm

    Reported-by: kbuild test robot
    Signed-off-by: Vinod Koul

    Vinod Koul
     
  • As documented in Documentation/printk-formats.txt we should use %zu/%zx
    specifiers for size_t type variables for the code to compile on different
    architectures. This is uncovered as COMPILE_TEST has been enabled recently for
    this driver

    drivers/dma/sh/shdma-base.c: In function 'shdma_prep_dma_cyclic':
    >> drivers/dma/sh/shdma-base.c:683:4: warning: format '%d' expects argument of
    >> type 'int', but argument 4 has type 'size_t' [-Wformat=]
    __func__, buf_len, period_len, slave_id);
    >> drivers/dma/sh/shdma-base.c:683:4: warning: format '%d' expects argument of
    >> type 'int', but argument 5 has type 'size_t' [-Wformat=]

    Reported-by: kbuild test robot
    Acked-by: Laurent Pinchart
    Signed-off-by: Vinod Koul

    Vinod Koul
     
  • kbuild test robot reports that shdma_prep_dma_cyclic should be static, since
    symbol is not declared, quick check revails that is the case

    >> drivers/dma/sh/shdma-base.c:660:32: sparse: symbol 'shdma_prep_dma_cyclic'
    >> was not declared. Should it be static?

    Reported-by: kbuild test robot
    Acked-by: Laurent Pinchart
    Signed-off-by: Vinod Koul

    Vinod Koul
     

02 Jun, 2014

6 commits


03 May, 2014

2 commits


29 Mar, 2014

1 commit


06 Mar, 2014

3 commits


28 Nov, 2013

3 commits


30 Oct, 2013

2 commits


25 Oct, 2013

1 commit


13 Oct, 2013

1 commit


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