Merge tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Jun 2014 21:35:22 +0000 (14:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Jun 2014 21:35:22 +0000 (14:35 -0700)
Pull MMC update from Chris Ball:
 "MMC highlights for 3.16:

  Core:
   - support HS400 mode of eMMC 5.0, via DT bindings mmc-hs400-1_{2,8}v
   - if card init at 3.3v doesn't work, try 1.8v and 1.2v too

  Drivers:
   - moxart: New driver for MOXA ART SoCs
   - rtsx_usb_sdmmc: New driver for Realtek USB card readers
   - sdhci: Large rework around IRQ/regulator handling, remove card_tasklet
   - sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
   - sunxi: New driver for Allwinner sunxi SoCs
   - usdhi6rol0: New driver for Renesas SD/SDIO controller"

* tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (95 commits)
  mmc: sdhci-s3c: use mmc_of_parse and remove the card_tasklet
  mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller
  mmc: sdhci-of-esdhc: Fixup compile error
  mmc: tegra: fix reporting of base clock frequency
  mmc: tegra: disable UHS modes
  mmc: sdhci-dove: use mmc_of_parse() and remove card_tasklet CD handler
  MAINTAINERS: mmc: Add path to git tree
  mmc: dove: fix missing MACH_DOVE dependency
  mmc: sdhci: SD tuning is broken for some controllers
  mmc: sdhci-esdhc-imx: fix mmc ddr mode regression issue
  mmc: sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
  mmc: omap_hsmmc: split omap-dma header file
  mmc: omap_hsmmc: fix cmd23 multiblock read/write
  mmc: omap_hsmmc: use devm_ioremap_resource
  mmc: omap_hsmmc: use devm_request_threaded_irq
  mmc: omap_hsmmc: use devm_request_irq
  mmc: omap_hsmmc: use devm_clk_get
  mmc: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
  mmc: wmt-sdmmc: Use GFP_KERNEL instead of hard-coded value
  mmc: omap: Use DIV_ROUND_UP instead of open coded
  ...

1  2 
MAINTAINERS
drivers/mmc/host/mmci.c
drivers/mmc/host/rtsx_pci_sdmmc.c
include/linux/omap-dma.h
include/linux/omap-dmaengine.h

diff --combined MAINTAINERS
index 948379508e440bf808eb5e7381c7ebdb6309ab78,3b5851568c65bee7b01077442601723de51c9940..b4a66b9d6b4d2b873c912af253ef47f2b56a34ca
@@@ -210,13 -210,6 +210,13 @@@ S:       Supporte
  F:    Documentation/scsi/aacraid.txt
  F:    drivers/scsi/aacraid/
  
 +ABI/API
 +L:    linux-api@vger.kernel.org
 +F:    Documentation/ABI/
 +F:    include/linux/syscalls.h
 +F:    include/uapi/
 +F:    kernel/sys_ni.c
 +
  ABIT UGURU 1,2 HARDWARE MONITOR DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  L:    lm-sensors@lm-sensors.org
@@@ -362,7 -355,7 +362,7 @@@ F: Documentation/hwmon/adm102
  F:    drivers/hwmon/adm1025.c
  
  ADM1029 HARDWARE MONITOR DRIVER
 -M:    Corentin Labbe <corentin.labbe@geomatys.fr>
 +M:    Corentin Labbe <clabbe.montjoie@gmail.com>
  L:    lm-sensors@lm-sensors.org
  S:    Maintained
  F:    drivers/hwmon/adm1029.c
@@@ -544,7 -537,7 +544,7 @@@ L: linux-alpha@vger.kernel.or
  F:    arch/alpha/
  
  ALTERA TRIPLE SPEED ETHERNET DRIVER
 -M:    Vince Bridgers <vbridgers2013@gmail.com
 +M:    Vince Bridgers <vbridgers2013@gmail.com>
  L:    netdev@vger.kernel.org
  L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
  S:    Maintained
@@@ -654,7 -647,7 +654,7 @@@ F: sound/soc/codecs/ssm
  F:    sound/soc/codecs/sigmadsp.*
  
  ANALOG DEVICES INC ASOC DRIVERS
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
@@@ -815,11 -808,6 +815,11 @@@ F:       arch/arm/boot/dts/at91*.dts
  F:    arch/arm/boot/dts/sama*.dts
  F:    arch/arm/boot/dts/sama*.dtsi
  
 +ARM/ATMEL AT91 Clock Support
 +M:    Boris Brezillon <boris.brezillon@free-electrons.com>
 +S:    Maintained
 +F:    drivers/clk/at91
 +
  ARM/CALXEDA HIGHBANK ARCHITECTURE
  M:    Rob Herring <robh@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1629,6 -1617,12 +1629,6 @@@ S:     Supporte
  F:    drivers/misc/atmel_tclib.c
  F:    drivers/clocksource/tcb_clksrc.c
  
 -ATMEL TSADCC DRIVER
 -M:    Josh Wu <josh.wu@atmel.com>
 -L:    linux-input@vger.kernel.org
 -S:    Supported
 -F:    drivers/input/touchscreen/atmel_tsadcc.c
 -
  ATMEL USBA UDC DRIVER
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1770,54 -1764,54 +1770,54 @@@ F:   include/uapi/linux/bfs_fs.
  
  BLACKFIN ARCHITECTURE
  M:    Steven Miao <realmz6@gmail.com>
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  T:    git git://git.code.sf.net/p/adi-linux/code
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    arch/blackfin/
  
  BLACKFIN EMAC DRIVER
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/net/ethernet/adi/
  
  BLACKFIN RTC DRIVER
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/rtc/rtc-bfin.c
  
  BLACKFIN SDH DRIVER
  M:    Sonic Zhang <sonic.zhang@analog.com>
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/mmc/host/bfin_sdh.c
  
  BLACKFIN SERIAL DRIVER
  M:    Sonic Zhang <sonic.zhang@analog.com>
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/tty/serial/bfin_uart.c
  
  BLACKFIN WATCHDOG DRIVER
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/watchdog/bfin_wdt.c
  
  BLACKFIN I2C TWI DRIVER
  M:    Sonic Zhang <sonic.zhang@analog.com>
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
  F:    drivers/i2c/busses/i2c-bfin-twi.c
  
  BLACKFIN MEDIA DRIVER
  M:    Scott Jiang <scott.jiang.linux@gmail.com>
 -L:    adi-buildroot-devel@lists.sourceforge.net
 +L:    adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
  F:    drivers/media/platform/blackfin/
@@@ -1899,15 -1893,14 +1899,15 @@@ L:   netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2x/
  
 -BROADCOM BCM281XX/BCM11XXX ARM ARCHITECTURE
 +BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
  M:    Christian Daudt <bcm@fixthebug.org>
  M:    Matt Porter <mporter@linaro.org>
  L:    bcm-kernel-feedback-list@broadcom.com
 -T:    git git://git.github.com/broadcom/bcm11351
 +T:    git git://github.com/broadcom/mach-bcm
  S:    Maintained
  F:    arch/arm/mach-bcm/
  F:    arch/arm/boot/dts/bcm113*
 +F:    arch/arm/boot/dts/bcm216*
  F:    arch/arm/boot/dts/bcm281*
  F:    arch/arm/configs/bcm_defconfig
  F:    drivers/mmc/host/sdhci_bcm_kona.c
@@@ -2200,7 -2193,6 +2200,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    drivers/char/*
  F:    drivers/misc/*
 +F:    include/linux/miscdevice.h
  
  CHECKPATCH
  M:    Andy Whitcroft <apw@canonical.com>
@@@ -2253,6 -2245,12 +2253,6 @@@ L:     linux-usb@vger.kernel.or
  S:    Maintained
  F:    drivers/usb/host/ohci-ep93xx.c
  
 -CIRRUS LOGIC CS4270 SOUND DRIVER
 -M:    Timur Tabi <timur@tabi.org>
 -L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 -S:    Odd Fixes
 -F:    sound/soc/codecs/cs4270*
 -
  CIRRUS LOGIC AUDIO CODEC DRIVERS
  M:    Brian Austin <brian.austin@cirrus.com>
  M:    Paul Handrigan <Paul.Handrigan@cirrus.com>
@@@ -2384,35 -2382,16 +2384,35 @@@ L:   netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/connector/
  
 -CONTROL GROUPS (CGROUPS)
 +CONTROL GROUP (CGROUP)
  M:    Tejun Heo <tj@kernel.org>
  M:    Li Zefan <lizefan@huawei.com>
 -L:    containers@lists.linux-foundation.org
  L:    cgroups@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
 +F:    Documentation/cgroups/
  F:    include/linux/cgroup*
  F:    kernel/cgroup*
 -F:    mm/*cgroup*
 +
 +CONTROL GROUP - CPUSET
 +M:    Li Zefan <lizefan@huawei.com>
 +L:    cgroups@vger.kernel.org
 +W:    http://www.bullopensource.org/cpuset/
 +W:    http://oss.sgi.com/projects/cpusets/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 +S:    Maintained
 +F:    Documentation/cgroups/cpusets.txt
 +F:    include/linux/cpuset.h
 +F:    kernel/cpuset.c
 +
 +CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
 +M:    Johannes Weiner <hannes@cmpxchg.org>
 +M:    Michal Hocko <mhocko@suse.cz>
 +L:    cgroups@vger.kernel.org
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +F:    mm/memcontrol.c
 +F:    mm/page_cgroup.c
  
  CORETEMP HARDWARE MONITORING DRIVER
  M:    Fenghua Yu <fenghua.yu@intel.com>
@@@ -2436,6 -2415,7 +2436,6 @@@ F:      drivers/net/ethernet/ti/cpmac.
  CPU FREQUENCY DRIVERS
  M:    Rafael J. Wysocki <rjw@rjwysocki.net>
  M:    Viresh Kumar <viresh.kumar@linaro.org>
 -L:    cpufreq@vger.kernel.org
  L:    linux-pm@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
@@@ -2446,6 -2426,7 +2446,6 @@@ F:      include/linux/cpufreq.
  CPU FREQUENCY DRIVERS - ARM BIG LITTLE
  M:    Viresh Kumar <viresh.kumar@linaro.org>
  M:    Sudeep Holla <sudeep.holla@arm.com>
 -L:    cpufreq@vger.kernel.org
  L:    linux-pm@vger.kernel.org
  W:    http://www.arm.com/products/processors/technologies/biglittleprocessing.php
  S:    Maintained
@@@ -2483,6 -2464,17 +2483,6 @@@ M:     Thomas Renninger <trenn@suse.de
  S:    Maintained
  F:    tools/power/cpupower/
  
 -CPUSETS
 -M:    Li Zefan <lizefan@huawei.com>
 -L:    cgroups@vger.kernel.org
 -W:    http://www.bullopensource.org/cpuset/
 -W:    http://oss.sgi.com/projects/cpusets/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 -S:    Maintained
 -F:    Documentation/cgroups/cpusets.txt
 -F:    include/linux/cpuset.h
 -F:    kernel/cpuset.c
 -
  CRAMFS FILESYSTEM
  W:    http://sourceforge.net/projects/cramfs/
  S:    Orphan / Obsolete
@@@ -2700,15 -2692,6 +2700,15 @@@ S:    Orpha
  F:    Documentation/networking/decnet.txt
  F:    net/decnet/
  
 +DECSTATION PLATFORM SUPPORT
 +M:    "Maciej W. Rozycki" <macro@linux-mips.org>
 +L:    linux-mips@linux-mips.org
 +W:    http://www.linux-mips.org/wiki/DECstation
 +S:    Maintained
 +F:    arch/mips/dec/
 +F:    arch/mips/include/asm/dec/
 +F:    arch/mips/include/asm/mach-dec/
 +
  DEFXX FDDI NETWORK DRIVER
  M:    "Maciej W. Rozycki" <macro@linux-mips.org>
  S:    Maintained
@@@ -2806,14 -2789,12 +2806,14 @@@ F:   sound/soc/codecs/da[79]*.[ch
  
  DIGI NEO AND CLASSIC PCI PRODUCTS
  M:    Lidza Louina <lidza.louina@gmail.com>
 +M:    Mark Hounschell <markh@compro.net>
  L:    driverdev-devel@linuxdriverproject.org
  S:    Maintained
  F:    drivers/staging/dgnc/
  
  DIGI EPCA PCI PRODUCTS
  M:    Lidza Louina <lidza.louina@gmail.com>
 +M:    Mark Hounschell <markh@compro.net>
  L:    driverdev-devel@linuxdriverproject.org
  S:    Maintained
  F:    drivers/staging/dgap/
@@@ -3177,9 -3158,10 +3177,9 @@@ S:     Maintaine
  F:    drivers/scsi/eata_pio.*
  
  EBTABLES
 -M:    Bart De Schuymer <bart.de.schuymer@pandora.be>
  L:    netfilter-devel@vger.kernel.org
  W:    http://ebtables.sourceforge.net/
 -S:    Maintained
 +S:    Orphan
  F:    include/linux/netfilter_bridge/ebt_*.h
  F:    include/uapi/linux/netfilter_bridge/ebt_*.h
  F:    net/bridge/netfilter/ebt*.c
@@@ -3503,12 -3485,6 +3503,12 @@@ S:    Maintaine
  F:    drivers/extcon/
  F:    Documentation/extcon/
  
 +EXYNOS DP DRIVER
 +M:    Jingoo Han <jg1.han@samsung.com>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    drivers/gpu/drm/exynos/exynos_dp*
 +
  EXYNOS MIPI DISPLAY DRIVERS
  M:    Inki Dae <inki.dae@samsung.com>
  M:    Donghwa Lee <dh09.lee@samsung.com>
@@@ -3574,7 -3550,7 +3574,7 @@@ F:      include/scsi/libfcoe.
  F:    include/uapi/scsi/fc/
  
  FILE LOCKING (flock() and fcntl()/lockf())
 -M:    Jeff Layton <jlayton@redhat.com>
 +M:    Jeff Layton <jlayton@poochiereds.net>
  M:    J. Bruce Fields <bfields@fieldses.org>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
@@@ -3792,8 -3768,7 +3792,8 @@@ F:      fs/fscache
  F:    include/linux/fscache*.h
  
  F2FS FILE SYSTEM
 -M:    Jaegeuk Kim <jaegeuk.kim@samsung.com>
 +M:    Jaegeuk Kim <jaegeuk@kernel.org>
 +M:    Changman Lee <cm224.lee@samsung.com>
  L:    linux-f2fs-devel@lists.sourceforge.net
  W:    http://en.wikipedia.org/wiki/F2FS
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
@@@ -3911,11 -3886,6 +3911,11 @@@ L:    kvm@vger.kernel.or
  S:    Supported
  F:    drivers/uio/uio_pci_generic.c
  
 +GET_MAINTAINER SCRIPT
 +M:    Joe Perches <joe@perches.com>
 +S:    Maintained
 +F:    scripts/get_maintainer.pl
 +
  GFS2 FILE SYSTEM
  M:    Steven Whitehouse <swhiteho@redhat.com>
  L:    cluster-devel@redhat.com
@@@ -4040,8 -4010,9 +4040,8 @@@ S:      Odd Fixe
  F:    drivers/media/usb/hdpvr/
  
  HWPOISON MEMORY FAILURE HANDLING
 -M:    Andi Kleen <andi@firstfloor.org>
 +M:    Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
  L:    linux-mm@kvack.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
  S:    Maintained
  F:    mm/memory-failure.c
  F:    mm/hwpoison-inject.c
@@@ -4232,11 -4203,9 +4232,11 @@@ S:    Maintaine
  F:    fs/hpfs/
  
  HSI SUBSYSTEM
 -M:    Sebastian Reichel <sre@debian.org>
 +M:    Sebastian Reichel <sre@kernel.org>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-hsi
 +F:    Documentation/hsi.txt
  F:    drivers/hsi/
  F:    include/linux/hsi/
  F:    include/uapi/linux/hsi/
@@@ -4391,7 -4360,7 +4391,7 @@@ S:      Supporte
  F:    drivers/crypto/nx/
  
  IBM Power 842 compression accelerator
 -M:    Robert Jennings <rcj@linux.vnet.ibm.com>
 +M:    Nathan Fontenot <nfont@linux.vnet.ibm.com>
  S:    Supported
  F:    drivers/crypto/nx/nx-842.c
  F:    include/linux/nx842.h
@@@ -4407,18 -4376,12 +4407,18 @@@ L:   netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmveth.*
  
 -IBM Power Virtual SCSI/FC Device Drivers
 -M:    Robert Jennings <rcj@linux.vnet.ibm.com>
 +IBM Power Virtual SCSI Device Drivers
 +M:    Nathan Fontenot <nfont@linux.vnet.ibm.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/ibmvscsi/ibmvscsi*
 +F:    drivers/scsi/ibmvscsi/viosrp.h
 +
 +IBM Power Virtual FC Device Drivers
 +M:    Brian King <brking@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
 -F:    drivers/scsi/ibmvscsi/
 -X:    drivers/scsi/ibmvscsi/ibmvstgt.c
 +F:    drivers/scsi/ibmvscsi/ibmvfc*
  
  IBM ServeRAID RAID DRIVER
  P:    Jack Hammer
@@@ -4849,14 -4812,6 +4849,14 @@@ L:    linux-kernel@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
  F:    kernel/irq/
 +
 +IRQCHIP DRIVERS
 +M:    Thomas Gleixner <tglx@linutronix.de>
 +M:    Jason Cooper <jason@lakedaemon.net>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
 +T:    git git://git.infradead.org/users/jcooper/linux.git irqchip/core
  F:    drivers/irqchip/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
@@@ -5153,19 -5108,14 +5153,19 @@@ F:   drivers/s390/kvm
  
  KERNEL VIRTUAL MACHINE (KVM) FOR ARM
  M:    Christoffer Dall <christoffer.dall@linaro.org>
 +M:    Marc Zyngier <marc.zyngier@arm.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kvmarm@lists.cs.columbia.edu
  W:    http://systems.cs.columbia.edu/projects/kvm-arm
  S:    Supported
  F:    arch/arm/include/uapi/asm/kvm*
  F:    arch/arm/include/asm/kvm*
  F:    arch/arm/kvm/
 +F:    virt/kvm/arm/
 +F:    include/kvm/arm_*
  
  KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
 +M:    Christoffer Dall <christoffer.dall@linaro.org>
  M:    Marc Zyngier <marc.zyngier@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kvmarm@lists.cs.columbia.edu
@@@ -5529,15 -5479,15 +5529,15 @@@ F:   Documentation/hwmon/ltc426
  F:    drivers/hwmon/ltc4261.c
  
  LTP (Linux Test Project)
 -M:    Shubham Goyal <shubham@linux.vnet.ibm.com>
  M:    Mike Frysinger <vapier@gentoo.org>
  M:    Cyril Hrubis <chrubis@suse.cz>
 -M:    Caspar Zhang <caspar@casparzhang.com>
  M:    Wanlong Gao <gaowanlong@cn.fujitsu.com>
 +M:    Jan Stancek <jstancek@redhat.com>
 +M:    Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
 +M:    Alexey Kodanev <alexey.kodanev@oracle.com>
  L:    ltp-list@lists.sourceforge.net (subscribers-only)
 -W:    http://ltp.sourceforge.net/
 +W:    http://linux-test-project.github.io/
  T:    git git://github.com/linux-test-project/ltp.git
 -T:    git git://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
  S:    Maintained
  
  M32R ARCHITECTURE
@@@ -5781,6 -5731,17 +5781,6 @@@ F:     include/linux/memory_hotplug.
  F:    include/linux/vmalloc.h
  F:    mm/
  
 -MEMORY RESOURCE CONTROLLER
 -M:    Johannes Weiner <hannes@cmpxchg.org>
 -M:    Michal Hocko <mhocko@suse.cz>
 -M:    Balbir Singh <bsingharora@gmail.com>
 -M:    KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
 -L:    cgroups@vger.kernel.org
 -L:    linux-mm@kvack.org
 -S:    Maintained
 -F:    mm/memcontrol.c
 -F:    mm/page_cgroup.c
 -
  MEMORY TECHNOLOGY DEVICES (MTD)
  M:    David Woodhouse <dwmw2@infradead.org>
  M:    Brian Norris <computersforpeace@gmail.com>
@@@ -5974,6 -5935,7 +5974,7 @@@ M:      Chris Ball <chris@printf.net
  M:    Ulf Hansson <ulf.hansson@linaro.org>
  L:    linux-mmc@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
+ T:    git git://git.linaro.org/people/ulf.hansson/mmc.git
  S:    Maintained
  F:    drivers/mmc/
  F:    include/linux/mmc/
@@@ -6035,28 -5997,6 +6036,28 @@@ M:    Petr Vandrovec <petr@vandrovec.name
  S:    Odd Fixes
  F:    fs/ncpfs/
  
 +NCR 5380 SCSI DRIVERS
 +M:    Finn Thain <fthain@telegraphics.com.au>
 +M:    Michael Schmitz <schmitzmic@gmail.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/scsi/g_NCR5380.txt
 +F:    drivers/scsi/NCR5380.*
 +F:    drivers/scsi/arm/cumana_1.c
 +F:    drivers/scsi/arm/oak.c
 +F:    drivers/scsi/atari_NCR5380.c
 +F:    drivers/scsi/atari_scsi.*
 +F:    drivers/scsi/dmx3191d.c
 +F:    drivers/scsi/dtc.*
 +F:    drivers/scsi/g_NCR5380.*
 +F:    drivers/scsi/g_NCR5380_mmio.c
 +F:    drivers/scsi/mac_scsi.*
 +F:    drivers/scsi/pas16.*
 +F:    drivers/scsi/sun3_NCR5380.c
 +F:    drivers/scsi/sun3_scsi.*
 +F:    drivers/scsi/sun3_scsi_vme.c
 +F:    drivers/scsi/t128.*
 +
  NCR DUAL 700 SCSI DRIVER (MICROCHANNEL)
  M:    "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
  L:    linux-scsi@vger.kernel.org
@@@ -6465,7 -6405,6 +6466,7 @@@ F:      drivers/usb/*/*omap
  F:    arch/arm/*omap*/usb*
  
  OMAP GPIO DRIVER
 +M:    Javier Martinez Canillas <javier@dowhile0.org>
  M:    Santosh Shilimkar <santosh.shilimkar@ti.com>
  M:    Kevin Hilman <khilman@deeprootsystems.com>
  L:    linux-omap@vger.kernel.org
@@@ -6562,10 -6501,10 +6563,10 @@@ T:   git git://openrisc.net/~jonas/linu
  F:    arch/openrisc/
  
  OPENVSWITCH
 -M:    Jesse Gross <jesse@nicira.com>
 +M:    Pravin Shelar <pshelar@nicira.com>
  L:    dev@openvswitch.org
  W:    http://openvswitch.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch.git
  S:    Maintained
  F:    net/openvswitch/
  
@@@ -6755,7 -6694,6 +6756,7 @@@ F:      Documentation/PCI
  F:    drivers/pci/
  F:    include/linux/pci*
  F:    arch/x86/pci/
 +F:    arch/x86/kernel/quirks.c
  
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <r65037@freescale.com>
@@@ -6803,14 -6741,6 +6804,14 @@@ L:    linux-pci@vger.kernel.or
  S:    Maintained
  F:    drivers/pci/host/*designware*
  
 +PCI DRIVER FOR GENERIC OF HOSTS
 +M:    Will Deacon <will.deacon@arm.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 +F:    drivers/pci/host/pci-host-generic.c
 +
  PCMCIA SUBSYSTEM
  P:    Linux PCMCIA Team
  L:    linux-pcmcia@lists.infradead.org
@@@ -6995,6 -6925,7 +6996,6 @@@ F:      drivers/power
  
  PNP SUPPORT
  M:    Rafael J. Wysocki <rafael.j.wysocki@intel.com>
 -M:    Bjorn Helgaas <bhelgaas@google.com>
  S:    Maintained
  F:    drivers/pnp/
  
@@@ -7347,6 -7278,7 +7348,6 @@@ F:      drivers/video/aty/aty128fb.
  RALINK RT2X00 WIRELESS LAN DRIVER
  P:    rt2x00 project
  M:    Ivo van Doorn <IvDoorn@gmail.com>
 -M:    Gertjan van Wingerde <gwingerde@gmail.com>
  M:    Helmut Schaa <helmut.schaa@googlemail.com>
  L:    linux-wireless@vger.kernel.org
  L:    users@rt2x00.serialmonkey.com (moderated for non-subscribers)
@@@ -7362,7 -7294,7 +7363,7 @@@ F:      Documentation/blockdev/ramdisk.tx
  F:    drivers/block/brd.c
  
  RANDOM NUMBER DRIVER
 -M:    Theodore Ts'o" <tytso@mit.edu>
 +M:    "Theodore Ts'o" <tytso@mit.edu>
  S:    Maintained
  F:    drivers/char/random.c
  
@@@ -7461,14 -7393,6 +7462,14 @@@ F:    drivers/rpmsg
  F:    Documentation/rpmsg.txt
  F:    include/linux/rpmsg.h
  
 +RESET CONTROLLER FRAMEWORK
 +M:    Philipp Zabel <p.zabel@pengutronix.de>
 +S:    Maintained
 +F:    drivers/reset/
 +F:    Documentation/devicetree/bindings/reset/
 +F:    include/linux/reset.h
 +F:    include/linux/reset-controller.h
 +
  RFKILL
  M:    Johannes Berg <johannes@sipsolutions.net>
  L:    linux-wireless@vger.kernel.org
@@@ -7718,6 -7642,7 +7719,6 @@@ L:      linux-media@vger.kernel.or
  Q:    https://patchwork.linuxtv.org/project/linux-media/list/
  S:    Supported
  F:    drivers/media/platform/exynos4-is/
 -F:    include/media/s5p_fimc.h
  
  SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
  M:    Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
@@@ -7750,6 -7675,7 +7751,6 @@@ F:      drivers/clk/samsung
  SAMSUNG SXGBE DRIVERS
  M:    Byungho An <bh74.an@samsung.com>
  M:    Girish K S <ks.giri@samsung.com>
 -M:    Siva Reddy Kallam <siva.kallam@samsung.com>
  M:    Vipul Pandya <vipul.pandya@samsung.com>
  S:    Supported
  L:    netdev@vger.kernel.org
@@@ -8020,26 -7946,6 +8021,26 @@@ M:    Robin Holt <robinmholt@gmail.com
  S:    Maintained
  F:    drivers/misc/sgi-xp/
  
 +SI2157 MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/tuners/si2157*
 +
 +SI2168 MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/dvb-frontends/si2168*
 +
  SI470X FM RADIO RECEIVER I2C DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -8339,7 -8245,6 +8340,7 @@@ L:      alsa-devel@alsa-project.org (moderat
  W:    http://www.alsa-project.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  T:    git git://git.alsa-project.org/alsa-kernel.git
 +Q:    http://patchwork.kernel.org/project/alsa-devel/list/
  S:    Maintained
  F:    Documentation/sound/
  F:    include/sound/
@@@ -8560,7 -8465,7 +8561,7 @@@ S:      Maintaine
  F:    drivers/staging/olpc_dcon/
  
  STAGING - OZMO DEVICES USB OVER WIFI DRIVER
 -M:    Rupesh Gujare <rupesh.gujare@atmel.com>
 +M:    Shigekatsu Tateno <shigekatsu.tateno@atmel.com>
  S:    Maintained
  F:    drivers/staging/ozwpan/
  
@@@ -8575,13 -8480,6 +8576,13 @@@ M:    Florian Schilhabel <florian.c.schilh
  S:    Odd Fixes
  F:    drivers/staging/rtl8712/
  
 +STAGING - REALTEK RTL8723U WIRELESS DRIVER
 +M:    Larry Finger <Larry.Finger@lwfinger.net>
 +M:    Jes Sorensen <Jes.Sorensen@redhat.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/rtl8723au/
 +
  STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER
  M:    Teddy Wang <teddy.wang@siliconmotion.com.cn>
  S:    Odd Fixes
@@@ -9103,7 -9001,7 +9104,7 @@@ F:      include/linux/toshiba.
  F:    include/uapi/linux/toshiba.h
  
  TMIO MMC DRIVER
- M:    Ian Molton <ian@mnementh.co.uk>
+ M:    Ian Molton <ian.molton@codethink.co.uk>
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
  F:    drivers/mmc/host/tmio_mmc*
@@@ -9144,6 -9042,7 +9145,6 @@@ F:      drivers/char/tpm
  
  TRACING
  M:    Steven Rostedt <rostedt@goodmis.org>
 -M:    Frederic Weisbecker <fweisbec@gmail.com>
  M:    Ingo Molnar <mingo@redhat.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Maintained
@@@ -9200,9 -9099,6 +9201,9 @@@ F:      arch/um/os-Linux/drivers
  
  TURBOCHANNEL SUBSYSTEM
  M:    "Maciej W. Rozycki" <macro@linux-mips.org>
 +M:    Ralf Baechle <ralf@linux-mips.org>
 +L:    linux-mips@linux-mips.org
 +Q:    http://patchwork.linux-mips.org/project/linux-mips/list/
  S:    Maintained
  F:    drivers/tc/
  F:    include/linux/tc.h
@@@ -10056,7 -9952,7 +10057,7 @@@ F:    drivers/net/hamradio/*scc.
  F:    drivers/net/hamradio/z8530.h
  
  ZBUD COMPRESSED PAGE ALLOCATOR
 -M:    Seth Jennings <sjenning@linux.vnet.ibm.com>
 +M:    Seth Jennings <sjennings@variantweb.net>
  L:    linux-mm@kvack.org
  S:    Maintained
  F:    mm/zbud.c
@@@ -10101,7 -9997,7 +10102,7 @@@ F:    mm/zsmalloc.
  F:    include/linux/zsmalloc.h
  
  ZSWAP COMPRESSED SWAP CACHING
 -M:    Seth Jennings <sjenning@linux.vnet.ibm.com>
 +M:    Seth Jennings <sjennings@variantweb.net>
  L:    linux-mm@kvack.org
  S:    Maintained
  F:    mm/zswap.c
diff --combined drivers/mmc/host/mmci.c
index a084edd37af53f379a429d40ea0f9ab6851b80f5,7e853932393bf00a0131d1a93206fc0c57ea5daa..7ad463e9741c0e4359b0c2c10a43f83ea3683995
@@@ -13,7 -13,6 +13,7 @@@
  #include <linux/init.h>
  #include <linux/ioport.h>
  #include <linux/device.h>
 +#include <linux/io.h>
  #include <linux/interrupt.h>
  #include <linux/kernel.h>
  #include <linux/slab.h>
@@@ -24,7 -23,6 +24,7 @@@
  #include <linux/mmc/pm.h>
  #include <linux/mmc/host.h>
  #include <linux/mmc/card.h>
 +#include <linux/mmc/slot-gpio.h>
  #include <linux/amba/bus.h>
  #include <linux/clk.h>
  #include <linux/scatterlist.h>
@@@ -301,7 -299,8 +301,8 @@@ static void mmci_set_clkreg(struct mmci
        if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_8)
                clk |= MCI_ST_8BIT_BUS;
  
-       if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50)
+       if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50 ||
+           host->mmc->ios.timing == MMC_TIMING_MMC_DDR52)
                clk |= MCI_ST_UX500_NEG_EDGE;
  
        mmci_write_clkreg(host, clk);
@@@ -366,6 -365,7 +367,6 @@@ static void mmci_init_sg(struct mmci_ho
  #ifdef CONFIG_DMA_ENGINE
  static void mmci_dma_setup(struct mmci_host *host)
  {
 -      struct mmci_platform_data *plat = host->plat;
        const char *rxname, *txname;
        dma_cap_mask_t mask;
  
        dma_cap_zero(mask);
        dma_cap_set(DMA_SLAVE, mask);
  
 -      if (plat && plat->dma_filter) {
 -              if (!host->dma_rx_channel && plat->dma_rx_param) {
 -                      host->dma_rx_channel = dma_request_channel(mask,
 -                                                         plat->dma_filter,
 -                                                         plat->dma_rx_param);
 -                      /* E.g if no DMA hardware is present */
 -                      if (!host->dma_rx_channel)
 -                              dev_err(mmc_dev(host->mmc), "no RX DMA channel\n");
 -              }
 -
 -              if (!host->dma_tx_channel && plat->dma_tx_param) {
 -                      host->dma_tx_channel = dma_request_channel(mask,
 -                                                         plat->dma_filter,
 -                                                         plat->dma_tx_param);
 -                      if (!host->dma_tx_channel)
 -                              dev_warn(mmc_dev(host->mmc), "no TX DMA channel\n");
 -              }
 -      }
 -
        /*
         * If only an RX channel is specified, the driver will
         * attempt to use it bidirectionally, however if it is
   */
  static inline void mmci_dma_release(struct mmci_host *host)
  {
 -      struct mmci_platform_data *plat = host->plat;
 -
        if (host->dma_rx_channel)
                dma_release_channel(host->dma_rx_channel);
 -      if (host->dma_tx_channel && plat->dma_tx_param)
 +      if (host->dma_tx_channel)
                dma_release_channel(host->dma_tx_channel);
        host->dma_rx_channel = host->dma_tx_channel = NULL;
  }
