Merge tag 'mmc-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Jan 2018 19:26:11 +0000 (11:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Jan 2018 19:26:11 +0000 (11:26 -0800)
Pull MMC updates from Ulf Hansson:
 "There are two major achievements for MMC in this release, which
  deserves to be specially highlighted.

  First, we have converted the MMC block device from using the legacy
  blk interface into using the modern blkmq interface. Not only do we
  get all the nice effects from using blkmq, but it also means that new
  fresh nice code replaces old rusty code. Great news to everybody that
  cares about MMC/SD!

  It should also be noted that converting to blkmq has not been trivial,
  mostly because of that we have been carrying too much of MMC specific
  optimizations for the I/O request path, rather than striving to move
  these to the generic blk layer. Hopefully we won't be doing that
  mistake, ever again.

  Special thanks to Adrian Hunter (Intel) and to Linus Walleij (Linaro),
  who both have been working on this for quite some time!

  Second, on top of the blkmq deployment, we have enabled full support
  the eMMC command queuing feature, introduced in the eMMC v.5.1 spec.
  This also includes an implementation of a host driver library,
  supporting the corresponding CQHCI HW. Ideally, those controllers that
  supports CQHCI should only need some minor adaptations to make this
  play.

  So far the sdhci-pci driver for the Intel GLKs and the sdhci-of-arasan
  driver used on Rockchip RK3399, have enabled support for eMMC command
  queueing.

  Worth to highlight is also that, implementing the eMMC command queuing
  support has been a collaborative effort, as several people from
  Codeaurora, Rockchip, Intel and Linaro have been involved. However,
  the work has been driven by Adrian Hunter (Intel).

  In some shadow of the above, here are the rest of the highlights:

  MMC core:
   - Don't remove non-removable cards during system suspend
   - Add a slot-gpio helper to check capability of GPIO WP detection

  MMC host:
   - sdhci: Cleanups and improvements of some wakeup related code
   - sdhci-pci-arasan: New variant to support Arasan PCI HW with integrated phy
   - sdhci-acpi: Avoid broken UHS transfer modes on Intel CHT
   - sdhci-acpi: Add support for ACPI HID of AMD Controller with HS400
   - sdhci_f_sdh30: Add ACPI support
   - sdhci-esdhc-imx: Enable/disable clock at runtime suspend/resume
   - sdhci-of-esdhc: A few minor fixes
   - mmci: Add support for new STM32 variant
   - renesas_sdhi: enable R-Car D3 (r8a77995) support
   - tmio/renesas_sdhi: Re-structuring, cleanups and modernizations"

* tag 'mmc-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (96 commits)
  mmc: mmci: fix error return code in mmci_probe()
  mmc: davinci: suppress error message on EPROBE_DEFER
  mmc: davinci: dont' use module_platform_driver_probe()
  mmc: tmio: hide unused tmio_mmc_clk_disable/tmio_mmc_clk_enable functions
  mmc: mmci: Add STM32 variant
  mmc: mmci: Add support for setting pad type via pinctrl
  mmc: mmci: Don't pretend all variants to have OPENDRAIN bit
  mmc: mmci: Don't pretend all variants to have MCI_STARBITERR flag
  mmc: mmci: Don't pretend all variants to have MMCIMASK1 register
  mmc: tmio: refactor .get_ro hook
  mmc: slot-gpio: add a helper to check capability of GPIO WP detection
  mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument
  mmc: tmio: move {tmio_}mmc_of_parse() to tmio_mmc_host_alloc()
  mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()
  mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc()
  mmc: sh_mmcif: remove redundant initialization of 'opc'
  mmc: sdhci: Rework sdhci_enable_irq_wakeups()
  mmc: sdhci: Handle failure of enable_irq_wake()
  mmc: sdhci: Stop exporting sdhci_enable_irq_wakeups()
  mmc: sdhci-pci: Use device wakeup capability to determine MMC_PM_WAKE_SDIO_IRQ capability
  ...

1  2 
drivers/mmc/host/Kconfig

