drivers/mmc/host/sdhci-esdhc-imx.c
Source file repositories/reference/linux-study-clean/drivers/mmc/host/sdhci-esdhc-imx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mmc/host/sdhci-esdhc-imx.c- Extension
.c- Size
- 70709 bytes
- Lines
- 2231
- Domain
- Driver Families
- Bucket
- drivers/mmc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/io.hlinux/iopoll.hlinux/delay.hlinux/err.hlinux/clk.hlinux/module.hlinux/slab.hlinux/pm_qos.hlinux/mmc/host.hlinux/mmc/mmc.hlinux/mmc/sdio.hlinux/mmc/slot-gpio.hlinux/of.hlinux/platform_device.hlinux/pinctrl/consumer.hlinux/pm_runtime.hsdhci-cqhci.hsdhci-pltfm.hsdhci-esdhc.hcqhci.h
Detected Declarations
struct esdhc_platform_datastruct esdhc_soc_datastruct pltfm_imx_dataenum wp_typesenum cd_typesfunction is_imx25_esdhcfunction is_imx53_esdhcfunction esdhc_is_usdhcfunction esdhc_clrset_lefunction esdhc_dump_debug_regsfunction esdhc_wait_for_card_clock_gate_offfunction usdhc_auto_tuning_mode_sel_and_enfunction esdhc_readl_lefunction SOCsfunction esdhc_writel_lefunction esdhc_readw_lefunction esdhc_writew_lefunction esdhc_readb_lefunction esdhc_writeb_lefunction esdhc_pltfm_get_max_clockfunction esdhc_pltfm_get_min_clockfunction esdhc_pltfm_set_clockfunction esdhc_pltfm_get_rofunction esdhc_pltfm_set_bus_widthfunction esdhc_reset_tuningfunction usdhc_init_cardfunction usdhc_execute_tuningfunction esdhc_prepare_tuningfunction esdhc_post_tuningfunction esdhc_executing_tuningfunction esdhc_hs400_enhanced_strobefunction esdhc_change_pinstatefunction esdhc_set_strobe_dllfunction esdhc_set_uhs_signalingfunction esdhc_resetfunction esdhc_get_max_timeout_countfunction esdhc_cqhci_irqfunction esdhc_hw_resetfunction sdhci_esdhc_imx_hwinitfunction sdhc_esdhc_tuning_savefunction sdhc_esdhc_tuning_restorefunction esdhc_cqe_enablefunction esdhc_sdhci_dumpregsfunction sdhci_esdhc_imx_probe_dtfunction sdhci_esdhc_imx_probefunction sdhci_esdhc_imx_removefunction sdhci_esdhc_suspendfunction sdhci_esdhc_resume
Annotated Snippet
struct esdhc_platform_data {
enum wp_types wp_type;
enum cd_types cd_type;
int max_bus_width;
unsigned int delay_line;
unsigned int tuning_step; /* The delay cell steps in tuning procedure */
unsigned int tuning_start_tap; /* The start delay cell point in tuning procedure */
unsigned int strobe_dll_delay_target; /* The delay cell for strobe pad (read clock) */
unsigned int saved_tuning_delay_cell; /* save the value of tuning delay cell */
unsigned int saved_auto_tuning_window; /* save the auto tuning window width */
};
struct esdhc_soc_data {
u32 flags;
u32 quirks;
};
static const struct esdhc_soc_data esdhc_imx25_data = {
.flags = ESDHC_FLAG_ERR004536,
};
static const struct esdhc_soc_data esdhc_imx35_data = {
.flags = ESDHC_FLAG_ERR004536,
};
static const struct esdhc_soc_data esdhc_imx51_data = {
.flags = 0,
};
static const struct esdhc_soc_data esdhc_imx53_data = {
.flags = ESDHC_FLAG_MULTIBLK_NO_INT,
};
static const struct esdhc_soc_data usdhc_imx6q_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_BROKEN_AUTO_CMD23,
};
static const struct esdhc_soc_data usdhc_imx6sl_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536
| ESDHC_FLAG_HS200
| ESDHC_FLAG_BROKEN_AUTO_CMD23,
};
static const struct esdhc_soc_data usdhc_imx6sll_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_HS400
| ESDHC_FLAG_STATE_LOST_IN_LPMODE,
};
static const struct esdhc_soc_data usdhc_imx6sx_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_STATE_LOST_IN_LPMODE
| ESDHC_FLAG_BROKEN_AUTO_CMD23,
};
static const struct esdhc_soc_data usdhc_imx6ull_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_ERR010450
| ESDHC_FLAG_STATE_LOST_IN_LPMODE,
};
static const struct esdhc_soc_data usdhc_imx7d_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_HS400
| ESDHC_FLAG_STATE_LOST_IN_LPMODE
| ESDHC_FLAG_BROKEN_AUTO_CMD23,
};
static struct esdhc_soc_data usdhc_s32g2_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
| ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
.quirks = SDHCI_QUIRK_NO_LED,
};
static struct esdhc_soc_data usdhc_s32n79_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
| ESDHC_FLAG_SKIP_ERR004536,
.quirks = SDHCI_QUIRK_NO_LED,
};
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/io.h`, `linux/iopoll.h`, `linux/delay.h`, `linux/err.h`, `linux/clk.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `struct esdhc_platform_data`, `struct esdhc_soc_data`, `struct pltfm_imx_data`, `enum wp_types`, `enum cd_types`, `function is_imx25_esdhc`, `function is_imx53_esdhc`, `function esdhc_is_usdhc`, `function esdhc_clrset_le`, `function esdhc_dump_debug_regs`.
- Atlas domain: Driver Families / drivers/mmc.
- Implementation status: source implementation candidate.
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.