@@@ -764,7 -785,8 +765,8 @@@ static void mmci_start_data(struct mmci
                        mmci_write_clkreg(host, clk);
                }
  
-       if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50)
+       if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50 ||
+           host->mmc->ios.timing == MMC_TIMING_MMC_DDR52)
                datactrl |= MCI_ST_DPSM_DDRMODE;
  
        /*
@@@ -1265,7 -1287,7 +1267,7 @@@ static void mmci_set_ios(struct mmc_hos
                 * indicating signal direction for the signals in
                 * the SD/MMC bus and feedback-clock usage.
                 */
 -              pwr |= host->plat->sigdir;
 +              pwr |= host->pwr_reg_add;
  
                if (ios->bus_width == MMC_BUS_WIDTH_4)
                        pwr &= ~MCI_ST_DATA74DIREN;
        pm_runtime_put_autosuspend(mmc_dev(mmc));
  }
  
 -static int mmci_get_ro(struct mmc_host *mmc)
 -{
 -      struct mmci_host *host = mmc_priv(mmc);
 -
 -      if (host->gpio_wp == -ENOSYS)
 -              return -ENOSYS;
 -
 -      return gpio_get_value_cansleep(host->gpio_wp);
 -}
 -
  static int mmci_get_cd(struct mmc_host *mmc)
  {
        struct mmci_host *host = mmc_priv(mmc);
        struct mmci_platform_data *plat = host->plat;
 -      unsigned int status;
 +      unsigned int status = mmc_gpio_get_cd(mmc);
  
 -      if (host->gpio_cd == -ENOSYS) {
 +      if (status == -ENOSYS) {
                if (!plat->status)
                        return 1; /* Assume always present */
  
                status = plat->status(mmc_dev(host->mmc));
 -      } else
 -              status = !!gpio_get_value_cansleep(host->gpio_cd)
 -                      ^ plat->cd_invert;
 -
 -      /*
 -       * Use positive logic throughout - status is zero for no card,
 -       * non-zero for card inserted.
 -       */
 +      }
        return status;
  }
  
