projects/linux·commit be580e75

Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

be580e75 · Linus Torvalds <[email protected]> · 2017-05-02 17:34:32 -07:00

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support
   - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support
   - Add helper functions to manage temporary enable/disable of eMMC CMDQ
   - Improve wait-busy detection for SDIO

  MMC host:
   - cavium: Add driver to support Cavium controllers
   - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs
   - bcm2835: Add new driver for Broadcom BCM2835 controller
   - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller
   - sdhci-tegra: Add support for the Tegra186 variant
   - sdhci-of-esdhc: Support for UHS-I SD cards
   - sdhci-of-esdhc: Support for eMMC HS200 cards
   - sdhci-cadence: Add eMMC HS400 enhanced strobe support
   - sdhci-esdhc-imx: Reset tuning circuit when needed
   - sdhci-pci: Modernize and clean-up some PM related code
   - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices
   - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers
   - sdhci: Re-factoring and modernizations
   - sdhci: Optimize delay loops
   - sdhci: Improve register dump print format
   - sdhci: Add support for the Command Queue Engine
   - meson-gx: Various improvements and clean-ups
   - meson-gx: Add support for CMD23
   - meson-gx: Basic tuning support to avoid CRC errors
   - s3cmci: Enable probing via DT
   - mediatek: Improve tuning support for eMMC HS200 and HS400 mode
   - tmio: Improve DMA support
   - tmio: Use correct response for CMD12
   - dw_mmc: Minor improvements and clean-ups"

* tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits)
  mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
  mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay
  mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY
  mmc: sdhci-xenon: Fix the work flow in xenon_remove().
  MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC
  mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data()
  mmc: cavium: Use module_pci_driver to simplify the code
  mmc: cavium: Add MMC support for Octeon SOCs.
  mmc: cavium: Fix detection of block or byte addressing.
  mmc: core: Export API to allow hosts to get the card address
  mmc: sdio: Fix sdio wait busy implement limitation
  mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card
  clk: apn806: fix spelling mistake: "mising" -> "missing"
  mmc: sdhci-of-esdhc: add delay between tuning cycles
  mmc: sdhci: Control the delay between tuning commands
  mmc: sdhci-of-esdhc: add tuning support
  mmc: sdhci-of-esdhc: add support for signal voltage switch
  mmc: sdhci-of-esdhc: add peripheral clock support
  mmc: sdhci-pci: Allow for 3 bytes from Intel DSM
  mmc: cavium: Fix a shift wrapping bug
  ...
Commit
be580e7522eecfcf31c70abdf6fa0ae77b2e293b
Parents
8d65b08d · a627f025

Merge commit. Changes below are compared with the first parent: 8d65b08d.

Changes

79 files changed · +7948 −1619

