1. 12 Mar, 2019 2 commits
  2. 25 Feb, 2019 12 commits
  3. 19 Feb, 2019 1 commit
  4. 11 Feb, 2019 2 commits
  5. 04 Feb, 2019 6 commits
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Drop outdated comment on supported transactions · 37c22cab
      Lukas Wunner authored
      Remove an outdated comment claiming the driver only supports cyclic
      transactions.  The driver has been supporting other transaction types
      for more than two years.
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      37c22cab
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Drop gratuitous list deletion · efdffc1a
      Lukas Wunner authored
      The BCM2835 DMA driver deletes a channel from a list upon termination
      without having added it to a list first.  Moreover that operation is
      protected by a spinlock which isn't taken anywhere else.  These appear
      to be remnants of an older version of the driver which accidentally
      got mainlined.  Remove the dead code.
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      efdffc1a
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Enforce control block alignment · 603fe86b
      Lukas Wunner authored
      Per section 4.2.1.1 of the BCM2835 ARM Peripherals spec, control blocks
      "must start at a 256 bit aligned address":
      https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
      
      This rule is currently satisfied only by accident because struct
      bcm2835_dma_cb has a size of 256 bit and the DMA pool API happens to
      allocate blocks consecutively.  It seems safer to be explicit and tell
      the DMA pool allocator about the required alignment.
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      603fe86b
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Return void from abort of transactions · 3e05ada0
      Lukas Wunner authored
      bcm2835_dma_abort() returns an int but bcm2835_dma_terminate_all() (its
      sole caller) does not evaluate the return value. Change the return type
      to void.
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      3e05ada0
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Fix abort of transactions · 9e528c79
      Lukas Wunner authored
      There are multiple issues with bcm2835_dma_abort() (which is called on
      termination of a transaction):
      
      * The algorithm to abort the transaction first pauses the channel by
        clearing the ACTIVE flag in the CS register, then waits for the PAUSED
        flag to clear.  Page 49 of the spec documents the latter as follows:
      
        "Indicates if the DMA is currently paused and not transferring data.
         This will occur if the active bit has been cleared [...]"
         https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
      
        So the function is entering an infinite loop because it is waiting for
        PAUSED to clear which is always set due to the function having cleared
        the ACTIVE flag.  The only thing that's saving it from itself is the
        upper bound of 10000 loop iterations.
      
        The code comment says that the intention is to "wait for any current
        AXI transfer to complete", so the author probably wanted to check the
        WAITING_FOR_OUTSTANDING_WRITES flag instead.  Amend the function
        accordingly.
      
      * The CS register is only read at the beginning of the function.  It
        needs to be read again after pausing the channel and before checking
        for outstanding writes, otherwise writes which were issued between
        the register read at the beginning of the function and pausing the
        channel may not be waited for.
      
      * The function seeks to abort the transfer by writing 0 to the NEXTCONBK
        register and setting the ABORT and ACTIVE flags.  Thereby, the 0 in
        NEXTCONBK is sought to be loaded into the CONBLK_AD register.  However
        experimentation has shown this approach to not work:  The CONBLK_AD
        register remains the same as before and the CS register contains
        0x00000030 (PAUSED | DREQ_STOPS_DMA).  In other words, the control
        block is not aborted but merely paused and it will be resumed once the
        next DMA transaction is started.  That is absolutely not the desired
        behavior.
      
        A simpler approach is to set the channel's RESET flag instead.  This
        reliably zeroes the NEXTCONBK as well as the CS register.  It requires
        less code and only a single MMIO write.  This is also what popular
        user space DMA drivers do, e.g.:
        https://github.com/metachris/RPIO/blob/master/source/c_pwm/pwm.c
      
        Note that the spec is contradictory whether the NEXTCONBK register
        is writeable at all.  On the one hand, page 41 claims:
      
        "The value loaded into the NEXTCONBK register can be overwritten so
        that the linked list of Control Block data structures can be
        dynamically altered. However it is only safe to do this when the DMA
        is paused."
      
        On the other hand, page 40 specifies:
      
        "Only three registers in each channel's register set are directly
        writeable (CS, CONBLK_AD and DEBUG). The other registers (TI,
        SOURCE_AD, DEST_AD, TXFR_LEN, STRIDE & NEXTCONBK), are automatically
        loaded from a Control Block data structure held in external memory."
      
      Fixes: 96286b57 ("dmaengine: Add support for BCM2835")
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org # v3.14+
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Cc: Clive Messer <clive.m.messer@gmail.com>
      Cc: Matthias Reichl <hias@horus.com>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      9e528c79
    • Lukas Wunner's avatar
      dmaengine: bcm2835: Fix interrupt race on RT · f7da7782
      Lukas Wunner authored
      If IRQ handlers are threaded (either because CONFIG_PREEMPT_RT_BASE is
      enabled or "threadirqs" was passed on the command line) and if system
      load is sufficiently high that wakeup latency of IRQ threads degrades,
      SPI DMA transactions on the BCM2835 occasionally break like this:
      
      ks8851 spi0.0: SPI transfer timed out
      bcm2835-dma 3f007000.dma: DMA transfer could not be terminated
      ks8851 spi0.0 eth2: ks8851_rdfifo: spi_sync() failed
      
      The root cause is an assumption made by the DMA driver which is
      documented in a code comment in bcm2835_dma_terminate_all():
      
      /*
       * Stop DMA activity: we assume the callback will not be called
       * after bcm_dma_abort() returns (even if it does, it will see
       * c->desc is NULL and exit.)
       */
      
      That assumption falls apart if the IRQ handler bcm2835_dma_callback() is
      threaded: A client may terminate a descriptor and issue a new one
      before the IRQ handler had a chance to run. In fact the IRQ handler may
      miss an *arbitrary* number of descriptors. The result is the following
      race condition:
      
      1. A descriptor finishes, its interrupt is deferred to the IRQ thread.
      2. A client calls dma_terminate_async() which sets channel->desc = NULL.
      3. The client issues a new descriptor. Because channel->desc is NULL,
         bcm2835_dma_issue_pending() immediately starts the descriptor.
      4. Finally the IRQ thread runs and writes BCM2835_DMA_INT to the CS
         register to acknowledge the interrupt. This clears the ACTIVE flag,
         so the newly issued descriptor is paused in the middle of the
         transaction. Because channel->desc is not NULL, the IRQ thread
         finalizes the descriptor and tries to start the next one.
      
      I see two possible solutions: The first is to call synchronize_irq()
      in bcm2835_dma_issue_pending() to wait until the IRQ thread has
      finished before issuing a new descriptor. The downside of this approach
      is unnecessary latency if clients desire rapidly terminating and
      re-issuing descriptors and don't have any use for an IRQ callback.
      (The SPI TX DMA channel is a case in point.)
      
      A better alternative is to make the IRQ thread recognize that it has
      missed descriptors and avoid finalizing the newly issued descriptor.
      So first of all, set the ACTIVE flag when acknowledging the interrupt.
      This keeps a newly issued descriptor running.
      
      If the descriptor was finished, the channel remains idle despite the
      ACTIVE flag being set. However the ACTIVE flag can then no longer be
      used to check whether the channel is idle, so instead check whether
      the register containing the current control block address is zero
      and finalize the current descriptor only if so.
      
      That way, there is no impact on latency and throughput if the client
      doesn't care for the interrupt: Only minimal additional overhead is
      introduced for non-cyclic descriptors as one further MMIO read is
      necessary per interrupt to check for idleness of the channel. Cyclic
      descriptors are sped up slightly by removing one MMIO write per
      interrupt.
      
      Fixes: 96286b57 ("dmaengine: Add support for BCM2835")
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org # v3.14+
      Cc: Frank Pavlic <f.pavlic@kunbus.de>
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Cc: Florian Meier <florian.meier@koalo.de>
      Cc: Clive Messer <clive.m.messer@gmail.com>
      Cc: Matthias Reichl <hias@horus.com>
      Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Acked-by: default avatarFlorian Kauer <florian.kauer@koalo.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      f7da7782
  6. 20 Jan, 2019 5 commits
    • Gustavo A. R. Silva's avatar
      dmaengine: axi-dmac: Use struct_size() in kzalloc() · 48b02a85
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      48b02a85
    • Gustavo A. R. Silva's avatar
      dmaengine: timb_dma: Use struct_size() in kzalloc() · 3c215fd8
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      3c215fd8
    • Vinod Koul's avatar
      Merge branch 'topic/qcom' into for-linus · 73bf95f5
      Vinod Koul authored
      73bf95f5
    • Shunyong Yang's avatar
      dmaengine: qcom_hidma: assign channel cookie correctly · 546c0547
      Shunyong Yang authored
      When dma_cookie_complete() is called in hidma_process_completed(),
      dma_cookie_status() will return DMA_COMPLETE in hidma_tx_status(). Then,
      hidma_txn_is_success() will be called to use channel cookie
      mchan->last_success to do additional DMA status check. Current code
      assigns mchan->last_success after dma_cookie_complete(). This causes
      a race condition of dma_cookie_status() returns DMA_COMPLETE before
      mchan->last_success is assigned correctly. The race will cause
      hidma_tx_status() return DMA_ERROR but the transaction is actually a
      success. Moreover, in async_tx case, it will cause a timeout panic
      in async_tx_quiesce().
      
       Kernel panic - not syncing: async_tx_quiesce: DMA error waiting for
       transaction
       ...
       Call trace:
       [<ffff000008089994>] dump_backtrace+0x0/0x1f4
       [<ffff000008089bac>] show_stack+0x24/0x2c
       [<ffff00000891e198>] dump_stack+0x84/0xa8
       [<ffff0000080da544>] panic+0x12c/0x29c
       [<ffff0000045d0334>] async_tx_quiesce+0xa4/0xc8 [async_tx]
       [<ffff0000045d03c8>] async_trigger_callback+0x70/0x1c0 [async_tx]
       [<ffff0000048b7d74>] raid_run_ops+0x86c/0x1540 [raid456]
       [<ffff0000048bd084>] handle_stripe+0x5e8/0x1c7c [raid456]
       [<ffff0000048be9ec>] handle_active_stripes.isra.45+0x2d4/0x550 [raid456]
       [<ffff0000048beff4>] raid5d+0x38c/0x5d0 [raid456]
       [<ffff000008736538>] md_thread+0x108/0x168
       [<ffff0000080fb1cc>] kthread+0x10c/0x138
       [<ffff000008084d34>] ret_from_fork+0x10/0x18
      
      Cc: Joey Zheng <yu.zheng@hxt-semitech.com>
      Reviewed-by: default avatarSinan Kaya <okaya@kernel.org>
      Signed-off-by: default avatarShunyong Yang <shunyong.yang@hxt-semitech.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      546c0547
    • Shunyong Yang's avatar
      dmaengine: qcom_hidma: initialize tx flags in hidma_prep_dma_* · 875aac8a
      Shunyong Yang authored
      In async_tx_test_ack(), it uses flags in struct dma_async_tx_descriptor
      to check the ACK status. As hidma reuses the descriptor in a free list
      when hidma_prep_dma_*(memcpy/memset) is called, the flag will keep ACKed
      if the descriptor has been used before. This will cause a BUG_ON in
      async_tx_quiesce().
      
        kernel BUG at crypto/async_tx/async_tx.c:282!
        Internal error: Oops - BUG: 0 1 SMP
        ...
        task: ffff8017dd3ec000 task.stack: ffff8017dd3e8000
        PC is at async_tx_quiesce+0x54/0x78 [async_tx]
        LR is at async_trigger_callback+0x98/0x110 [async_tx]
      
      This patch initializes flags in dma_async_tx_descriptor by the flags
      passed from the caller when hidma_prep_dma_*(memcpy/memset) is called.
      
      Cc: Joey Zheng <yu.zheng@hxt-semitech.com>
      Reviewed-by: default avatarSinan Kaya <okaya@kernel.org>
      Signed-off-by: default avatarShunyong Yang <shunyong.yang@hxt-semitech.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      875aac8a
  7. 08 Jan, 2019 1 commit
  8. 07 Jan, 2019 11 commits
    • Gustavo A. R. Silva's avatar
      dmaengine: qcom: bam_dma: use struct_size() in kzalloc() · edd3c389
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      edd3c389
    • Gustavo A. R. Silva's avatar
      dmaengine: st_fdma: use struct_size() in kzalloc() · 55f53b9c
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      55f53b9c
    • Gustavo A. R. Silva's avatar
      dmaengine: dma-jz4780: Use struct_size() in devm_kzalloc() · ed414d58
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);
      
      This issue was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      ed414d58
    • Gustavo A. R. Silva's avatar
      dmaengine: bcm2835: Use struct_size() in kzalloc() · 5fde6005
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      5fde6005
    • Andy Shevchenko's avatar
      dmaengine: dw: convert to SPDX identifiers · b466a37f
      Andy Shevchenko authored
      This patch updates license to use SPDX-License-Identifier
      instead of verbose license text.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      b466a37f
    • Andy Shevchenko's avatar
      dmaengine: dw: Don't pollute CTL_LO on iDMA 32-bit · 934891b0
      Andy Shevchenko authored
      Intel iDMA 32-bit doesn't have a concept of bus masters and thus
      there is no need to setup any kind of masters in the CTL_LO register.
      
      Moreover, the burst size for memory-to-memory transfer is not what is says,
      we need to have a corrected list of possible sizes. Note, that
      the size of 8 items, each of that up to 4 bytes, is chosen because of
      maximum of 1/2 FIFO, which is 64 bytes on Intel Merrifield.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      934891b0
    • Andy Shevchenko's avatar
      dmaengine: dw: Reset DRAIN bit when resume the channel · 91f0ff88
      Andy Shevchenko authored
      For Intel iDMA 32-bit the channel can be drained on a suspend.
      We need to reset the bit on the resume to return a status quo.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      91f0ff88
    • Andy Shevchenko's avatar
      dmaengine: dw: Split DW and iDMA 32-bit operations · 69da8be9
      Andy Shevchenko authored
      Here is a kinda big refactoring that should have been done
      in the first place, when Intel iDMA 32-bit support appeared.
      
      It splits operations which are different to Synopsys DesignWare and
      Intel iDMA 32-bit controllers.
      
      No functional change intended.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      69da8be9
    • Andy Shevchenko's avatar
      dmaengine: dw: Remove unused internal property · 07816577
      Andy Shevchenko authored
      All known devices, which use DT for configuration, support
      memory-to-memory transfers. So enable it by default.
      
      The rest two cases, i.e. Intel Quark and PPC460ex, instantiate DMA driver and
      use its channels exclusively for hardware, which means there is no available
      channel for any other purposes anyway.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      07816577
    • Andy Shevchenko's avatar
      dmaengine: dw: Remove misleading is_private property · d7dba6be
      Andy Shevchenko authored
      The commit a9ddb575
      
         ("dmaengine: dw_dmac: Enhance device tree support")
      
      introduces is_private property in uncertain understanding what does it mean.
      
      First of all, documentation defines DMA_PRIVATE capability as
      
      Documentation/crypto/async-tx-api.txt:
        The DMA_PRIVATE capability flag is used to tag dma devices that should not be
        used by the general-purpose allocator. It can be set at initialization time
        if it is known that a channel will always be private. Alternatively,
        it is set when dma_request_channel() finds an unused "public" channel.
      
        A couple caveats to note when implementing a driver and consumer:
        1/ Once a channel has been privately allocated it will no longer be
           considered by the general-purpose allocator even after a call to
           dma_release_channel().
        2/ Since capabilities are specified at the device level a dma_device with
           multiple channels will either have all channels public, or all channels
           private.
      
      Documentation/driver-api/dmaengine/provider.rst:
        - DMA_PRIVATE
          The devices only supports slave transfers, and as such isn't available
          for async transfers.
      
      The capability had been introduced by the commit 59b5ec21
      
        ("dmaengine: introduce dma_request_channel and private channels")
      
      and some code didn't changed from that times ever.
      
      Taking into consideration above and the fact that on all known platforms
      Synopsys DesignWare DMA engine is attached to serve slave transfers,
      the DMA_PRIVATE capability must be enabled for this device unconditionally.
      Otherwise, as rightfully noticed in drivers/dma/at_xdmac.c:
        /*
         * Without DMA_PRIVATE the driver is not able to allocate more than
         * one channel, second allocation fails in private_candidate.
         */
      because of of a caveats mentioned in above documentation excerpts.
      
      So, remove conditional around DMA_PRIVATE followed by removal leftovers.
      
      If someone wonders, DMA_PRIVATE can be not used if and only if the all channels
      of the DMA controller are supposed to serve memory-to-memory like operations.
      For example, EP93xx has two controllers, one of which can only perform
      memory-to-memory transfers
      
      Note, this change doesn't affect dmatest to be able to test such controllers.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:SERIAL DRIVERS)
      Cc: Dan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      d7dba6be
    • Andy Shevchenko's avatar
      dmaengine: dw: Add missed multi-block support for iDMA 32-bit · 87fe9ae8
      Andy Shevchenko authored
      Intel integrated DMA 32-bit support multi-block transfers.
      Add missed setting to the platform data.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      87fe9ae8