mirror of
https://github.com/torvalds/linux.git
synced 2024-12-17 08:31:39 +00:00
dee02770cd
- Introduce host claiming by context to support blkmq - Preparations for enabling CQE (eMMC CMDQ) requests - Re-factorizations to prepare for blkmq support - Re-factorizations to prepare for CQE support - Fix signal voltage switch for SD cards without power cycle - Convert RPMB to a character device - Export eMMC revision via sysfs - Support eMMC DT binding for fixed driver type - Document mmc_regulator_get_supply() API MMC host: - omap_hsmmc: Updated regulator management for PBIAS - sdhci-omap: Add new OMAP SDHCI driver - meson-mx-sdio: New driver for the Amlogic Meson8 and Meson8b SoCs - sdhci-pci: Add support for Intel CDF - sdhci-acpi: Fix voltage switch for some Intel host controllers - sdhci-msm: Enable delay circuit calibration clocks - sdhci-msm: Manage power IRQ properly - mediatek: Add support of mt2701/mt2712 - mediatek: Updates management of clocks and tunings - mediatek: Upgrade eMMC HS400 support - rtsx_pci: Update tuning for gen3 PCI-Express - renesas_sdhi: Support R-Car Gen[123] fallback compatibility strings - Catch all errors when getting regulators - Various additional improvements and cleanups -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJaCXiaAAoJEP4mhCVzWIwp+c4P/3UptZJJScU4WFS1zXH8h/YK mYQ4DOCZqQYihKV4ssbAAjmTkT3RdMkl+rq2s5+ZfVbsu57UqeHNaNXBQWirkXCo xBDzZlZFz42g4apKq+ZfmewZTM2fjed8Z7SrDcxPkkyU90QKa/LFFleAyxyXxXr1 ubKHJtev/oWBRxvzvWPYNUI5ExraxGxp2iGvavoYHNcggAgOSBJoKESvF7er5MRK Cx5cuKAESU2dJFQnebjndx3dFgQsZ18RTRXUom50oP3BXF2G3gIBMjxp9VfyuOGV xedyE2ALQxr1bxyWWejMdhhiZ+eNZNtiEJKqJ37ArTeBDyDfO/SDVXlkqkAARlYW rTzh9olfbuhFdCAo2gxAcCaQXnjgQzDDKnQJs++tQVziXGI9ezc44+A6fNh39nre yc/MLIjN96vWRhhFuTeFuENN+n7D2xyy+keXZXrALYYOCPAlKtip6DOgVl3ltNvx K1O7/STqdR4OHLK6vgdzi9ai3PmcmSBQwKCqqCH/7mcFm1xtBcxqdrEwORLQ3lCH c/tl4lJqJR2BD8U9gipjik0ovWb5p2KKAYhjqEY2qMy14OXs2509Y8GcqQRzqcQc FSAfUInooHfDEbUBVsLpTOjMvd6LAx34fTJ9QAanAZ1wdeV8C9DRz3kJh/L/mOmG N7/jyJnMV1Izknmpc2MP =3Gvx -----END PGP SIGNATURE----- Merge tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Introduce host claiming by context to support blkmq - Preparations for enabling CQE (eMMC CMDQ) requests - Re-factorizations to prepare for blkmq support - Re-factorizations to prepare for CQE support - Fix signal voltage switch for SD cards without power cycle - Convert RPMB to a character device - Export eMMC revision via sysfs - Support eMMC DT binding for fixed driver type - Document mmc_regulator_get_supply() API MMC host: - omap_hsmmc: Updated regulator management for PBIAS - sdhci-omap: Add new OMAP SDHCI driver - meson-mx-sdio: New driver for the Amlogic Meson8 and Meson8b SoCs - sdhci-pci: Add support for Intel CDF - sdhci-acpi: Fix voltage switch for some Intel host controllers - sdhci-msm: Enable delay circuit calibration clocks - sdhci-msm: Manage power IRQ properly - mediatek: Add support of mt2701/mt2712 - mediatek: Updates management of clocks and tunings - mediatek: Upgrade eMMC HS400 support - rtsx_pci: Update tuning for gen3 PCI-Express - renesas_sdhi: Support R-Car Gen[123] fallback compatibility strings - Catch all errors when getting regulators - Various additional improvements and cleanups" * tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (91 commits) sdhci-fujitsu: add support for setting the CMD_DAT_DELAY attribute dt-bindings: sdhci-fujitsu: document cmd-dat-delay property mmc: tmio: Replace msleep() of 20ms or less with usleep_range() mmc: dw_mmc: Convert timers to use timer_setup() mmc: dw_mmc: Cleanup the DTO timer like the CTO one mmc: vub300: Use common code in __download_offload_pseudocode() mmc: tmio: Use common error handling code in tmio_mmc_host_probe() mmc: Convert timers to use timer_setup() mmc: sdhci-acpi: Fix voltage switch for some Intel host controllers mmc: sdhci-acpi: Let devices define their own private data mmc: mediatek: perfer to use rise edge latching for cmd line mmc: mediatek: improve eMMC hs400 mode read performance mmc: mediatek: add latch-ck support mmc: mediatek: add support of source_cg clock mmc: mediatek: add stop_clk fix and enhance_rx support mmc: mediatek: add busy_check support mmc: mediatek: add async fifo and data tune support mmc: mediatek: add pad_tune0 support mmc: mediatek: make hs400_tune_response only for mt8173 arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes ...
88 lines
2.1 KiB
C
88 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef MMC_QUEUE_H
|
|
#define MMC_QUEUE_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/blkdev.h>
|
|
#include <linux/blk-mq.h>
|
|
#include <linux/mmc/core.h>
|
|
#include <linux/mmc/host.h>
|
|
|
|
static inline struct mmc_queue_req *req_to_mmc_queue_req(struct request *rq)
|
|
{
|
|
return blk_mq_rq_to_pdu(rq);
|
|
}
|
|
|
|
struct mmc_queue_req;
|
|
|
|
static inline struct request *mmc_queue_req_to_req(struct mmc_queue_req *mqr)
|
|
{
|
|
return blk_mq_rq_from_pdu(mqr);
|
|
}
|
|
|
|
struct task_struct;
|
|
struct mmc_blk_data;
|
|
struct mmc_blk_ioc_data;
|
|
|
|
struct mmc_blk_request {
|
|
struct mmc_request mrq;
|
|
struct mmc_command sbc;
|
|
struct mmc_command cmd;
|
|
struct mmc_command stop;
|
|
struct mmc_data data;
|
|
int retune_retry_done;
|
|
};
|
|
|
|
/**
|
|
* enum mmc_drv_op - enumerates the operations in the mmc_queue_req
|
|
* @MMC_DRV_OP_IOCTL: ioctl operation
|
|
* @MMC_DRV_OP_IOCTL_RPMB: RPMB-oriented ioctl operation
|
|
* @MMC_DRV_OP_BOOT_WP: write protect boot partitions
|
|
* @MMC_DRV_OP_GET_CARD_STATUS: get card status
|
|
* @MMC_DRV_OP_GET_EXT_CSD: get the EXT CSD from an eMMC card
|
|
*/
|
|
enum mmc_drv_op {
|
|
MMC_DRV_OP_IOCTL,
|
|
MMC_DRV_OP_IOCTL_RPMB,
|
|
MMC_DRV_OP_BOOT_WP,
|
|
MMC_DRV_OP_GET_CARD_STATUS,
|
|
MMC_DRV_OP_GET_EXT_CSD,
|
|
};
|
|
|
|
struct mmc_queue_req {
|
|
struct mmc_blk_request brq;
|
|
struct scatterlist *sg;
|
|
struct mmc_async_req areq;
|
|
enum mmc_drv_op drv_op;
|
|
int drv_op_result;
|
|
void *drv_op_data;
|
|
unsigned int ioc_count;
|
|
};
|
|
|
|
struct mmc_queue {
|
|
struct mmc_card *card;
|
|
struct task_struct *thread;
|
|
struct semaphore thread_sem;
|
|
bool suspended;
|
|
bool asleep;
|
|
struct mmc_blk_data *blkdata;
|
|
struct request_queue *queue;
|
|
/*
|
|
* FIXME: this counter is not a very reliable way of keeping
|
|
* track of how many requests that are ongoing. Switch to just
|
|
* letting the block core keep track of requests and per-request
|
|
* associated mmc_queue_req data.
|
|
*/
|
|
int qcnt;
|
|
};
|
|
|
|
extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
|
|
const char *);
|
|
extern void mmc_cleanup_queue(struct mmc_queue *);
|
|
extern void mmc_queue_suspend(struct mmc_queue *);
|
|
extern void mmc_queue_resume(struct mmc_queue *);
|
|
extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
|
|
struct mmc_queue_req *);
|
|
|
|
#endif
|