FileStatusAddDelContent
Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txtadded+23−0View file
Documentation/devicetree/bindings/mmc/cavium-mmc.txtadded+57−0View file
Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txtadded+170−0View file
Documentation/devicetree/bindings/mmc/mtk-sd.txtmodified+12−0View file
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txtmodified+7−5View file
Documentation/devicetree/bindings/mmc/renesas,mmcif.txtmodified+8−0View file
Documentation/devicetree/bindings/mmc/samsung,s3cmci.txtadded+42−0View file
Documentation/devicetree/bindings/mmc/sdhci-cadence.txtmodified+48−0View file
Documentation/mmc/mmc-dev-attrs.txtmodified+1−0View file
MAINTAINERSmodified+15−0View file
arch/arm64/boot/dts/marvell/armada-ap806.dtsimodified+2−1View file
arch/mips/configs/cavium_octeon_defconfigmodified+5−0View file
drivers/clk/mvebu/ap806-system-controller.cmodified+20−1View file
drivers/mmc/core/block.cmodified+185−115View file
drivers/mmc/core/core.cmodified+102−91View file
drivers/mmc/core/mmc.cmodified+9−0View file
drivers/mmc/core/mmc_ops.cmodified+32−4View file
drivers/mmc/core/mmc_ops.hmodified+2−0View file
drivers/mmc/core/mmc_test.cmodified+14−0View file
drivers/mmc/core/queue.cmodified+185−122View file
drivers/mmc/core/queue.hmodified+9−3View file
drivers/mmc/core/sd.cmodified+2−2View file
drivers/mmc/core/sd_ops.cmodified+9−10View file
drivers/mmc/core/sd_ops.hmodified+1−1View file
drivers/mmc/core/sdio_io.cmodified+21−33View file
drivers/mmc/core/sdio_ops.cmodified+4−5View file
drivers/mmc/core/sdio_ops.hmodified+8−2View file
drivers/mmc/host/Kconfigmodified+43−0View file
drivers/mmc/host/Makefilemodified+8−0View file
drivers/mmc/host/android-goldfish.cmodified+2−8View file
drivers/mmc/host/atmel-mci.cmodified+11−19View file
drivers/mmc/host/bcm2835.cadded+1466−0View file
drivers/mmc/host/cavium-octeon.cadded+351−0View file
drivers/mmc/host/cavium-thunderx.cadded+187−0View file
drivers/mmc/host/cavium.cadded+1090−0View file
drivers/mmc/host/cavium.hadded+215−0View file
drivers/mmc/host/davinci_mmc.cmodified+4−10View file
drivers/mmc/host/dw_mmc.cmodified+185−212View file
drivers/mmc/host/jz4740_mmc.cmodified+2−7View file
drivers/mmc/host/meson-gx-mmc.cmodified+394−196View file
drivers/mmc/host/mmc_spi.cmodified+1−4View file
drivers/mmc/host/mmci.cmodified+8−12View file
drivers/mmc/host/moxart-mmc.cmodified+3−5View file
drivers/mmc/host/mtk-sd.cmodified+154−22View file
drivers/mmc/host/mvsdio.cmodified+5−6View file
drivers/mmc/host/omap_hsmmc.cmodified+6−15View file
drivers/mmc/host/s3cmci.cmodified+128−133View file
drivers/mmc/host/sdhci-acpi.cmodified+12−6View file
drivers/mmc/host/sdhci-brcmstb.cmodified+3−0View file
drivers/mmc/host/sdhci-cadence.cmodified+110−19View file
drivers/mmc/host/sdhci-esdhc-imx.cmodified+32−0View file
drivers/mmc/host/sdhci-esdhc.hmodified+7−0View file
drivers/mmc/host/sdhci-msm.cmodified+0−8View file
drivers/mmc/host/sdhci-of-arasan.cmodified+4−22View file
drivers/mmc/host/sdhci-of-at91.cmodified+3−2View file
drivers/mmc/host/sdhci-of-esdhc.cmodified+187−7View file
drivers/mmc/host/sdhci-pci-core.cmodified+320−242View file
drivers/mmc/host/sdhci-pci-data.cmodified+0−3View file
drivers/mmc/host/sdhci-pci-o2micro.cmodified+3−1View file
drivers/mmc/host/sdhci-pci.hmodified+20−4View file
drivers/mmc/host/sdhci-pltfm.cmodified+3−0View file
drivers/mmc/host/sdhci-pxav2.cmodified+6−3View file
drivers/mmc/host/sdhci-pxav3.cmodified+6−6View file
drivers/mmc/host/sdhci-s3c.cmodified+6−4View file
drivers/mmc/host/sdhci-sirf.cmodified+3−0View file
drivers/mmc/host/sdhci-spear.cmodified+3−0View file
drivers/mmc/host/sdhci-st.cmodified+5−3View file
drivers/mmc/host/sdhci-tegra.cmodified+58−1View file
drivers/mmc/host/sdhci-xenon-phy.cadded+837−0View file
drivers/mmc/host/sdhci-xenon.cadded+548−0View file
drivers/mmc/host/sdhci-xenon.hadded+101−0View file
drivers/mmc/host/sdhci.cmodified+287−166View file
drivers/mmc/host/sdhci.hmodified+44−21View file
drivers/mmc/host/sunxi-mmc.cmodified+4−12View file
drivers/mmc/host/tmio_mmc.hmodified+8−4View file
drivers/mmc/host/tmio_mmc_dma.cmodified+37−24View file
drivers/mmc/host/tmio_mmc_pio.cmodified+19−17View file
include/linux/mmc/card.hmodified+10−0View file
include/linux/mmc/host.hmodified+6−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
new file mode 100644
index 0000000..d876580
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
@@ -0,0 +1,23 @@
+Broadcom BCM2835 SDHOST controller
+
+This file documents differences between the core properties described
+by mmc.txt and the properties that represent the BCM2835 controller.
+
+Required properties:
+- compatible: Should be "brcm,bcm2835-sdhost".
+- clocks: The clock feeding the SDHOST controller.
+
+Optional properties:
+- dmas: DMA channel for read and write.
+ See Documentation/devicetree/bindings/dma/dma.txt for details
+
+Example:
+
+sdhost: mmc@7e202000 {
+ compatible = "brcm,bcm2835-sdhost";
+ reg = <0x7e202000 0x100>;
+ interrupts = <2 24>;
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
+ dmas = <&dma 13>;
+ dma-names = "rx-tx";
+};