@@@ -1354,44 -1393,70 +1356,44 @@@ static int mmci_sig_volt_switch(struct 
        return ret;
  }
  
 -static irqreturn_t mmci_cd_irq(int irq, void *dev_id)
 -{
 -      struct mmci_host *host = dev_id;
 -
 -      mmc_detect_change(host->mmc, msecs_to_jiffies(500));
 -
 -      return IRQ_HANDLED;
 -}
 -
  static struct mmc_host_ops mmci_ops = {
        .request        = mmci_request,
        .pre_req        = mmci_pre_request,
        .post_req       = mmci_post_request,
        .set_ios        = mmci_set_ios,
 -      .get_ro         = mmci_get_ro,
 +      .get_ro         = mmc_gpio_get_ro,
        .get_cd         = mmci_get_cd,
        .start_signal_voltage_switch = mmci_sig_volt_switch,
  };
  
 -#ifdef CONFIG_OF
 -static void mmci_dt_populate_generic_pdata(struct device_node *np,
 -                                      struct mmci_platform_data *pdata)
 +static int mmci_of_parse(struct device_node *np, struct mmc_host *mmc)
  {
 -      int bus_width = 0;
 -
 -      pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
 -      pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);
 +      struct mmci_host *host = mmc_priv(mmc);
 +      int ret = mmc_of_parse(mmc);
  
 -      if (of_get_property(np, "cd-inverted", NULL))
 -              pdata->cd_invert = true;
 -      else
 -              pdata->cd_invert = false;
 +      if (ret)
 +              return ret;
  
 -      of_property_read_u32(np, "max-frequency", &pdata->f_max);
 -      if (!pdata->f_max)
 -              pr_warn("%s has no 'max-frequency' property\n", np->full_name);
 +      if (of_get_property(np, "st,sig-dir-dat0", NULL))
 +              host->pwr_reg_add |= MCI_ST_DATA0DIREN;
 +      if (of_get_property(np, "st,sig-dir-dat2", NULL))
 +              host->pwr_reg_add |= MCI_ST_DATA2DIREN;
 +      if (of_get_property(np, "st,sig-dir-dat31", NULL))
 +              host->pwr_reg_add |= MCI_ST_DATA31DIREN;
 +      if (of_get_property(np, "st,sig-dir-dat74", NULL))
 +              host->pwr_reg_add |= MCI_ST_DATA74DIREN;
 +      if (of_get_property(np, "st,sig-dir-cmd", NULL))
 +              host->pwr_reg_add |= MCI_ST_CMDDIREN;
 +      if (of_get_property(np, "st,sig-pin-fbclk", NULL))
 +              host->pwr_reg_add |= MCI_ST_FBCLKEN;
  
        if (of_get_property(np, "mmc-cap-mmc-highspeed", NULL))
 -              pdata->capabilities |= MMC_CAP_MMC_HIGHSPEED;
 +              mmc->caps |= MMC_CAP_MMC_HIGHSPEED;
        if (of_get_property(np, "mmc-cap-sd-highspeed", NULL))
 -              pdata->capabilities |= MMC_CAP_SD_HIGHSPEED;
 +              mmc->caps |= MMC_CAP_SD_HIGHSPEED;
  
 -      of_property_read_u32(np, "bus-width", &bus_width);
 -      switch (bus_width) {
 -      case 0 :
 -              /* No bus-width supplied. */
 -              break;
 -      case 4 :
 -              pdata->capabilities |= MMC_CAP_4_BIT_DATA;
 -              break;
 -      case 8 :
 -              pdata->capabilities |= MMC_CAP_8_BIT_DATA;
 -              break;
 -      default :
 -              pr_warn("%s: Unsupported bus width\n", np->full_name);
 -      }
 -}
 -#else
 -static void mmci_dt_populate_generic_pdata(struct device_node *np,
 -                                      struct mmci_platform_data *pdata)
 -{
 -      return;
 +      return 0;
  }
 -#endif
  
  static int mmci_probe(struct amba_device *dev,
        const struct amba_id *id)
                        return -ENOMEM;
        }
  
 -      if (np)
 -              mmci_dt_populate_generic_pdata(np, plat);
 +      mmc = mmc_alloc_host(sizeof(struct mmci_host), &dev->dev);
 +      if (!mmc)
 +              return -ENOMEM;
  
 -      ret = amba_request_regions(dev, DRIVER_NAME);
 +      ret = mmci_of_parse(np, mmc);
        if (ret)
 -              goto out;
 -
 -      mmc = mmc_alloc_host(sizeof(struct mmci_host), &dev->dev);
 -      if (!mmc) {
 -              ret = -ENOMEM;
 -              goto rel_regions;
 -      }
 +              goto host_free;
  
        host = mmc_priv(mmc);
        host->mmc = mmc;
  
 -      host->gpio_wp = -ENOSYS;
 -      host->gpio_cd = -ENOSYS;
 -      host->gpio_cd_irq = -1;
 -
        host->hw_designer = amba_manf(dev);
        host->hw_revision = amba_rev(dev);
        dev_dbg(mmc_dev(mmc), "designer ID = 0x%02x\n", host->hw_designer);
                dev_dbg(mmc_dev(mmc), "eventual mclk rate: %u Hz\n",
                        host->mclk);
        }
 +
        host->phybase = dev->res.start;
 -      host->base = ioremap(dev->res.start, resource_size(&dev->res));
 -      if (!host->base) {
 -              ret = -ENOMEM;
 +      host->base = devm_ioremap_resource(&dev->dev, &dev->res);
 +      if (IS_ERR(host->base)) {
 +              ret = PTR_ERR(host->base);
                goto clk_disable;
        }
  
        else
                mmc->f_min = DIV_ROUND_UP(host->mclk, 512);
        /*
 -       * If the platform data supplies a maximum operating
 -       * frequency, this takes precedence. Else, we fall back
 -       * to using the module parameter, which has a (low)
 -       * default value in case it is not specified. Either
 -       * value must not exceed the clock rate into the block,
 -       * of course.
 +       * If no maximum operating frequency is supplied, fall back to use
 +       * the module parameter, which has a (low) default value in case it
 +       * is not specified. Either value must not exceed the clock rate into
 +       * the block, of course.
         */
 -      if (plat->f_max)
 -              mmc->f_max = min(host->mclk, plat->f_max);
 +      if (mmc->f_max)
 +              mmc->f_max = min(host->mclk, mmc->f_max);
        else
                mmc->f_max = min(host->mclk, fmax);
        dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
        else if (plat->ocr_mask)
                dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n");
  
 -      mmc->caps = plat->capabilities;
 -      mmc->caps2 = plat->capabilities2;
 +      /* DT takes precedence over platform data. */
 +      if (!np) {
 +              if (!plat->cd_invert)
 +                      mmc->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH;
 +              mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH;
 +      }
 +
 +      /* We support these capabilities. */
 +      mmc->caps |= MMC_CAP_CMD23;
  
        if (variant->busy_detect) {
                mmci_ops.card_busy = mmci_card_busy;
        mmc->ops = &mmci_ops;
  
        /* We support these PM capabilities. */
 -      mmc->pm_caps = MMC_PM_KEEP_POWER;
 +      mmc->pm_caps |= MMC_PM_KEEP_POWER;
  
        /*
         * We can do SGIO
        writel(0, host->base + MMCIMASK1);
        writel(0xfff, host->base + MMCICLEAR);
  
 -      if (plat->gpio_cd == -EPROBE_DEFER) {
 -              ret = -EPROBE_DEFER;
 -              goto err_gpio_cd;
 -      }
 -      if (gpio_is_valid(plat->gpio_cd)) {
 -              ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)");
 -              if (ret == 0)
 -                      ret = gpio_direction_input(plat->gpio_cd);
 -              if (ret == 0)
 -                      host->gpio_cd = plat->gpio_cd;
 -              else if (ret != -ENOSYS)
 -                      goto err_gpio_cd;
 -
 -              /*
 -               * A gpio pin that will detect cards when inserted and removed
 -               * will most likely want to trigger on the edges if it is
 -               * 0 when ejected and 1 when inserted (or mutatis mutandis
 -               * for the inverted case) so we request triggers on both
 -               * edges.
 -               */
 -              ret = request_any_context_irq(gpio_to_irq(plat->gpio_cd),
 -                              mmci_cd_irq,
 -                              IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
 -                              DRIVER_NAME " (cd)", host);
 -              if (ret >= 0)
 -                      host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd);
 -      }
 -      if (plat->gpio_wp == -EPROBE_DEFER) {
 -              ret = -EPROBE_DEFER;
 -              goto err_gpio_wp;
 +      /* If DT, cd/wp gpios must be supplied through it. */
 +      if (!np && gpio_is_valid(plat->gpio_cd)) {
 +              ret = mmc_gpio_request_cd(mmc, plat->gpio_cd, 0);
 +              if (ret)
 +                      goto clk_disable;
        }
 -      if (gpio_is_valid(plat->gpio_wp)) {
 -              ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)");
 -              if (ret == 0)
 -                      ret = gpio_direction_input(plat->gpio_wp);
 -              if (ret == 0)
 -                      host->gpio_wp = plat->gpio_wp;
 -              else if (ret != -ENOSYS)
 -                      goto err_gpio_wp;
 +      if (!np && gpio_is_valid(plat->gpio_wp)) {
 +              ret = mmc_gpio_request_ro(mmc, plat->gpio_wp);
 +              if (ret)
 +                      goto clk_disable;
        }
  
 -      if ((host->plat->status || host->gpio_cd != -ENOSYS)
 -          && host->gpio_cd_irq < 0)
 -              mmc->caps |= MMC_CAP_NEEDS_POLL;
 -
 -      ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
 +      ret = devm_request_irq(&dev->dev, dev->irq[0], mmci_irq, IRQF_SHARED,
 +                      DRIVER_NAME " (cmd)", host);
        if (ret)
 -              goto unmap;
 +              goto clk_disable;
  
        if (!dev->irq[1])
                host->singleirq = true;
        else {
 -              ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,
 -                                DRIVER_NAME " (pio)", host);
 +              ret = devm_request_irq(&dev->dev, dev->irq[1], mmci_pio_irq,
 +                              IRQF_SHARED, DRIVER_NAME " (pio)", host);
                if (ret)
 -                      goto irq0_free;
 +                      goto clk_disable;
        }
  
        writel(MCI_IRQENABLE, host->base + MMCIMASK0);
  
        return 0;
  
 - irq0_free:
 -      free_irq(dev->irq[0], host);
 - unmap:
 -      if (host->gpio_wp != -ENOSYS)
 -              gpio_free(host->gpio_wp);
 - err_gpio_wp:
 -      if (host->gpio_cd_irq >= 0)
 -              free_irq(host->gpio_cd_irq, host);
 -      if (host->gpio_cd != -ENOSYS)
 -              gpio_free(host->gpio_cd);
 - err_gpio_cd:
 -      iounmap(host->base);
   clk_disable:
        clk_disable_unprepare(host->clk);
   host_free:
        mmc_free_host(mmc);
 - rel_regions:
 -      amba_release_regions(dev);
 - out:
        return ret;
  }
  
