Merge branch 'spi-5.3' into spi-next
authorMark Brown <broonie@kernel.org>
Thu, 4 Jul 2019 16:35:07 +0000 (17:35 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jul 2019 16:35:07 +0000 (17:35 +0100)
1  2 
MAINTAINERS
drivers/spi/spi-qup.c
drivers/spi/spi-stm32-qspi.c
include/linux/platform_data/spi-mt65xx.h

diff --combined MAINTAINERS
index 01a52fc964daeaf54e30cdfe86ba4e23a9e55425,f6f0f8b960383031db3256bdf23ec9f65336360a..1080c7386678d5275a367d2346dadd029b5593cb
@@@ -364,7 -364,7 +364,7 @@@ F: drivers/acpi/fan.
  
  ACPI FOR ARM64 (ACPI/arm64)
  M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 -M:    Hanjun Guo <hanjun.guo@linaro.org>
 +M:    Hanjun Guo <guohanjun@huawei.com>
  M:    Sudeep Holla <sudeep.holla@arm.com>
  L:    linux-acpi@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1235,7 -1235,7 +1235,7 @@@ F:      arch/arm/lib/floppydma.
  F:    arch/arm/include/asm/floppy.h
  
  ARM PMU PROFILING AND DEBUGGING
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Mark Rutland <mark.rutland@arm.com>
  S:    Maintained
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1307,7 -1307,7 +1307,7 @@@ F:      Documentation/devicetree/bindings/in
  F:    drivers/irqchip/irq-vic.c
  
  ARM SMMU DRIVERS
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  R:    Robin Murphy <robin.murphy@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -2085,7 -2085,7 +2085,7 @@@ F:      drivers/tty/serial/msm_serial.
  F:    drivers/usb/dwc3/dwc3-qcom.c
  F:    include/dt-bindings/*/qcom*
  F:    include/linux/*/qcom*
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -2550,7 -2550,7 +2550,7 @@@ F:      drivers/i2c/busses/i2c-xiic.
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
  S:    Maintained
@@@ -2734,7 -2734,7 +2734,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/atmel/atmel*
  
  ATOMIC INFRASTRUCTURE
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <peterz@infradead.org>
  R:    Boqun Feng <boqun.feng@gmail.com>
  L:    linux-kernel@vger.kernel.org
@@@ -3121,8 -3121,7 +3121,8 @@@ F:      arch/arm/mach-bcm
  
  BROADCOM BCM2835 ARM ARCHITECTURE
  M:    Eric Anholt <eric@anholt.net>
 -M:    Stefan Wahren <stefan.wahren@i2se.com>
 +M:    Stefan Wahren <wahrenst@gmx.net>
 +L:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://github.com/anholt/linux
@@@ -3152,7 -3151,6 +3152,7 @@@ F:      arch/arm/boot/dts/bcm953012
  
  BROADCOM BCM53573 ARM ARCHITECTURE
  M:    Rafał Miłecki <rafal@milecki.pl>
 +L:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    arch/arm/boot/dts/bcm53573*
@@@ -3942,14 -3940,6 +3942,14 @@@ M:    Miguel Ojeda <miguel.ojeda.sandonis@
  S:    Maintained
  F:    .clang-format
  
 +CLANG/LLVM BUILD SUPPORT
 +L:    clang-built-linux@googlegroups.com
 +W:    https://clangbuiltlinux.github.io/
 +B:    https://github.com/ClangBuiltLinux/linux/issues
 +C:    irc://chat.freenode.net/clangbuiltlinux
 +S:    Supported
 +K:    \b(?i:clang|llvm)\b
 +
  CLEANCACHE API
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    linux-kernel@vger.kernel.org
@@@ -6244,6 -6234,7 +6244,6 @@@ F:      include/linux/ipmi-fru.
  K:    fmc_d.*register
  
  FPGA MANAGER FRAMEWORK
 -M:    Alan Tull <atull@kernel.org>
  M:    Moritz Fischer <mdf@kernel.org>
  L:    linux-fpga@vger.kernel.org
  S:    Maintained
@@@ -8575,7 -8566,7 +8575,7 @@@ S:      Odd Fixe
  
  KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
  M:    "J. Bruce Fields" <bfields@fieldses.org>
 -M:    Jeff Layton <jlayton@kernel.org>
 +M:    Chuck Lever <chuck.lever@oracle.com>
  L:    linux-nfs@vger.kernel.org
  W:    http://nfs.sourceforge.net/
  T:    git git://linux-nfs.org/~bfields/linux.git
@@@ -9130,7 -9121,7 +9130,7 @@@ F:      drivers/misc/lkdtm/
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <stern@rowland.harvard.edu>
  M:    Andrea Parri <andrea.parri@amarulasolutions.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Boqun Feng <boqun.feng@gmail.com>
  M:    Nicholas Piggin <npiggin@gmail.com>
@@@ -9238,7 -9229,7 +9238,7 @@@ F:      Documentation/admin-guide/LSM/LoadPi
  LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
@@@ -10559,7 -10550,7 +10559,7 @@@ F:   arch/arm/boot/dts/mmp
  F:    arch/arm/mach-mmp/
  
  MMU GATHER AND TLB INVALIDATION
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
  M:    Andrew Morton <akpm@linux-foundation.org>
  M:    Nick Piggin <npiggin@gmail.com>
@@@ -12048,7 -12039,7 +12048,7 @@@ S:   Maintaine
  F:    drivers/pci/controller/dwc/*layerscape*
  
  PCI DRIVER FOR GENERIC OF HOSTS
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -14344,15 -14335,6 +14344,15 @@@ S: Supporte
  K:    sifive
  N:    sifive
  
 +SIFIVE FU540 SYSTEM-ON-CHIP
 +M:    Paul Walmsley <paul.walmsley@sifive.com>
 +M:    Palmer Dabbelt <palmer@sifive.com>
 +L:    linux-riscv@lists.infradead.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git
 +S:    Supported
 +K:    fu540
 +N:    fu540
 +
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  L:    linux-input@vger.kernel.org
@@@ -14413,7 -14395,7 +14413,7 @@@ F:   lib/test_siphash.
  F:    include/linux/siphash.h
  
  SIOX
 -M:    Gavin Schenk <g.schenk@eckelmann.de>
 +M:    Thorsten Scherer <t.scherer@eckelmann.de>
  M:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  S:    Supported
@@@ -14630,6 -14612,14 +14630,14 @@@ S: Maintaine
  F:    drivers/net/ethernet/socionext/netsec.c
  F:    Documentation/devicetree/bindings/net/socionext-netsec.txt
  
+ SOCIONEXT (SNI) Synquacer SPI DRIVER
+ M:    Masahisa Kojima <masahisa.kojima@linaro.org>
+ M:    Jassi Brar <jaswinder.singh@linaro.org>
+ L:    linux-spi@vger.kernel.org
+ S:    Maintained
+ F:    drivers/spi/spi-synquacer.c
+ F:    Documentation/devicetree/bindings/spi/spi-synquacer.txt
  SOLIDRUN CLEARFOG SUPPORT
  M:    Russell King <linux@armlinux.org.uk>
  S:    Maintained
diff --combined drivers/spi/spi-qup.c
index eb8a6a2e91c945813425ea5d55be54d085c858c8,4ca0a62bdf25509123f89ee10158d799b1b53051..2f559e5311002c16f6b549318a679f4f79887a09
@@@ -273,9 -273,6 +273,9 @@@ static void spi_qup_read(struct spi_qu
                writel_relaxed(QUP_OP_IN_SERVICE_FLAG,
                               controller->base + QUP_OPERATIONAL);
  
 +              if (!remainder)
 +                      goto exit;
 +
                if (is_block_mode) {
                        num_words = (remainder > words_per_block) ?
                                        words_per_block : remainder;
         * to refresh opflags value because MAX_INPUT_DONE_FLAG may now be
         * present and this is used to determine if transaction is complete
         */
 -      *opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
 -      if (is_block_mode && *opflags & QUP_OP_MAX_INPUT_DONE_FLAG)
 -              writel_relaxed(QUP_OP_IN_SERVICE_FLAG,
 -                             controller->base + QUP_OPERATIONAL);
 -
 +exit:
 +      if (!remainder) {
 +              *opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
 +              if (is_block_mode && *opflags & QUP_OP_MAX_INPUT_DONE_FLAG)
 +                      writel_relaxed(QUP_OP_IN_SERVICE_FLAG,
 +                                     controller->base + QUP_OPERATIONAL);
 +      }
  }
  
  static void spi_qup_write_to_fifo(struct spi_qup *controller, u32 num_words)