Documentation/devicetree/bindings/mmc/cavium-mmc.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/cavium-mmc.txt b/Documentation/devicetree/bindings/mmc/cavium-mmc.txt
new file mode 100644
index 0000000..1433e62
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/cavium-mmc.txt
@@ -0,0 +1,57 @@
+* Cavium Octeon & ThunderX MMC controller
+
+The highspeed MMC host controller on Caviums SoCs provides an interface
+for MMC and SD types of memory cards.
+
+Supported maximum speeds are the ones of the eMMC standard 4.41 as well
+as the speed of SD standard 4.0. Only 3.3 Volt is supported.
+
+Required properties:
+ - compatible : should be one of:
+ cavium,octeon-6130-mmc
+ cavium,octeon-7890-mmc
+ cavium,thunder-8190-mmc
+ cavium,thunder-8390-mmc
+ mmc-slot
+ - reg : mmc controller base registers
+ - clocks : phandle
+
+Optional properties:
+ - for cd, bus-width and additional generic mmc parameters
+ please refer to mmc.txt within this directory
+ - cavium,cmd-clk-skew : number of coprocessor clocks before sampling command
+ - cavium,dat-clk-skew : number of coprocessor clocks before sampling data
+
+Deprecated properties:
+- spi-max-frequency : use max-frequency instead
+- cavium,bus-max-width : use bus-width instead
+- power-gpios : use vmmc-supply instead
+- cavium,octeon-6130-mmc-slot : use mmc-slot instead
+
+Examples:
+ mmc_1_4: mmc@1,4 {
+ compatible = "cavium,thunder-8390-mmc";
+ reg = <0x0c00 0 0 0 0>; /* DEVFN = 0x0c (1:4) */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&sclk>;
+
+ mmc-slot@0 {
+ compatible = "mmc-slot";
+ reg = <0>;
+ vmmc-supply = <&mmc_supply_3v3>;
+ max-frequency = <42000000>;
+ bus-width = <4>;
+ cap-sd-highspeed;
+ };
+
+ mmc-slot@1 {
+ compatible = "mmc-slot";
+ reg = <1>;
+ vmmc-supply = <&mmc_supply_3v3>;
+ max-frequency = <42000000>;
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ non-removable;
+ };
+ };

Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
new file mode 100644
index 0000000..b878a1e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
@@ -0,0 +1,170 @@
+Marvell Xenon SDHCI Controller device tree bindings
+This file documents differences between the core mmc properties
+described by mmc.txt and the properties used by the Xenon implementation.
+
+Multiple SDHCs might be put into a single Xenon IP, to save size and cost.
+Each SDHC is independent and owns independent resources, such as register sets,
+clock and PHY.
+Each SDHC should have an independent device tree node.
+
+Required Properties:
+- compatible: should be one of the following
+ - "marvell,armada-3700-sdhci": For controllers on Armada-3700 SoC.
+ Must provide a second register area and marvell,pad-type.
+ - "marvell,armada-ap806-sdhci": For controllers on Armada AP806.
+ - "marvell,armada-cp110-sdhci": For controllers on Armada CP110.
+
+- clocks:
+ Array of clocks required for SDHC.
+ Require at least input clock for Xenon IP core.
+
+- clock-names:
+ Array of names corresponding to clocks property.
+ The input clock for Xenon IP core should be named as "core".
+
+- reg:
+ * For "marvell,armada-3700-sdhci", two register areas.
+ The first one for Xenon IP register. The second one for the Armada 3700 SoC
+ PHY PAD Voltage Control register.
+ Please follow the examples with compatible "marvell,armada-3700-sdhci"
+ in below.
+ Please also check property marvell,pad-type in below.
+
+ * For other compatible strings, one register area for Xenon IP.
+
+Optional Properties:
+- marvell,xenon-sdhc-id:
+ Indicate the corresponding bit index of current SDHC in
+ SDHC System Operation Control Register Bit[7:0].
+ Set/clear the corresponding bit to enable/disable current SDHC.
+ If Xenon IP contains only one SDHC, this property is optional.
+
+- marvell,xenon-phy-type:
+ Xenon support multiple types of PHYs.
+ To select eMMC 5.1 PHY, set:
+ marvell,xenon-phy-type = "emmc 5.1 phy"
+ eMMC 5.1 PHY is the default choice if this property is not provided.
+ To select eMMC 5.0 PHY, set:
+ marvell,xenon-phy-type = "emmc 5.0 phy"
+
+ All those types of PHYs can support eMMC, SD and SDIO.
+ Please note that this property only presents the type of PHY.
+ It doesn't stand for the entire SDHC type or property.
+ For example, "emmc 5.1 phy" doesn't mean that this Xenon SDHC only
+ supports eMMC 5.1.
+
+- marvell,xenon-phy-znr:
+ Set PHY ZNR value.
+ Only available for eMMC PHY.
+ Valid range = [0:0x1F].
+ ZNR is set as 0xF by default if this property is not provided.
+
+- marvell,xenon-phy-zpr:
+ Set PHY ZPR value.
+ Only available for eMMC PHY.
+ Valid range = [0:0x1F].
+ ZPR is set as 0xF by default if this property is not provided.
+
+- marvell,xenon-phy-nr-success-tun:
+ Set the number of required consecutive successful sampling points
+ used to identify a valid sampling window, in tuning process.
+ Valid range = [1:7].
+ Set as 0x4 by default if this property is not provided.
+
+- marvell,xenon-phy-tun-step-divider:
+ Set the divider for calculating TUN_STEP.
+ Set as 64 by default if this property is not provided.
+
+- marvell,xenon-phy-slow-mode:
+ If this property is selected, transfers will bypass PHY.
+ Only available when bus frequency lower than 55MHz in SDR mode.
+ Disabled by default. Please only try this property if timing issues
+ always occur with PHY enabled in eMMC HS SDR, SD SDR12, SD SDR25,
+ SD Default Speed and HS mode and eMMC legacy speed mode.
+
+- marvell,xenon-tun-count:
+ Xenon SDHC SoC usually doesn't provide re-tuning counter in
+ Capabilities Register 3 Bit[11:8].
+ This property provides the re-tuning counter.
+ If this property is not set, default re-tuning counter will
+ be set as 0x9 in driver.
+
+- marvell,pad-type:
+ Type of Armada 3700 SoC PHY PAD Voltage Controller register.
+ Only valid when "marvell,armada-3700-sdhci" is selected.
+ Two types: "sd" and "fixed-1-8v".
+ If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning and is
+ switched to 1.8V when later in higher speed mode.
+ If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for eMMC.
+ Please follow the examples with compatible "marvell,armada-3700-sdhci"
+ in below.
+
+Example:
+- For eMMC:
+
+ sdhci@aa0000 {
+ compatible = "marvell,armada-ap806-sdhci";
+ reg = <0xaa0000 0x1000>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>
+ clocks = <&emmc_clk>;
+ clock-names = "core";
+ bus-width = <4>;
+ marvell,xenon-phy-slow-mode;
+ marvell,xenon-tun-count = <11>;
+ non-removable;
+ no-sd;
+ no-sdio;
+
+ /* Vmmc and Vqmmc are both fixed */
+ };
+
+- For SD/SDIO:
+
+ sdhci@ab0000 {
+ compatible = "marvell,armada-cp110-sdhci";
+ reg = <0xab0000 0x1000>;
+ interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>
+ vqmmc-supply = <&sd_vqmmc_regulator>;
+ vmmc-supply = <&sd_vmmc_regulator>;
+ clocks = <&sdclk>;
+ clock-names = "core";
+ bus-width = <4>;
+ marvell,xenon-tun-count = <9>;
+ };
+
+- For eMMC with compatible "marvell,armada-3700-sdhci":
+
+ sdhci@aa0000 {
+ compatible = "marvell,armada-3700-sdhci";
+ reg = <0xaa0000 0x1000>,
+ <phy_addr 0x4>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>
+ clocks = <&emmcclk>;
+ clock-names = "core";
+ bus-width = <8>;
+ mmc-ddr-1_8v;
+ mmc-hs400-1_8v;
+ non-removable;
+ no-sd;
+ no-sdio;
+
+ /* Vmmc and Vqmmc are both fixed */
+
+ marvell,pad-type = "fixed-1-8v";
+ };
+
+- For SD/SDIO with compatible "marvell,armada-3700-sdhci":
+
+ sdhci@ab0000 {
+ compatible = "marvell,armada-3700-sdhci";
+ reg = <0xab0000 0x1000>,
+ <phy_addr 0x4>;
+ interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>
+ vqmmc-supply = <&sd_regulator>;
+ /* Vmmc is fixed */
+ clocks = <&sdclk>;
+ clock-names = "core";
+ bus-width = <4>;
+
+ marvell,pad-type = "sd";
+ };