diff --combined drivers/mmc/host/Kconfig
@@@ -81,6 -81,7 +81,7 @@@ config MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_
  config MMC_SDHCI_PCI
        tristate "SDHCI support on PCI bus"
        depends on MMC_SDHCI && PCI
+       select MMC_CQHCI
        help
          This selects the PCI Secure Digital Host Controller Interface.
          Most controllers found today are PCI devices.
@@@ -132,6 -133,7 +133,7 @@@ config MMC_SDHCI_OF_ARASA
        depends on MMC_SDHCI_PLTFM
        depends on OF
        depends on COMMON_CLK
+       select MMC_CQHCI
        help
          This selects the Arasan Secure Digital Host Controller Interface
          (SDHCI). This hardware is found e.g. in Xilinx' Zynq SoC.
@@@ -320,7 -322,7 +322,7 @@@ config MMC_SDHCI_BCM_KON
  config MMC_SDHCI_F_SDH30
        tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
        depends on MMC_SDHCI_PLTFM
-       depends on OF
+       depends on OF || ACPI
        help
          This selects the Secure Digital Host Controller Interface (SDHCI)
          Needed by some Fujitsu SoC for MMC / SD / SDIO support.
@@@ -595,11 -597,8 +597,8 @@@ config MMC_TMI
  
  config MMC_SDHI
        tristate "Renesas SDHI SD/SDIO controller support"
-       depends on SUPERH || ARM || ARM64
        depends on SUPERH || ARCH_RENESAS || COMPILE_TEST
        select MMC_TMIO_CORE
-       select MMC_SDHI_SYS_DMAC if (SUPERH || ARM)
-       select MMC_SDHI_INTERNAL_DMAC if ARM64
        help
          This provides support for the SDHI SD/SDIO controller found in
          Renesas SuperH, ARM and ARM64 based SoCs
  config MMC_SDHI_SYS_DMAC
        tristate "DMA for SDHI SD/SDIO controllers using SYS-DMAC"
        depends on MMC_SDHI
+       default MMC_SDHI if (SUPERH || ARM)
        help
          This provides DMA support for SDHI SD/SDIO controllers
          using SYS-DMAC via DMA Engine. This supports the controllers
@@@ -616,6 -616,7 +616,7 @@@ config MMC_SDHI_INTERNAL_DMA
        tristate "DMA for SDHI SD/SDIO controllers using on-chip bus mastering"
        depends on ARM64 || COMPILE_TEST
        depends on MMC_SDHI
+       default MMC_SDHI if ARM64
        help
          This provides DMA support for SDHI SD/SDIO controllers
          using on-chip bus mastering. This supports the controllers
@@@ -838,14 -839,14 +839,14 @@@ config MMC_USDHI6ROL
  
  config MMC_REALTEK_PCI
        tristate "Realtek PCI-E SD/MMC Card Interface Driver"
 -      depends on MFD_RTSX_PCI
 +      depends on MISC_RTSX_PCI
        help
          Say Y here to include driver code to support SD/MMC card interface
          of Realtek PCI-E card reader
  
  config MMC_REALTEK_USB
        tristate "Realtek USB SD/MMC Card Interface Driver"
 -      depends on MFD_RTSX_USB
 +      depends on MISC_RTSX_USB
        help
          Say Y here to include driver code to support SD/MMC card interface
          of Realtek RTS5129/39 series card reader
@@@ -857,6 -858,19 +858,19 @@@ config MMC_SUNX
          This selects support for the SD/MMC Host Controller on
          Allwinner sunxi SoCs.
  
+ config MMC_CQHCI
+       tristate "Command Queue Host Controller Interface support"
+       depends on HAS_DMA
+       help
+         This selects the Command Queue Host Controller Interface (CQHCI)
+         support present in host controllers of Qualcomm Technologies, Inc
+         amongst others.
+         This controller supports eMMC devices with command queue support.
+         If you have a controller with this interface, say Y or M here.
+         If unsure, say N.
  config MMC_TOSHIBA_PCI
        tristate "Toshiba Type A SD/MMC Card Interface Driver"
        depends on PCI