1. 14 Jun, 2019 4 commits
  2. 12 Jun, 2019 1 commit
  3. 10 Jun, 2019 8 commits
    • Geert Uytterhoeven's avatar
    • Alexandru Ardelean's avatar
      dmaengine: axi-dmac: update license header · f4a9fe97
      Alexandru Ardelean authored
      The change replaces the old license information in the comment header with
      the new SPDX license specifier.
      As well as bumping the year range from 2013-2015 to 2013-2019.
      
      The latter also reflects recent changes that were added to the driver.
      Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      f4a9fe97
    • Gustavo Pimentel's avatar
      MAINTAINERS: Add Synopsys eDMA IP driver maintainer · 28635f6c
      Gustavo Pimentel authored
      Add Synopsys eDMA IP driver maintainer.
      
      This driver aims to support Synopsys eDMA IP and is normally distributed
      along with Synopsys PCIe EndPoint IP (depends of the use and licensing
      agreement).
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      28635f6c
    • Gustavo Pimentel's avatar
      dmaengine: Add Synopsys eDMA IP PCIe glue-logic · 41aaff2a
      Gustavo Pimentel authored
      Synopsys eDMA IP is normally distributed along with Synopsys PCIe
      EndPoint IP (depends of the use and licensing agreement).
      
      This IP requires some basic configurations, such as:
       - eDMA registers BAR
       - eDMA registers offset
       - eDMA registers size
       - eDMA linked list memory BAR
       - eDMA linked list memory offset
       - eDMA linked list memory size
       - eDMA data memory BAR
       - eDMA data memory offset
       - eDMA data memory size
       - eDMA version
       - eDMA mode
       - IRQs available for eDMA
      
      As a working example, PCIe glue-logic will attach to a Synopsys PCIe
      EndPoint IP prototype kit (Vendor ID = 0x16c3, Device ID = 0xedda),
      which has built-in an eDMA IP with this default configuration:
       - eDMA registers BAR = 0
       - eDMA registers offset = 0x00001000 (4 Kbytes)
       - eDMA registers size = 0x00002000 (8 Kbytes)
       - eDMA linked list memory BAR = 2
       - eDMA linked list memory offset = 0x00000000 (0 Kbytes)
       - eDMA linked list memory size = 0x00800000 (8 Mbytes)
       - eDMA data memory BAR = 2
       - eDMA data memory offset = 0x00800000 (8 Mbytes)
       - eDMA data memory size = 0x03800000 (56 Mbytes)
       - eDMA version = 0
       - eDMA mode = EDMA_MODE_UNROLL
       - IRQs = 1
      
      This driver can be compile as built-in or external module in kernel.
      
      To enable this driver just select DW_EDMA_PCIE option in kernel
      configuration, however it requires and selects automatically DW_EDMA
      option too.
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      41aaff2a
    • Gustavo Pimentel's avatar
      PCI: Add Synopsys endpoint EDDA Device ID · 1f418f46
      Gustavo Pimentel authored
      Create and add Synopsys Endpoint EDDA Device ID to PCI ID list, since
      this ID is now being use on two different drivers (pci_endpoint_test.ko
      and dw-edma-pcie.ko).
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      1f418f46
    • Gustavo Pimentel's avatar
      dmaengine: Add Synopsys eDMA IP version 0 debugfs support · 305aebef
      Gustavo Pimentel authored
      Add Synopsys eDMA IP version 0 debugfs support to assist any debug
      in the future.
      
      Creates a file system structure composed by folders and files that mimic
      the IP register map (this files are read only) to ease any debug.
      
      To enable this feature is necessary to select DEBUG_FS option on kernel
      configuration.
      
      Small output example:
      
      (eDMA IP version 0, unroll, 1 write + 1 read channels)
      
      % mount -t debugfs none /sys/kernel/debug/
      % tree /sys/kernel/debug/dw-edma-core:0/
      dw-edma/
      ├── version
      ├── mode
      ├── wr_ch_cnt
      ├── rd_ch_cnt
      └── registers
          ├── ctrl_data_arb_prior
          ├── ctrl
          ├── write
          │   ├── engine_en
          │   ├── doorbell
          │   ├── ch_arb_weight_low
          │   ├── ch_arb_weight_high
          │   ├── int_status
          │   ├── int_mask
          │   ├── int_clear
          │   ├── err_status
          │   ├── done_imwr_low
          │   ├── done_imwr_high
          │   ├── abort_imwr_low
          │   ├── abort_imwr_high
          │   ├── ch01_imwr_data
          │   ├── ch23_imwr_data
          │   ├── ch45_imwr_data
          │   ├── ch67_imwr_data
          │   ├── linked_list_err_en
          │   ├── engine_chgroup
          │   ├── engine_hshake_cnt_low
          │   ├── engine_hshake_cnt_high
          │   ├── ch0_pwr_en
          │   ├── ch1_pwr_en
          │   ├── ch2_pwr_en
          │   ├── ch3_pwr_en
          │   ├── ch4_pwr_en
          │   ├── ch5_pwr_en
          │   ├── ch6_pwr_en
          │   ├── ch7_pwr_en
          │   └── channel:0
          │       ├── ch_control1
          │       ├── ch_control2
          │       ├── transfer_size
          │       ├── sar_low
          │       ├── sar_high
          │       ├── dar_high
          │       ├── llp_low
          │       └── llp_high
          └── read
              ├── engine_en
              ├── doorbell
              ├── ch_arb_weight_low
              ├── ch_arb_weight_high
              ├── int_status
              ├── int_mask
              ├── int_clear
              ├── err_status_low
              ├── err_status_high
              ├── done_imwr_low
              ├── done_imwr_high
              ├── abort_imwr_low
              ├── abort_imwr_high
              ├── ch01_imwr_data
              ├── ch23_imwr_data
              ├── ch45_imwr_data
              ├── ch67_imwr_data
              ├── linked_list_err_en
              ├── engine_chgroup
              ├── engine_hshake_cnt_low
              ├── engine_hshake_cnt_high
              ├── ch0_pwr_en
              ├── ch1_pwr_en
              ├── ch2_pwr_en
              ├── ch3_pwr_en
              ├── ch4_pwr_en
              ├── ch5_pwr_en
              ├── ch6_pwr_en
              ├── ch7_pwr_en
              └── channel:0
                  ├── ch_control1
                  ├── ch_control2
                  ├── transfer_size
                  ├── sar_low
                  ├── sar_high
                  ├── dar_high
                  ├── llp_low
                  └── llp_high
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      305aebef
    • Gustavo Pimentel's avatar
      dmaengine: Add Synopsys eDMA IP version 0 support · 7e4b8a4f
      Gustavo Pimentel authored
      Add support for the eDMA IP version 0 driver for both register maps (legacy
      and unroll).
      
      The legacy register mapping was the initial implementation, which consisted
      in having all registers belonging to channels multiplexed, which could be
      change anytime (which could led a race-condition) by view port register
      (access to only one channel available each time).
      
      This register mapping is not very effective and efficient in a multithread
      environment, which has led to the development of unroll registers mapping,
      which consists of having all channels registers accessible any time by
      spreading all channels registers by an offset between them.
      
      This version supports a maximum of 16 independent channels (8 write +
      8 read), which can run simultaneously.
      
      Implements a scatter-gather transfer through a linked list, where the size
      of linked list depends on the allocated memory divided equally among all
      channels.
      
      Each linked list descriptor can transfer from 1 byte to 4 Gbytes and is
      alignmented to DWORD.
      
      Both SAR (Source Address Register) and DAR (Destination Address Register)
      are alignmented to byte.
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      7e4b8a4f
    • Gustavo Pimentel's avatar
      dmaengine: Add Synopsys eDMA IP core driver · e63d79d1
      Gustavo Pimentel authored
      Add Synopsys PCIe Endpoint eDMA IP core driver to kernel.
      
      This IP is generally distributed with Synopsys PCIe Endpoint IP (depends
      of the use and licensing agreement).
      
      This core driver, initializes and configures the eDMA IP using vma-helpers
      functions and dma-engine subsystem.
      
      This driver can be compile as built-in or external module in kernel.
      
      To enable this driver just select DW_EDMA option in kernel configuration,
      however it requires and selects automatically DMA_ENGINE and
      DMA_VIRTUAL_CHANNELS option too.
      
      In order to transfer data from point A to B as fast as possible this IP
      requires a dedicated memory space containing linked list of elements.
      
      All elements of this linked list are continuous and each one describes a
      data transfer (source and destination addresses, length and a control
      variable).
      
      For the sake of simplicity, lets assume a memory space for channel write
      0 which allows about 42 elements.
      
      +---------+
      | Desc #0 |-+
      +---------+ |
                  V
             +----------+
             | Chunk #0 |-+
             |  CB = 1  | |  +----------+  +-----+  +-----------+  +-----+
             +----------+ +->| Burst #0 |->| ... |->| Burst #41 |->| llp |
                  |          +----------+  +-----+  +-----------+  +-----+
                  V
             +----------+
             | Chunk #1 |-+
             |  CB = 0  | |  +-----------+  +-----+  +-----------+  +-----+
             +----------+ +->| Burst #42 |->| ... |->| Burst #83 |->| llp |
                  |          +-----------+  +-----+  +-----------+  +-----+
                  V
             +----------+
             | Chunk #2 |-+
             |  CB = 1  | |  +-----------+  +-----+  +------------+  +-----+
             +----------+ +->| Burst #84 |->| ... |->| Burst #125 |->| llp |
                  |          +-----------+  +-----+  +------------+  +-----+
                  V
             +----------+
             | Chunk #3 |-+
             |  CB = 0  | |  +------------+  +-----+  +------------+  +-----+
             +----------+ +->| Burst #126 |->| ... |->| Burst #129 |->| llp |
                             +------------+  +-----+  +------------+  +-----+
      
      Legend:
       - Linked list, also know as Chunk
       - Linked list element*, also know as Burst *CB*, also know as Change Bit,
      it's a control bit (and typically is toggled) that allows to easily
      identify and differentiate between the current linked list and the
      previous or the next one.
       - LLP, is a special element that indicates the end of the linked list
      element stream also informs that the next CB should be toggle
      
      On every last Burst of the Chunk (Burst #41, Burst #83, Burst #125 or
      even Burst #129) is set some flags on their control variable (RIE and
      LIE bits) that will trigger the send of "done" interruption.
      
      On the interruptions callback, is decided whether to recycle the linked
      list memory space by writing a new set of Bursts elements (if still
      exists Chunks to transfer) or is considered completed (if there is no
      Chunks available to transfer).
      
      On scatter-gather transfer mode, the client will submit a scatter-gather
      list of n (on this case 130) elements, that will be divide in multiple
      Chunks, each Chunk will have (on this case 42) a limited number of
      Bursts and after transferring all Bursts, an interrupt will be
      triggered, which will allow to recycle the all linked list dedicated
      memory again with the new information relative to the next Chunk and
      respective Burst associated and repeat the whole cycle again.
      
      On cyclic transfer mode, the client will submit a buffer pointer, length
      of it and number of repetitions, in this case each burst will correspond
      directly to each repetition.
      
      Each Burst can describes a data transfer from point A(source) to point
      B(destination) with a length that can be from 1 byte up to 4 GB. Since
      dedicated the memory space where the linked list will reside is limited,
      the whole n burst elements will be organized in several Chunks, that
      will be used later to recycle the dedicated memory space to initiate a
      new sequence of data transfers.
      
      The whole transfer is considered has completed when it was transferred
      all bursts.
      
      Currently this IP has a set well-known register map, which includes
      support for legacy and unroll modes. Legacy mode is version of this
      register map that has multiplexer register that allows to switch
      registers between all write and read channels and the unroll modes
      repeats all write and read channels registers with an offset between
      them. This register map is called v0.
      
      The IP team is creating a new register map more suitable to the latest
      PCIe features, that very likely will change the map register, which this
      version will be called v1. As soon as this new version is released by
      the IP team the support for this version in be included on this driver.
      
      According to the logic, patches 1, 2 and 3 should be squashed into 1
      unique patch, but for the sake of simplicity of review, it was divided
      in this 3 patches files.
      Signed-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      e63d79d1
  4. 07 Jun, 2019 2 commits
  5. 04 Jun, 2019 8 commits
  6. 27 May, 2019 12 commits
  7. 22 May, 2019 1 commit
  8. 21 May, 2019 4 commits