Documentation/devicetree/bindings/mmc/mtk-sd.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 0120c7f..4182ea3 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -21,6 +21,15 @@ Optional properties:
- assigned-clocks: PLL of the source clock
- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock
- hs400-ds-delay: HS400 DS delay setting
+- mediatek,hs200-cmd-int-delay: HS200 command internal delay setting.
+ This field has total 32 stages.
+ The value is an integer from 0 to 31.
+- mediatek,hs400-cmd-int-delay: HS400 command internal delay setting
+ This field has total 32 stages.
+ The value is an integer from 0 to 31.
+- mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection
+ If present,HS400 command responses are sampled on rising edges.
+ If not present,HS400 command responses are sampled on falling edges.
Examples:
mmc0: mmc@11230000 {
@@ -38,4 +47,7 @@ mmc0: mmc@11230000 {
assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
hs400-ds-delay = <0x14015>;
+ mediatek,hs200-cmd-int-delay = <26>;
+ mediatek,hs400-cmd-int-delay = <14>;
+ mediatek,hs400-cmd-resp-sel-rising;
};

Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt
index 15b8368..9bce578 100644
--- a/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt
@@ -7,11 +7,13 @@ This file documents differences between the core properties described
by mmc.txt and the properties used by the sdhci-tegra driver.
Required properties:
-- compatible : For Tegra20, must contain "nvidia,tegra20-sdhci".
- For Tegra30, must contain "nvidia,tegra30-sdhci". For Tegra114,
- must contain "nvidia,tegra114-sdhci". For Tegra124, must contain
- "nvidia,tegra124-sdhci". Otherwise, must contain "nvidia,<chip>-sdhci",
- plus one of the above, where <chip> is tegra132 or tegra210.
+- compatible : should be one of:
+ - "nvidia,tegra20-sdhci": for Tegra20
+ - "nvidia,tegra30-sdhci": for Tegra30
+ - "nvidia,tegra114-sdhci": for Tegra114
+ - "nvidia,tegra124-sdhci": for Tegra124 and Tegra132
+ - "nvidia,tegra210-sdhci": for Tegra210
+ - "nvidia,tegra186-sdhci": for Tegra186
- clocks : Must contain one entry, for the module clock.
See ../clocks/clock-bindings.txt for details.
- resets : Must contain an entry for each entry in reset-names.

Documentation/devicetree/bindings/mmc/renesas,mmcif.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
index e4ba92a..c32dc5a 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
+++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
@@ -8,6 +8,7 @@ Required properties:
- compatible: should be "renesas,mmcif-<soctype>", "renesas,sh-mmcif" as a
fallback. Examples with <soctype> are:
+ - "renesas,mmcif-r7s72100" for the MMCIF found in r7s72100 SoCs
- "renesas,mmcif-r8a73a4" for the MMCIF found in r8a73a4 SoCs
- "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
- "renesas,mmcif-r8a7778" for the MMCIF found in r8a7778 SoCs
@@ -17,6 +18,13 @@ Required properties:
- "renesas,mmcif-r8a7794" for the MMCIF found in r8a7794 SoCs
- "renesas,mmcif-sh73a0" for the MMCIF found in sh73a0 SoCs
+- interrupts: Some SoCs have only 1 shared interrupt, while others have either
+ 2 or 3 individual interrupts (error, int, card detect). Below is the number
+ of interrupts for each SoC:
+ 1: r8a73a4, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
+ 2: r8a7740, sh73a0
+ 3: r7s72100
+
- clocks: reference to the functional clock
- dmas: reference to the DMA channels, one per channel name listed in the

Documentation/devicetree/bindings/mmc/samsung,s3cmci.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/samsung,s3cmci.txt b/Documentation/devicetree/bindings/mmc/samsung,s3cmci.txt
new file mode 100644
index 0000000..5f68feb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/samsung,s3cmci.txt
@@ -0,0 +1,42 @@
+* Samsung's S3C24XX MMC/SD/SDIO controller device tree bindings
+
+Samsung's S3C24XX MMC/SD/SDIO controller is used as a connectivity interface
+with external MMC, SD and SDIO storage mediums.
+
+This file documents differences between the core mmc properties described by
+mmc.txt and the properties used by the Samsung S3C24XX MMC/SD/SDIO controller
+implementation.
+
+Required SoC Specific Properties:
+- compatible: should be one of the following
+ - "samsung,s3c2410-sdi": for controllers compatible with s3c2410
+ - "samsung,s3c2412-sdi": for controllers compatible with s3c2412
+ - "samsung,s3c2440-sdi": for controllers compatible with s3c2440
+- reg: register location and length
+- interrupts: mmc controller interrupt
+- clocks: Should reference the controller clock
+- clock-names: Should contain "sdi"
+
+Required Board Specific Properties:
+- pinctrl-0: Should specify pin control groups used for this controller.
+- pinctrl-names: Should contain only one value - "default".
+
+Optional Properties:
+- bus-width: number of data lines (see mmc.txt)
+- cd-gpios: gpio for card detection (see mmc.txt)
+- wp-gpios: gpio for write protection (see mmc.txt)
+
+Example:
+
+ mmc0: mmc@5a000000 {
+ compatible = "samsung,s3c2440-sdi";
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdi_pins>;
+ reg = <0x5a000000 0x100000>;
+ interrupts = <0 0 21 3>;
+ clocks = <&clocks PCLK_SDI>;
+ clock-names = "sdi";
+ bus-width = <4>;
+ cd-gpios = <&gpg 8 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gph 8 GPIO_ACTIVE_LOW>;
+ };

Documentation/devicetree/bindings/mmc/sdhci-cadence.txt

View file
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-cadence.txt b/Documentation/devicetree/bindings/mmc/sdhci-cadence.txt
index c0f37cb..fa423c2 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-cadence.txt
+++ b/Documentation/devicetree/bindings/mmc/sdhci-cadence.txt
@@ -19,6 +19,53 @@ if supported. See mmc.txt for details.
- mmc-hs400-1_8v
- mmc-hs400-1_2v
+Some PHY delays can be configured by following properties.
+PHY DLL input delays:
+They are used to delay the data valid window, and align the window
+to sampling clock. The delay starts from 5ns (for delay parameter equal to 0)
+and it is increased by 2.5ns in each step.
+- cdns,phy-input-delay-sd-highspeed:
+ Value of the delay in the input path for SD high-speed timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-legacy:
+ Value of the delay in the input path for legacy timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-sd-uhs-sdr12:
+ Value of the delay in the input path for SD UHS SDR12 timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-sd-uhs-sdr25:
+ Value of the delay in the input path for SD UHS SDR25 timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-sd-uhs-sdr50:
+ Value of the delay in the input path for SD UHS SDR50 timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-sd-uhs-ddr50:
+ Value of the delay in the input path for SD UHS DDR50 timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-mmc-highspeed:
+ Value of the delay in the input path for MMC high-speed timing
+ Valid range = [0:0x1F].
+- cdns,phy-input-delay-mmc-ddr:
+ Value of the delay in the input path for eMMC high-speed DDR timing
+ Valid range = [0:0x1F].
+
+PHY DLL clock delays:
+Each delay property represents the fraction of the clock period.
+The approximate delay value will be
+(<delay property value>/128)*sdmclk_clock_period.
+- cdns,phy-dll-delay-sdclk:
+ Value of the delay introduced on the sdclk output
+ for all modes except HS200, HS400 and HS400_ES.
+ Valid range = [0:0x7F].
+- cdns,phy-dll-delay-sdclk-hsmmc:
+ Value of the delay introduced on the sdclk output
+ for HS200, HS400 and HS400_ES speed modes.
+ Valid range = [0:0x7F].
+- cdns,phy-dll-delay-strobe:
+ Value of the delay introduced on the dat_strobe input
+ used in HS400 / HS400_ES speed modes.
+ Valid range = [0:0x7F].
+
Example:
emmc: sdhci@5a000000 {
compatible = "socionext,uniphier-sd4hc", "cdns,sd4hc";
@@ -29,4 +76,5 @@ Example:
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
+ cdns,phy-dll-delay-sdclk = <0>;
};

Documentation/mmc/mmc-dev-attrs.txt

View file
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index 2caff30..4ad0bb1 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -30,6 +30,7 @@ All attributes are read-only.
rel_sectors Reliable write sector count
ocr Operation Conditions Register
dsr Driver Stage Register
+ cmdq_en Command Queue enabled: 1 => enabled, 0 => not enabled
Note on Erase Size and Preferred Erase Size:

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index b1036a7..06d01a0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3064,6 +3064,14 @@ S: Supported
F: drivers/i2c/busses/i2c-octeon*
F: drivers/i2c/busses/i2c-thunderx*
+CAVIUM MMC DRIVER
+M: Jan Glauber <[email protected]>
+M: David Daney <[email protected]>
+M: Steven J. Hill <[email protected]>
+W: http://www.cavium.com
+S: Supported
+F: drivers/mmc/host/cavium*
+
CAVIUM LIQUIDIO NETWORK DRIVER
M: Derek Chickles <[email protected]>
M: Satanand Burla <[email protected]>
@@ -7919,6 +7927,13 @@ M: Nicolas Pitre <[email protected]>
S: Odd Fixes
F: drivers/mmc/host/mvsdio.*
+MARVELL XENON MMC/SD/SDIO HOST CONTROLLER DRIVER
+M: Hu Ziji <[email protected]>
+S: Supported
+F: drivers/mmc/host/sdhci-xenon*
+F: Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
+
MATROX FRAMEBUFFER DRIVER
S: Orphan

arch/arm64/boot/dts/marvell/armada-ap806.dtsi

View file
diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
index a749ba2..5019c8f 100644
--- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
@@ -235,7 +235,8 @@
#clock-cells = <1>;
clock-output-names = "ap-cpu-cluster-0",
"ap-cpu-cluster-1",
- "ap-fixed", "ap-mss";
+ "ap-fixed", "ap-mss",
+ "ap-emmc";
reg = <0x6f4000 0x1000>;
};
};

