diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-02 20:34:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-02 20:34:32 -0400 |
| commit | be580e7522eecfcf31c70abdf6fa0ae77b2e293b (patch) | |
| tree | 1137d880a002ef342f9b1ab77331144c9ed956cf /include/linux | |
| parent | 8d65b08debc7e62b2c6032d7fe7389d895b92cbc (diff) | |
| parent | a627f025eb0534052ff451427c16750b3530634c (diff) | |
Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
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
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmc/card.h | 10 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 77e61e0a216a..aad015e0152b 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -89,6 +89,7 @@ struct mmc_ext_csd { | |||
| 89 | unsigned int boot_ro_lock; /* ro lock support */ | 89 | unsigned int boot_ro_lock; /* ro lock support */ |
| 90 | bool boot_ro_lockable; | 90 | bool boot_ro_lockable; |
| 91 | bool ffu_capable; /* Firmware upgrade support */ | 91 | bool ffu_capable; /* Firmware upgrade support */ |
| 92 | bool cmdq_en; /* Command Queue enabled */ | ||
| 92 | bool cmdq_support; /* Command Queue supported */ | 93 | bool cmdq_support; /* Command Queue supported */ |
| 93 | unsigned int cmdq_depth; /* Command Queue depth */ | 94 | unsigned int cmdq_depth; /* Command Queue depth */ |
| 94 | #define MMC_FIRMWARE_LEN 8 | 95 | #define MMC_FIRMWARE_LEN 8 |
| @@ -208,6 +209,7 @@ struct sdio_cis { | |||
| 208 | struct mmc_host; | 209 | struct mmc_host; |
| 209 | struct sdio_func; | 210 | struct sdio_func; |
| 210 | struct sdio_func_tuple; | 211 | struct sdio_func_tuple; |
| 212 | struct mmc_queue_req; | ||
| 211 | 213 | ||
| 212 | #define SDIO_MAX_FUNCS 7 | 214 | #define SDIO_MAX_FUNCS 7 |
| 213 | 215 | ||
| @@ -267,6 +269,8 @@ struct mmc_card { | |||
| 267 | #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ | 269 | #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ |
| 268 | #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ | 270 | #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ |
| 269 | 271 | ||
| 272 | bool reenable_cmdq; /* Re-enable Command Queue */ | ||
| 273 | |||
| 270 | unsigned int erase_size; /* erase size in sectors */ | 274 | unsigned int erase_size; /* erase size in sectors */ |
| 271 | unsigned int erase_shift; /* if erase unit is power 2 */ | 275 | unsigned int erase_shift; /* if erase unit is power 2 */ |
| 272 | unsigned int pref_erase; /* in sectors */ | 276 | unsigned int pref_erase; /* in sectors */ |
| @@ -300,6 +304,10 @@ struct mmc_card { | |||
| 300 | struct dentry *debugfs_root; | 304 | struct dentry *debugfs_root; |
| 301 | struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */ | 305 | struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */ |
| 302 | unsigned int nr_parts; | 306 | unsigned int nr_parts; |
| 307 | |||
| 308 | struct mmc_queue_req *mqrq; /* Shared queue structure */ | ||
| 309 | unsigned int bouncesz; /* Bounce buffer size */ | ||
| 310 | int qdepth; /* Shared queue depth */ | ||
| 303 | }; | 311 | }; |
| 304 | 312 | ||
| 305 | static inline bool mmc_large_sector(struct mmc_card *card) | 313 | static inline bool mmc_large_sector(struct mmc_card *card) |
| @@ -307,6 +315,8 @@ static inline bool mmc_large_sector(struct mmc_card *card) | |||
| 307 | return card->ext_csd.data_sector_size == 4096; | 315 | return card->ext_csd.data_sector_size == 4096; |
| 308 | } | 316 | } |
| 309 | 317 | ||
| 318 | bool mmc_card_is_blockaddr(struct mmc_card *card); | ||
| 319 | |||
| 310 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) | 320 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) |
| 311 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) | 321 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) |
| 312 | #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) | 322 | #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 83f1c4a9f03b..21385ac0c9b1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/mmc/core.h> | 17 | #include <linux/mmc/core.h> |
| 18 | #include <linux/mmc/card.h> | 18 | #include <linux/mmc/card.h> |
| 19 | #include <linux/mmc/pm.h> | 19 | #include <linux/mmc/pm.h> |
| 20 | #include <linux/dma-direction.h> | ||
| 20 | 21 | ||
| 21 | struct mmc_ios { | 22 | struct mmc_ios { |
| 22 | unsigned int clock; /* clock rate */ | 23 | unsigned int clock; /* clock rate */ |
| @@ -499,6 +500,11 @@ static inline bool mmc_can_retune(struct mmc_host *host) | |||
| 499 | return host->can_retune == 1; | 500 | return host->can_retune == 1; |
| 500 | } | 501 | } |
| 501 | 502 | ||
| 503 | static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data) | ||
| 504 | { | ||
| 505 | return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE; | ||
| 506 | } | ||
| 507 | |||
| 502 | int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); | 508 | int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); |
| 503 | int mmc_abort_tuning(struct mmc_host *host, u32 opcode); | 509 | int mmc_abort_tuning(struct mmc_host *host, u32 opcode); |
| 504 | 510 | ||