@@@ -359,10 -354,6 +359,10 @@@ static void spi_qup_write(struct spi_qu
                writel_relaxed(QUP_OP_OUT_SERVICE_FLAG,
                               controller->base + QUP_OPERATIONAL);
  
 +              /* make sure the interrupt is valid */
 +              if (!remainder)
 +                      return;
 +
                if (is_block_mode) {
                        num_words = (remainder > words_per_block) ?
                                words_per_block : remainder;
@@@ -576,24 -567,10 +576,24 @@@ static int spi_qup_do_pio(struct spi_de
        return 0;
  }
  
 +static bool spi_qup_data_pending(struct spi_qup *controller)
 +{
 +      unsigned int remainder_tx, remainder_rx;
 +
 +      remainder_tx = DIV_ROUND_UP(spi_qup_len(controller) -
 +                                  controller->tx_bytes, controller->w_size);
 +
 +      remainder_rx = DIV_ROUND_UP(spi_qup_len(controller) -
 +                                  controller->rx_bytes, controller->w_size);
 +
 +      return remainder_tx || remainder_rx;
 +}
 +
  static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id)
  {
        struct spi_qup *controller = dev_id;
        u32 opflags, qup_err, spi_err;
 +      unsigned long flags;
        int error = 0;
  
        qup_err = readl_relaxed(controller->base + QUP_ERROR_FLAGS);
                error = -EIO;
        }
  
 +      spin_lock_irqsave(&controller->lock, flags);
 +      if (!controller->error)
 +              controller->error = error;
 +      spin_unlock_irqrestore(&controller->lock, flags);
 +
        if (spi_qup_is_dma_xfer(controller->mode)) {
                writel_relaxed(opflags, controller->base + QUP_OPERATIONAL);
        } else {
  
                if (opflags & QUP_OP_OUT_SERVICE_FLAG)
                        spi_qup_write(controller);
 +
 +              if (!spi_qup_data_pending(controller))
 +                      complete(&controller->done);
        }
  
 -      if ((opflags & QUP_OP_MAX_INPUT_DONE_FLAG) || error)
 +      if (error)
                complete(&controller->done);
  
 +      if (opflags & QUP_OP_MAX_INPUT_DONE_FLAG) {
 +              if (!spi_qup_is_dma_xfer(controller->mode)) {
 +                      if (spi_qup_data_pending(controller))
 +                              return IRQ_HANDLED;
 +              }
 +              complete(&controller->done);
 +      }
 +
        return IRQ_HANDLED;
  }
  
