include/linux/mmc/host.h
Source file repositories/reference/linux-study-clean/include/linux/mmc/host.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mmc/host.h- Extension
.h- Size
- 25532 bytes
- Lines
- 762
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched.hlinux/device.hlinux/fault-inject.hlinux/debugfs.hlinux/mmc/core.hlinux/mmc/card.hlinux/mmc/pm.hlinux/dma-direction.hlinux/blk-crypto-profile.hlinux/mmc/sd_uhs2.h
Detected Declarations
struct mmc_iosstruct mmc_clk_phasestruct mmc_clk_phase_mapstruct sd_uhs2_capsstruct mmc_hoststruct mmc_host_opsstruct mmc_cqe_opsstruct mmc_slotstruct regulatorstruct mmc_pwrseqstruct notifier_blockstruct mmc_supplystruct mmc_ctxstruct mmc_hoststruct device_nodeenum sd_uhs2_operationenum mmc_err_statfunction mmc_from_crypto_profilefunction sdio_irq_claimedfunction mmc_signal_sdio_irqfunction mmc_regulator_set_ocrfunction mmc_regulator_set_vqmmcfunction mmc_regulator_set_vqmmc2function mmc_card_is_removablefunction mmc_card_keep_powerfunction mmc_card_wake_sdio_irqfunction mmc_card_hsfunction mmc_card_uhsfunction mmc_card_uhs2function mmc_retune_neededfunction mmc_can_retunefunction mmc_doing_retunefunction mmc_doing_tunefunction mmc_get_dma_dirfunction mmc_debugfs_err_stats_incfunction mmc_card_uhs2_hd_mode
Annotated Snippet
struct mmc_ios {
unsigned int clock; /* clock rate */
unsigned short vdd;
unsigned int power_delay_ms; /* waiting for stable power */
/* vdd stores the bit number of the selected voltage range from below. */
unsigned char bus_mode; /* command output mode */
#define MMC_BUSMODE_OPENDRAIN 1
#define MMC_BUSMODE_PUSHPULL 2
unsigned char chip_select; /* SPI chip select */
#define MMC_CS_DONTCARE 0
#define MMC_CS_HIGH 1
#define MMC_CS_LOW 2
unsigned char power_mode; /* power supply mode */
#define MMC_POWER_OFF 0
#define MMC_POWER_UP 1
#define MMC_POWER_ON 2
#define MMC_POWER_UNDEFINED 3
unsigned char bus_width; /* data bus width */
#define MMC_BUS_WIDTH_1 0
#define MMC_BUS_WIDTH_4 2
#define MMC_BUS_WIDTH_8 3
unsigned char timing; /* timing specification used */
#define MMC_TIMING_LEGACY 0
#define MMC_TIMING_MMC_HS 1
#define MMC_TIMING_SD_HS 2
#define MMC_TIMING_UHS_SDR12 3
#define MMC_TIMING_UHS_SDR25 4
#define MMC_TIMING_UHS_SDR50 5
#define MMC_TIMING_UHS_SDR104 6
#define MMC_TIMING_UHS_DDR50 7
#define MMC_TIMING_MMC_DDR52 8
#define MMC_TIMING_MMC_HS200 9
#define MMC_TIMING_MMC_HS400 10
#define MMC_TIMING_SD_EXP 11
#define MMC_TIMING_SD_EXP_1_2V 12
#define MMC_TIMING_UHS2_SPEED_A 13
#define MMC_TIMING_UHS2_SPEED_A_HD 14
#define MMC_TIMING_UHS2_SPEED_B 15
#define MMC_TIMING_UHS2_SPEED_B_HD 16
unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */
#define MMC_SIGNAL_VOLTAGE_330 0
#define MMC_SIGNAL_VOLTAGE_180 1
#define MMC_SIGNAL_VOLTAGE_120 2
unsigned char vqmmc2_voltage;
#define MMC_VQMMC2_VOLTAGE_180 0
unsigned char drv_type; /* driver type (A, B, C, D) */
#define MMC_SET_DRIVER_TYPE_B 0
#define MMC_SET_DRIVER_TYPE_A 1
#define MMC_SET_DRIVER_TYPE_C 2
#define MMC_SET_DRIVER_TYPE_D 3
bool enhanced_strobe; /* hs400es selection */
};
struct mmc_clk_phase {
bool valid;
u16 in_deg;
u16 out_deg;
};
#define MMC_NUM_CLK_PHASES (MMC_TIMING_MMC_HS400 + 1)
struct mmc_clk_phase_map {
struct mmc_clk_phase phase[MMC_NUM_CLK_PHASES];
};
struct sd_uhs2_caps {
u32 dap;
u32 gap;
u32 group_desc;
u32 maxblk_len;
u32 n_fcu;
u8 n_lanes;
u8 addr64;
u8 card_type;
Annotation
- Immediate include surface: `linux/sched.h`, `linux/device.h`, `linux/fault-inject.h`, `linux/debugfs.h`, `linux/mmc/core.h`, `linux/mmc/card.h`, `linux/mmc/pm.h`, `linux/dma-direction.h`.
- Detected declarations: `struct mmc_ios`, `struct mmc_clk_phase`, `struct mmc_clk_phase_map`, `struct sd_uhs2_caps`, `struct mmc_host`, `struct mmc_host_ops`, `struct mmc_cqe_ops`, `struct mmc_slot`, `struct regulator`, `struct mmc_pwrseq`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.