1. 10 Jun, 2019 6 commits
    • 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
  2. 07 Jun, 2019 2 commits
  3. 04 Jun, 2019 8 commits
  4. 27 May, 2019 12 commits
  5. 22 May, 2019 1 commit
  6. 21 May, 2019 6 commits
  7. 19 May, 2019 5 commits
    • Linus Torvalds's avatar
      Linux 5.2-rc1 · a188339c
      Linus Torvalds authored
      a188339c
    • Linus Torvalds's avatar
      Merge tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 2e2c1220
      Linus Torvalds authored
      Pull UBIFS fixes from Richard Weinberger:
      
       - build errors wrt xattrs
      
       - mismerge which lead to a wrong Kconfig ifdef
      
       - missing endianness conversion
      
      * tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubifs: Convert xattr inum to host order
        ubifs: Use correct config name for encryption
        ubifs: Fix build error without CONFIG_UBIFS_FS_XATTR
      2e2c1220
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · cb6f8739
      Linus Torvalds authored
      Merge yet more updates from Andrew Morton:
       "A few final bits:
      
         - large changes to vmalloc, yielding large performance benefits
      
         - tweak the console-flush-on-panic code
      
         - a few fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        panic: add an option to replay all the printk message in buffer
        initramfs: don't free a non-existent initrd
        fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount
        mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock
        mm/vmap: add DEBUG_AUGMENT_LOWEST_MATCH_CHECK macro
        mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro
        mm/vmalloc.c: keep track of free blocks for vmap allocation
      cb6f8739
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · ff8583d6
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - remove unneeded use of cc-option, cc-disable-warning, cc-ldoption
      
       - exclude tracked files from .gitignore
      
       - re-enable -Wint-in-bool-context warning
      
       - refactor samples/Makefile
      
       - stop building immediately if syncconfig fails
      
       - do not sprinkle error messages when $(CC) does not exist
      
       - move arch/alpha/defconfig to the configs subdirectory
      
       - remove crappy header search path manipulation
      
       - add comment lines to .config to clarify the end of menu blocks
      
       - check uniqueness of module names (adding new warnings intentionally)
      
      * tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits)
        kconfig: use 'else ifneq' for Makefile to improve readability
        kbuild: check uniqueness of module names
        kconfig: Terminate menu blocks with a comment in the generated config
        kbuild: add LICENSES to KBUILD_ALLDIRS
        kbuild: remove 'addtree' and 'flags' magic for header search paths
        treewide: prefix header search paths with $(srctree)/
        media: prefix header search paths with $(srctree)/
        media: remove unneeded header search paths
        alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig
        kbuild: terminate Kconfig when $(CC) or $(LD) is missing
        kbuild: turn auto.conf.cmd into a mandatory include file
        .gitignore: exclude .get_maintainer.ignore and .gitattributes
        kbuild: add all Clang-specific flags unconditionally
        kbuild: Don't try to add '-fcatch-undefined-behavior' flag
        kbuild: add some extra warning flags unconditionally
        kbuild: add -Wvla flag unconditionally
        arch: remove dangling asm-generic wrappers
        samples: guard sub-directories with CONFIG options
        kbuild: re-enable int-in-bool-context warning
        MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux*
        ...
      ff8583d6
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · f23d8719
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
       "Some I2C core API additions which are kind of simple but enhance error
        checking for users a lot, especially by returning errno now.
      
        There are wrappers to still support the old API but it will be removed
        once all users are converted"
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: core: add device-managed version of i2c_new_dummy
        i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy
      f23d8719