@@@ -1624,46 -1739,92 +1626,46 @@@ static int mmci_remove(struct amba_devi
                writel(0, host->base + MMCIDATACTRL);
  
                mmci_dma_release(host);
 -              free_irq(dev->irq[0], host);
 -              if (!host->singleirq)
 -                      free_irq(dev->irq[1], host);
 -
 -              if (host->gpio_wp != -ENOSYS)
 -                      gpio_free(host->gpio_wp);
 -              if (host->gpio_cd_irq >= 0)
 -                      free_irq(host->gpio_cd_irq, host);
 -              if (host->gpio_cd != -ENOSYS)
 -                      gpio_free(host->gpio_cd);
 -
 -              iounmap(host->base);
                clk_disable_unprepare(host->clk);
 -
                mmc_free_host(mmc);
 -
 -              amba_release_regions(dev);
 -      }
 -
 -      return 0;
 -}
 -
 -#ifdef CONFIG_SUSPEND
 -static int mmci_suspend(struct device *dev)
 -{
 -      struct amba_device *adev = to_amba_device(dev);
 -      struct mmc_host *mmc = amba_get_drvdata(adev);
 -
 -      if (mmc) {
 -              struct mmci_host *host = mmc_priv(mmc);
 -              pm_runtime_get_sync(dev);
 -              writel(0, host->base + MMCIMASK0);
        }
  
        return 0;
  }
  
 -static int mmci_resume(struct device *dev)
 -{
 -      struct amba_device *adev = to_amba_device(dev);
 -      struct mmc_host *mmc = amba_get_drvdata(adev);
 -
 -      if (mmc) {
 -              struct mmci_host *host = mmc_priv(mmc);
 -              writel(MCI_IRQENABLE, host->base + MMCIMASK0);
 -              pm_runtime_put(dev);
 -      }
 -
 -      return 0;
 -}
 -#endif
 -
 -#ifdef CONFIG_PM_RUNTIME
 +#ifdef CONFIG_PM
  static void mmci_save(struct mmci_host *host)
  {
        unsigned long flags;
  
 -      if (host->variant->pwrreg_nopower) {
 -              spin_lock_irqsave(&host->lock, flags);
 +      spin_lock_irqsave(&host->lock, flags);
  
 -              writel(0, host->base + MMCIMASK0);
 +      writel(0, host->base + MMCIMASK0);
 +      if (host->variant->pwrreg_nopower) {
                writel(0, host->base + MMCIDATACTRL);
                writel(0, host->base + MMCIPOWER);
                writel(0, host->base + MMCICLOCK);
 -              mmci_reg_delay(host);
 -
 -              spin_unlock_irqrestore(&host->lock, flags);
        }
 +      mmci_reg_delay(host);
  
 +      spin_unlock_irqrestore(&host->lock, flags);
  }
  
  static void mmci_restore(struct mmci_host *host)
  {
        unsigned long flags;
  
 -      if (host->variant->pwrreg_nopower) {
 -              spin_lock_irqsave(&host->lock, flags);
 +      spin_lock_irqsave(&host->lock, flags);
  
 +      if (host->variant->pwrreg_nopower) {
                writel(host->clk_reg, host->base + MMCICLOCK);
                writel(host->datactrl_reg, host->base + MMCIDATACTRL);
                writel(host->pwr_reg, host->base + MMCIPOWER);
 -              writel(MCI_IRQENABLE, host->base + MMCIMASK0);
 -              mmci_reg_delay(host);
 -
 -              spin_unlock_irqrestore(&host->lock, flags);
        }
 +      writel(MCI_IRQENABLE, host->base + MMCIMASK0);
 +      mmci_reg_delay(host);
 +
 +      spin_unlock_irqrestore(&host->lock, flags);
  }
  
  static int mmci_runtime_suspend(struct device *dev)
@@@ -1698,9 -1859,8 +1700,9 @@@ static int mmci_runtime_resume(struct d
  #endif
  
  static const struct dev_pm_ops mmci_dev_pm_ops = {
 -      SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume)
 -      SET_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
 +      SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 +                              pm_runtime_force_resume)
 +      SET_PM_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
  };
  
  static struct amba_id mmci_ids[] = {
index 0b9ded13a3ae89d72a94e7e8e075f62496483f0e,76cfdcc17c476e5f0e73dee80e264d34feb0b0ce..0d519649b5758a943512f16b853bbfff095ee442
  #include <linux/mfd/rtsx_pci.h>
  #include <asm/unaligned.h>
  
 -struct realtek_next {
 -      unsigned int    sg_count;
 -      s32             cookie;
 -};
 -
  struct realtek_pci_sdmmc {
        struct platform_device  *pdev;
        struct rtsx_pcr         *pcr;
        struct mmc_host         *mmc;
        struct mmc_request      *mrq;
 -      struct mmc_command      *cmd;
 -      struct mmc_data         *data;
 -
 -      spinlock_t              lock;
 -      struct timer_list       timer;
 -      struct tasklet_struct   cmd_tasklet;
 -      struct tasklet_struct   data_tasklet;
 -      struct tasklet_struct   finish_tasklet;
 -
 -      u8                      rsp_type;
 -      u8                      rsp_len;
 -      int                     sg_count;
 +
 +      struct mutex            host_mutex;
 +
        u8                      ssc_depth;
        unsigned int            clock;
        bool                    vpclk;
        int                     power_state;
  #define SDMMC_POWER_ON                1
  #define SDMMC_POWER_OFF               0
 -
 -      struct realtek_next     next_data;
  };
  
 -static int sd_start_multi_rw(struct realtek_pci_sdmmc *host,
 -              struct mmc_request *mrq);
 -
  static inline struct device *sdmmc_dev(struct realtek_pci_sdmmc *host)
  {
        return &(host->pdev->dev);
@@@ -86,6 -105,95 +86,6 @@@ static void sd_print_debug_regs(struct 
  #define sd_print_debug_regs(host)
  #endif /* DEBUG */
  
 -static void sd_isr_done_transfer(struct platform_device *pdev)
 -{
 -      struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
 -
 -      spin_lock(&host->lock);
 -      if (host->cmd)
 -              tasklet_schedule(&host->cmd_tasklet);
 -      if (host->data)
 -              tasklet_schedule(&host->data_tasklet);
 -      spin_unlock(&host->lock);
 -}
 -
 -static void sd_request_timeout(unsigned long host_addr)
 -{
 -      struct realtek_pci_sdmmc *host = (struct realtek_pci_sdmmc *)host_addr;
 -      unsigned long flags;
 -
 -      spin_lock_irqsave(&host->lock, flags);
 -
 -      if (!host->mrq) {
 -              dev_err(sdmmc_dev(host), "error: no request exist\n");
 -              goto out;
 -      }
 -
 -      if (host->cmd)
 -              host->cmd->error = -ETIMEDOUT;
 -      if (host->data)
 -              host->data->error = -ETIMEDOUT;
 -
 -      dev_dbg(sdmmc_dev(host), "timeout for request\n");
 -
 -out:
 -      tasklet_schedule(&host->finish_tasklet);
 -      spin_unlock_irqrestore(&host->lock, flags);
 -}
 -
 -static void sd_finish_request(unsigned long host_addr)
 -{
 -      struct realtek_pci_sdmmc *host = (struct realtek_pci_sdmmc *)host_addr;
 -      struct rtsx_pcr *pcr = host->pcr;
 -      struct mmc_request *mrq;
 -      struct mmc_command *cmd;
 -      struct mmc_data *data;
 -      unsigned long flags;
 -      bool any_error;
 -
 -      spin_lock_irqsave(&host->lock, flags);
 -
 -      del_timer(&host->timer);
 -      mrq = host->mrq;
 -      if (!mrq) {
 -              dev_err(sdmmc_dev(host), "error: no request need finish\n");
 -              goto out;
 -      }
 -
 -      cmd = mrq->cmd;
 -      data = mrq->data;
 -
 -      any_error = (mrq->sbc && mrq->sbc->error) ||
 -              (mrq->stop && mrq->stop->error) ||
 -              (cmd && cmd->error) || (data && data->error);
 -
 -      if (any_error) {
 -              rtsx_pci_stop_cmd(pcr);
 -              sd_clear_error(host);
 -      }
 -
 -      if (data) {
 -              if (any_error)
 -                      data->bytes_xfered = 0;
 -              else
 -                      data->bytes_xfered = data->blocks * data->blksz;
 -
 -              if (!data->host_cookie)
 -                      rtsx_pci_dma_unmap_sg(pcr, data->sg, data->sg_len,
 -                                      data->flags & MMC_DATA_READ);
 -
 -      }
 -
 -      host->mrq = NULL;
 -      host->cmd = NULL;
 -      host->data = NULL;
 -
 -out:
 -      spin_unlock_irqrestore(&host->lock, flags);
 -      mutex_unlock(&pcr->pcr_mutex);
 -      mmc_request_done(host->mmc, mrq);
 -}
 -
  static int sd_read_data(struct realtek_pci_sdmmc *host, u8 *cmd, u16 byte_cnt,
                u8 *buf, int buf_len, int timeout)
  {
@@@ -203,8 -311,7 +203,8 @@@ static int sd_write_data(struct realtek
        return 0;
  }
  
 -static void sd_send_cmd(struct realtek_pci_sdmmc *host, struct mmc_command *cmd)
 +static void sd_send_cmd_get_rsp(struct realtek_pci_sdmmc *host,
 +              struct mmc_command *cmd)
  {
        struct rtsx_pcr *pcr = host->pcr;
        u8 cmd_idx = (u8)cmd->opcode;
        int err = 0;
        int timeout = 100;
        int i;
 +      u8 *ptr;
 +      int stat_idx = 0;
        u8 rsp_type;
        int rsp_len = 5;
 -      unsigned long flags;
 -
 -      if (host->cmd)
 -              dev_err(sdmmc_dev(host), "error: cmd already exist\n");
 -
 -      host->cmd = cmd;
 +      bool clock_toggled = false;
  
        dev_dbg(sdmmc_dev(host), "%s: SD/MMC CMD %d, arg = 0x%08x\n",
                        __func__, cmd_idx, arg);
        case MMC_RSP_R1:
                rsp_type = SD_RSP_TYPE_R1;
                break;
+       case MMC_RSP_R1 & ~MMC_RSP_CRC:
+               rsp_type = SD_RSP_TYPE_R1 | SD_NO_CHECK_CRC7;
+               break;
        case MMC_RSP_R1B:
                rsp_type = SD_RSP_TYPE_R1b;
                break;
                err = -EINVAL;
                goto out;
        }
 -      host->rsp_type = rsp_type;
 -      host->rsp_len = rsp_len;
  
        if (rsp_type == SD_RSP_TYPE_R1b)
                timeout = 3000;
                                0xFF, SD_CLK_TOGGLE_EN);
                if (err < 0)
                        goto out;
 +
 +              clock_toggled = true;
        }
  
        rtsx_pci_init_cmd(pcr);
                /* Read data from ping-pong buffer */
                for (i = PPBUF_BASE2; i < PPBUF_BASE2 + 16; i++)
                        rtsx_pci_add_cmd(pcr, READ_REG_CMD, (u16)i, 0, 0);
 +              stat_idx = 16;
        } else if (rsp_type != SD_RSP_TYPE_R0) {
                /* Read data from SD_CMDx registers */
                for (i = SD_CMD0; i <= SD_CMD4; i++)
                        rtsx_pci_add_cmd(pcr, READ_REG_CMD, (u16)i, 0, 0);
 +              stat_idx = 5;
        }
  
        rtsx_pci_add_cmd(pcr, READ_REG_CMD, SD_STAT1, 0, 0);
  
 -      mod_timer(&host->timer, jiffies + msecs_to_jiffies(timeout));
 -
 -      spin_lock_irqsave(&pcr->lock, flags);
 -      pcr->trans_result = TRANS_NOT_READY;
 -      rtsx_pci_send_cmd_no_wait(pcr);
 -      spin_unlock_irqrestore(&pcr->lock, flags);
 -
 -      return;
 -
 -out:
 -      cmd->error = err;
 -      tasklet_schedule(&host->finish_tasklet);
 -}
 -
 -static void sd_get_rsp(unsigned long host_addr)
 -{
 -      struct realtek_pci_sdmmc *host = (struct realtek_pci_sdmmc *)host_addr;
 -      struct rtsx_pcr *pcr = host->pcr;
 -      struct mmc_command *cmd;
 -      int i, err = 0, stat_idx;
 -      u8 *ptr, rsp_type;
 -      unsigned long flags;
 -
 -      spin_lock_irqsave(&host->lock, flags);
 -
 -      cmd = host->cmd;
 -      host->cmd = NULL;
 -
 -      if (!cmd) {
 -              dev_err(sdmmc_dev(host), "error: cmd not exist\n");
 +      err = rtsx_pci_send_cmd(pcr, timeout);
 +      if (err < 0) {
 +              sd_print_debug_regs(host);
 +              sd_clear_error(host);
 +              dev_dbg(sdmmc_dev(host),
 +                      "rtsx_pci_send_cmd error (err = %d)\n", err);
                goto out;
        }
  
 -      spin_lock(&pcr->lock);
 -      if (pcr->trans_result == TRANS_NO_DEVICE)
 -              err = -ENODEV;
 -      else if (pcr->trans_result != TRANS_RESULT_OK)
 -              err = -EINVAL;
 -      spin_unlock(&pcr->lock);
 -
 -      if (err < 0)
 -              goto out;
 -
 -      rsp_type = host->rsp_type;
 -      stat_idx = host->rsp_len;
 -
        if (rsp_type == SD_RSP_TYPE_R0) {
                err = 0;
                goto out;
                                cmd->resp[0]);
        }
  
 -      if (cmd == host->mrq->sbc) {
 -              sd_send_cmd(host, host->mrq->cmd);
 -              spin_unlock_irqrestore(&host->lock, flags);
 -              return;
 -      }
 -
 -      if (cmd == host->mrq->stop)
 -              goto out;
 -
 -      if (cmd->data) {
 -              sd_start_multi_rw(host, host->mrq);
 -              spin_unlock_irqrestore(&host->lock, flags);
 -              return;
 -      }
 -
  out:
        cmd->error = err;
  
 -      tasklet_schedule(&host->finish_tasklet);
 -      spin_unlock_irqrestore(&host->lock, flags);
 -}
 -
 -static int sd_pre_dma_transfer(struct realtek_pci_sdmmc *host,
 -                      struct mmc_data *data, struct realtek_next *next)
 -{
 -      struct rtsx_pcr *pcr = host->pcr;
 -      int read = data->flags & MMC_DATA_READ;
 -      int sg_count = 0;
 -
 -      if (!next && data->host_cookie &&
 -              data->host_cookie != host->next_data.cookie) {
 -              dev_err(sdmmc_dev(host),
 -                      "error: invalid cookie data[%d] host[%d]\n",
 -                      data->host_cookie, host->next_data.cookie);
 -              data->host_cookie = 0;
 -      }
 -
 -      if (next || (!next && data->host_cookie != host->next_data.cookie))
 -              sg_count = rtsx_pci_dma_map_sg(pcr,
 -                              data->sg, data->sg_len, read);
 -      else
 -              sg_count = host->next_data.sg_count;
 -
 -      if (next) {
 -              next->sg_count = sg_count;
 -              if (++next->cookie < 0)
 -                      next->cookie = 1;
 -              data->host_cookie = next->cookie;
 -      }
 -
 -      return sg_count;
 -}
 -
 -static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
 -              bool is_first_req)
 -{
 -      struct realtek_pci_sdmmc *host = mmc_priv(mmc);
 -      struct mmc_data *data = mrq->data;
 -
 -      if (data->host_cookie) {
 -              dev_err(sdmmc_dev(host),
 -                      "error: descard already cookie data[%d]\n",
 -                      data->host_cookie);
 -              data->host_cookie = 0;
 -      }
 -
 -      dev_dbg(sdmmc_dev(host), "dma sg prepared: %d\n",
 -              sd_pre_dma_transfer(host, data, &host->next_data));
 -}
 -
 -static void sdmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
 -              int err)
 -{
 -      struct realtek_pci_sdmmc *host = mmc_priv(mmc);
 -      struct rtsx_pcr *pcr = host->pcr;
 -      struct mmc_data *data = mrq->data;
 -      int read = data->flags & MMC_DATA_READ;
 -
 -      rtsx_pci_dma_unmap_sg(pcr, data->sg, data->sg_len, read);
 -      data->host_cookie = 0;
 +      if (err && clock_toggled)
 +              rtsx_pci_write_register(pcr, SD_BUS_STAT,
 +                              SD_CLK_TOGGLE_EN | SD_CLK_FORCE_STOP, 0);
  }
  
 -static int sd_start_multi_rw(struct realtek_pci_sdmmc *host,
 -              struct mmc_request *mrq)
 +static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)
  {
        struct rtsx_pcr *pcr = host->pcr;
        struct mmc_host *mmc = host->mmc;
        struct mmc_card *card = mmc->card;
        struct mmc_data *data = mrq->data;
        int uhs = mmc_card_uhs(card);
 -      int read = data->flags & MMC_DATA_READ;
 +      int read = (data->flags & MMC_DATA_READ) ? 1 : 0;
        u8 cfg2, trans_mode;
        int err;
        size_t data_len = data->blksz * data->blocks;
  
 -      if (host->data)
 -              dev_err(sdmmc_dev(host), "error: data already exist\n");
 -
 -      host->data = data;
 -
        if (read) {
                cfg2 = SD_CALCULATE_CRC7 | SD_CHECK_CRC16 |
                        SD_NO_WAIT_BUSY_END | SD_CHECK_CRC7 | SD_RSP_LEN_0;
        rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER,
                        SD_TRANSFER_END, SD_TRANSFER_END);
  
 -      mod_timer(&host->timer, jiffies + 10 * HZ);
        rtsx_pci_send_cmd_no_wait(pcr);
  
 -      err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, read);
 -      if (err < 0) {
 -              data->error = err;
 -              tasklet_schedule(&host->finish_tasklet);
 -      }
 -      return 0;
 -}
 -
 -static void sd_finish_multi_rw(unsigned long host_addr)
 -{
 -      struct realtek_pci_sdmmc *host = (struct realtek_pci_sdmmc *)host_addr;
 -      struct rtsx_pcr *pcr = host->pcr;
 -      struct mmc_data *data;
 -      int err = 0;
 -      unsigned long flags;
 -
 -      spin_lock_irqsave(&host->lock, flags);
 -
 -      if (!host->data) {
 -              dev_err(sdmmc_dev(host), "error: no data exist\n");
 -              goto out;
 -      }
 -
 -      data = host->data;
 -      host->data = NULL;
 -
 -      if (pcr->trans_result == TRANS_NO_DEVICE)
 -              err = -ENODEV;
 -      else if (pcr->trans_result != TRANS_RESULT_OK)
 -              err = -EINVAL;
 -
 +      err = rtsx_pci_transfer_data(pcr, data->sg, data->sg_len, read, 10000);
        if (err < 0) {
 -              data->error = err;
 -              goto out;
 -      }
 -
 -      if (!host->mrq->sbc && data->stop) {
 -              sd_send_cmd(host, data->stop);
 -              spin_unlock_irqrestore(&host->lock, flags);
 -              return;
 +              sd_clear_error(host);
 +              return err;
        }
  
 -out:
 -      tasklet_schedule(&host->finish_tasklet);
 -      spin_unlock_irqrestore(&host->lock, flags);
 +      return 0;
  }
  
  static inline void sd_enable_initial_mode(struct realtek_pci_sdmmc *host)