@@@ -873,10 -834,6 +873,6 @@@ static int spi_qup_transfer_one(struct 
        else
                ret = spi_qup_do_pio(spi, xfer, timeout);
  
-       if (ret)
-               goto exit;
- exit:
        spi_qup_set_state(controller, QUP_STATE_RESET);
        spin_lock_irqsave(&controller->lock, flags);
        if (!ret)
index 5dbb6a8e893c1ab7dfcb11449d401e79c428d4f8,0b07182f5660dd5ef313c9fcbd519b7a3ab57770..655e4afbfb2a185932dda13722ae9c8e13931054
@@@ -29,7 -29,7 +29,7 @@@
  #define CR_SSHIFT             BIT(4)
  #define CR_DFM                        BIT(6)
  #define CR_FSEL                       BIT(7)
 -#define CR_FTHRES_MASK                GENMASK(12, 8)
 +#define CR_FTHRES_SHIFT               8
  #define CR_TEIE                       BIT(16)
  #define CR_TCIE                       BIT(17)
  #define CR_FTIE                       BIT(18)
@@@ -245,12 -245,8 +245,8 @@@ static int stm32_qspi_tx_dma(struct stm
        writel_relaxed(cr | CR_DMAEN, qspi->io_base + QSPI_CR);
  
        t_out = sgt.nents * STM32_COMP_TIMEOUT_MS;
-       if (!wait_for_completion_interruptible_timeout(&qspi->dma_completion,
-                                                      msecs_to_jiffies(t_out)))
-               err = -ETIMEDOUT;
-       if (dma_async_is_tx_complete(dma_ch, cookie,
-                                    NULL, NULL) != DMA_COMPLETE)
+       if (!wait_for_completion_timeout(&qspi->dma_completion,
+                                        msecs_to_jiffies(t_out)))
                err = -ETIMEDOUT;
  
        if (err)
@@@ -304,7 -300,7 +300,7 @@@ static int stm32_qspi_wait_cmd(struct s
        cr = readl_relaxed(qspi->io_base + QSPI_CR);
        writel_relaxed(cr | CR_TCIE | CR_TEIE, qspi->io_base + QSPI_CR);
  
-       if (!wait_for_completion_interruptible_timeout(&qspi->data_completion,
+       if (!wait_for_completion_timeout(&qspi->data_completion,
                                msecs_to_jiffies(STM32_COMP_TIMEOUT_MS))) {
                err = -ETIMEDOUT;
        } else {
@@@ -463,7 -459,7 +459,7 @@@ static int stm32_qspi_setup(struct spi_
        flash->presc = presc;
  
        mutex_lock(&qspi->lock);
 -      qspi->cr_reg = FIELD_PREP(CR_FTHRES_MASK, 3) | CR_SSHIFT | CR_EN;
 +      qspi->cr_reg = 3 << CR_FTHRES_SHIFT | CR_SSHIFT | CR_EN;
        writel_relaxed(qspi->cr_reg, qspi->io_base + QSPI_CR);
  
        /* set dcr fsize to max address */
index 617a75336d569aec0e8593cfe8baa0c793289608,8d5df58a13ef011b449adacc43220fff1208f044..f0e6d6483e6279f7bfb2e46c825f65cfc9727d14
@@@ -1,9 -1,12 +1,9 @@@
 +/* SPDX-License-Identifier: GPL-2.0-only */
  /*
   *  MTK SPI bus driver definitions
   *
   * Copyright (c) 2015 MediaTek Inc.
   * Author: Leilk Liu <leilk.liu@mediatek.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
  #ifndef ____LINUX_PLATFORM_DATA_SPI_MTK_H
@@@ -11,8 -14,6 +11,6 @@@
  
  /* Board specific platform_data */
  struct mtk_chip_config {
-       u32 tx_mlsb;
-       u32 rx_mlsb;
        u32 cs_pol;
        u32 sample_sel;
  };