arch/mips/configs/cavium_octeon_defconfig

View file
diff --git a/arch/mips/configs/cavium_octeon_defconfig b/arch/mips/configs/cavium_octeon_defconfig
index 31e3c4d..d4fda41 100644
--- a/arch/mips/configs/cavium_octeon_defconfig
+++ b/arch/mips/configs/cavium_octeon_defconfig
@@ -127,6 +127,11 @@ CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_HCD_PLATFORM=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_HCD_PLATFORM=m
+CONFIG_MMC=y
+# CONFIG_PWRSEQ_EMMC is not set
+# CONFIG_PWRSEQ_SIMPLE is not set
+# CONFIG_MMC_BLOCK_BOUNCE is not set
+CONFIG_MMC_CAVIUM_OCTEON=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_STAGING=y

drivers/clk/mvebu/ap806-system-controller.c

View file
diff --git a/drivers/clk/mvebu/ap806-system-controller.c b/drivers/clk/mvebu/ap806-system-controller.c
index f177021..8155bac 100644
--- a/drivers/clk/mvebu/ap806-system-controller.c
+++ b/drivers/clk/mvebu/ap806-system-controller.c
@@ -23,7 +23,7 @@
#define AP806_SAR_REG 0x400
#define AP806_SAR_CLKFREQ_MODE_MASK 0x1f
-#define AP806_CLK_NUM 4
+#define AP806_CLK_NUM 5
static struct clk *ap806_clks[AP806_CLK_NUM];
@@ -135,6 +135,23 @@ static int ap806_syscon_clk_probe(struct platform_device *pdev)
goto fail3;
}
+ /* eMMC Clock is fixed clock divided by 3 */
+ if (of_property_read_string_index(np, "clock-output-names",
+ 4, &name)) {
+ ap806_clk_data.clk_num--;
+ dev_warn(&pdev->dev,
+ "eMMC clock missing: update the device tree!\n");
+ } else {
+ ap806_clks[4] = clk_register_fixed_factor(NULL, name,
+ fixedclk_name,
+ 0, 1, 3);
+ if (IS_ERR(ap806_clks[4])) {
+ ret = PTR_ERR(ap806_clks[4]);
+ goto fail4;
+ }
+ }
+
+ of_clk_add_provider(np, of_clk_src_onecell_get, &ap806_clk_data);
ret = of_clk_add_provider(np, of_clk_src_onecell_get, &ap806_clk_data);
if (ret)
goto fail_clk_add;
@@ -142,6 +159,8 @@ static int ap806_syscon_clk_probe(struct platform_device *pdev)
return 0;
fail_clk_add:
+ clk_unregister_fixed_factor(ap806_clks[4]);
+fail4:
clk_unregister_fixed_factor(ap806_clks[3]);
fail3:
clk_unregister_fixed_rate(ap806_clks[2]);