@@@ -637,6 -904,13 +640,6 @@@ static int sd_tuning_rx(struct realtek_
        return 0;
  }
  
 -static inline bool sd_use_muti_rw(struct mmc_command *cmd)
 -{
 -      return mmc_op_multi(cmd->opcode) ||
 -              (cmd->opcode == MMC_READ_SINGLE_BLOCK) ||
 -              (cmd->opcode == MMC_WRITE_BLOCK);
 -}
 -
  static void sdmmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
  {
        struct realtek_pci_sdmmc *host = mmc_priv(mmc);
        struct mmc_data *data = mrq->data;
        unsigned int data_size = 0;
        int err;
 -      unsigned long flags;
 -
 -      mutex_lock(&pcr->pcr_mutex);
 -      spin_lock_irqsave(&host->lock, flags);
 -
 -      if (host->mrq)
 -              dev_err(sdmmc_dev(host), "error: request already exist\n");
 -      host->mrq = mrq;
  
        if (host->eject) {
                cmd->error = -ENOMEDIUM;
                goto finish;
        }
  
 +      mutex_lock(&pcr->pcr_mutex);
 +
        rtsx_pci_start_run(pcr);
  
        rtsx_pci_switch_clock(pcr, host->clock, host->ssc_depth,
        rtsx_pci_write_register(pcr, CARD_SHARE_MODE,
                        CARD_SHARE_MASK, CARD_SHARE_48_SD);
  
 +      mutex_lock(&host->host_mutex);
 +      host->mrq = mrq;
 +      mutex_unlock(&host->host_mutex);
 +
        if (mrq->data)
                data_size = data->blocks * data->blksz;
  
 -      if (sd_use_muti_rw(cmd))
 -              host->sg_count = sd_pre_dma_transfer(host, data, NULL);
 +      if (!data_size || mmc_op_multi(cmd->opcode) ||
 +                      (cmd->opcode == MMC_READ_SINGLE_BLOCK) ||
 +                      (cmd->opcode == MMC_WRITE_BLOCK)) {
 +              sd_send_cmd_get_rsp(host, cmd);
  
 -      if (!data_size || sd_use_muti_rw(cmd)) {
 -              if (mrq->sbc)
 -                      sd_send_cmd(host, mrq->sbc);
 -              else
 -                      sd_send_cmd(host, cmd);
 -              spin_unlock_irqrestore(&host->lock, flags);
 +              if (!cmd->error && data_size) {
 +                      sd_rw_multi(host, mrq);
 +
 +                      if (mmc_op_multi(cmd->opcode) && mrq->stop)
 +                              sd_send_cmd_get_rsp(host, mrq->stop);
 +              }
        } else {
 -              spin_unlock_irqrestore(&host->lock, flags);
                sd_normal_rw(host, mrq);
 -              tasklet_schedule(&host->finish_tasklet);
        }
 -      return;
 +
 +      if (mrq->data) {
 +              if (cmd->error || data->error)
 +                      data->bytes_xfered = 0;
 +              else
 +                      data->bytes_xfered = data->blocks * data->blksz;
 +      }
 +
 +      mutex_unlock(&pcr->pcr_mutex);
  
  finish:
 -      tasklet_schedule(&host->finish_tasklet);
 -      spin_unlock_irqrestore(&host->lock, flags);
 +      if (cmd->error)
 +              dev_dbg(sdmmc_dev(host), "cmd->error = %d\n", cmd->error);
 +
 +      mutex_lock(&host->host_mutex);
 +      host->mrq = NULL;
 +      mutex_unlock(&host->host_mutex);
 +
 +      mmc_request_done(mmc, mrq);
  }
  
  static int sd_set_bus_width(struct realtek_pci_sdmmc *host,
@@@ -816,6 -1078,7 +819,7 @@@ static int sd_set_timing(struct realtek
                rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, CLK_LOW_FREQ, 0);
                break;
  
+       case MMC_TIMING_MMC_DDR52:
        case MMC_TIMING_UHS_DDR50:
                rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG1,
                                0x0C | SD_ASYNC_FIFO_NOT_RST,
@@@ -896,6 -1159,7 +900,7 @@@ static void sdmmc_set_ios(struct mmc_ho
                host->vpclk = true;
                host->double_clk = false;
                break;
+       case MMC_TIMING_MMC_DDR52:
        case MMC_TIMING_UHS_DDR50:
        case MMC_TIMING_UHS_SDR25:
                host->ssc_depth = RTSX_SSC_DEPTH_1M;
@@@ -1141,6 -1405,8 +1146,6 @@@ out
  }
  
  static const struct mmc_host_ops realtek_pci_sdmmc_ops = {
 -      .pre_req = sdmmc_pre_req,
 -      .post_req = sdmmc_post_req,
        .request = sdmmc_request,
        .set_ios = sdmmc_set_ios,
        .get_ro = sdmmc_get_ro,
@@@ -1204,6 -1470,7 +1209,6 @@@ static int rtsx_pci_sdmmc_drv_probe(str
        struct realtek_pci_sdmmc *host;
        struct rtsx_pcr *pcr;
        struct pcr_handle *handle = pdev->dev.platform_data;
 -      unsigned long host_addr;
  
        if (!handle)
                return -ENXIO;
        pcr->slots[RTSX_SD_CARD].p_dev = pdev;
        pcr->slots[RTSX_SD_CARD].card_event = rtsx_pci_sdmmc_card_event;
  
 -      host_addr = (unsigned long)host;
 -      host->next_data.cookie = 1;
 -      setup_timer(&host->timer, sd_request_timeout, host_addr);
 -      tasklet_init(&host->cmd_tasklet, sd_get_rsp, host_addr);
 -      tasklet_init(&host->data_tasklet, sd_finish_multi_rw, host_addr);
 -      tasklet_init(&host->finish_tasklet, sd_finish_request, host_addr);
 -      spin_lock_init(&host->lock);
 +      mutex_init(&host->host_mutex);
  
 -      pcr->slots[RTSX_SD_CARD].done_transfer = sd_isr_done_transfer;
        realtek_init_host(host);
  
        mmc_add_host(mmc);
@@@ -1241,6 -1515,8 +1246,6 @@@ static int rtsx_pci_sdmmc_drv_remove(st
        struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
        struct rtsx_pcr *pcr;
        struct mmc_host *mmc;
 -      struct mmc_request *mrq;
 -      unsigned long flags;
  
        if (!host)
                return 0;
        pcr = host->pcr;
        pcr->slots[RTSX_SD_CARD].p_dev = NULL;
        pcr->slots[RTSX_SD_CARD].card_event = NULL;
 -      pcr->slots[RTSX_SD_CARD].done_transfer = NULL;
        mmc = host->mmc;
 -      mrq = host->mrq;
  
 -      spin_lock_irqsave(&host->lock, flags);
 +      mutex_lock(&host->host_mutex);
        if (host->mrq) {
                dev_dbg(&(pdev->dev),
                        "%s: Controller removed during transfer\n",
                        mmc_hostname(mmc));
  
 -              if (mrq->sbc)
 -                      mrq->sbc->error = -ENOMEDIUM;
 -              if (mrq->cmd)
 -                      mrq->cmd->error = -ENOMEDIUM;
 -              if (mrq->stop)
 -                      mrq->stop->error = -ENOMEDIUM;
 -              if (mrq->data)
 -                      mrq->data->error = -ENOMEDIUM;
 +              rtsx_pci_complete_unfinished_transfer(pcr);
  
 -              tasklet_schedule(&host->finish_tasklet);
 +              host->mrq->cmd->error = -ENOMEDIUM;
 +              if (host->mrq->stop)
 +                      host->mrq->stop->error = -ENOMEDIUM;
 +              mmc_request_done(mmc, host->mrq);
        }
 -      spin_unlock_irqrestore(&host->lock, flags);
 -
 -      del_timer_sync(&host->timer);
 -      tasklet_kill(&host->cmd_tasklet);
 -      tasklet_kill(&host->data_tasklet);
 -      tasklet_kill(&host->finish_tasklet);
 +      mutex_unlock(&host->host_mutex);
  
        mmc_remove_host(mmc);
        host->eject = true;
diff --combined include/linux/omap-dma.h
index c29a6dee6bec5906a2b72503463761197fce17a0,999f52d3d1e743a71106d14d74a54759d8c57d3a..88e6ea4a5d3683543cf6c4cc57be13483ef36476
@@@ -1,23 -1,6 +1,6 @@@
- /*
-  * OMAP DMA Engine support
-  *
-  * 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_OMAP_DMA_H
  #define __LINUX_OMAP_DMA_H
- struct dma_chan;
- #if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE))
- bool omap_dma_filter_fn(struct dma_chan *, void *);
- #else
- static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
- {
-       return false;
- }
- #endif
+ #include <linux/omap-dmaengine.h>
  
  /*
   *  Legacy OMAP DMA handling defines and functions
@@@ -393,7 -376,7 +376,7 @@@ extern int omap_modify_dma_chain_params
  extern int omap_dma_chain_status(int chain_id);
  #endif
  
 -#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP)
 +#if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP)
  #include <mach/lcd_dma.h>
  #else
  static inline int omap_lcd_dma_running(void)
index 0000000000000000000000000000000000000000,2b0b6aa019221e5e9469e545b63ec96bd166f4ff..8e6906c72e9079abee55b360a2269a5e421c256f
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,21 +1,21 @@@
 -#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
+ /*
+  * OMAP DMA Engine support
+  *
+  * 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_OMAP_DMAENGINE_H
+ #define __LINUX_OMAP_DMAENGINE_H
+ struct dma_chan;
++#if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE))
+ bool omap_dma_filter_fn(struct dma_chan *, void *);
+ #else
+ static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
+ {
+       return false;
+ }
+ #endif
+ #endif /* __LINUX_OMAP_DMAENGINE_H */