drivers/mmc/core/block.c

View file
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index ff3da96..8273b07 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -129,6 +129,13 @@ static inline int mmc_blk_part_switch(struct mmc_card *card,
struct mmc_blk_data *md);
static int get_card_status(struct mmc_card *card, u32 *status, int retries);
+static void mmc_blk_requeue(struct request_queue *q, struct request *req)
+{
+ spin_lock_irq(q->queue_lock);
+ blk_requeue_request(q, req);
+ spin_unlock_irq(q->queue_lock);
+}
+
static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
{
struct mmc_blk_data *md;
@@ -721,10 +728,41 @@ static const struct block_device_operations mmc_bdops = {
#endif
};

This diff is incomplete. Download the complete patch.

drivers/mmc/core/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/mmc_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/mmc_ops.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/mmc_test.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/queue.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/queue.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sd_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sd_ops.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sdio_io.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sdio_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sdio_ops.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/android-goldfish.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/atmel-mci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/bcm2835.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/cavium-octeon.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/cavium-thunderx.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/cavium.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/cavium.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/davinci_mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/dw_mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/jz4740_mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/meson-gx-mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/mmc_spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/mmci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/moxart-mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/mtk-sd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/mvsdio.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/omap_hsmmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/s3cmci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-acpi.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-brcmstb.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-cadence.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-esdhc-imx.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-esdhc.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-msm.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-of-arasan.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-of-at91.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-of-esdhc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pci-core.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pci-data.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pci-o2micro.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pci.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pltfm.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pxav2.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-pxav3.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-s3c.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-sirf.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-spear.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-st.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-tegra.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-xenon-phy.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-xenon.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci-xenon.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdhci.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sunxi-mmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/tmio_mmc.h

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/tmio_mmc_dma.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/tmio_mmc_pio.c

View file

This diff is incomplete. Download the complete patch.

include/linux/mmc/card.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mmc/host.h

View file

This diff is incomplete. Download the complete patch.