drivers/mmc/host/via-sdmmc.c
Source file repositories/reference/linux-study-clean/drivers/mmc/host/via-sdmmc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mmc/host/via-sdmmc.c- Extension
.c- Size
- 35096 bytes
- Lines
- 1312
- Domain
- Driver Families
- Bucket
- drivers/mmc
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/pci.hlinux/module.hlinux/dma-mapping.hlinux/highmem.hlinux/delay.hlinux/interrupt.hlinux/mmc/host.hlinux/workqueue.h
Detected Declarations
struct sdhcregstruct pcictrlregstruct via_crdr_mmc_hostenum PCI_HOST_CLK_CONTROLfunction via_print_sdchcfunction via_print_pcictrlfunction via_save_pcictrlregfunction via_restore_pcictrlregfunction via_save_sdcregfunction via_restore_sdcregfunction via_pwron_sleepfunction via_set_ddmafunction via_sdc_preparedatafunction via_sdc_get_responsefunction via_sdc_send_commandfunction via_sdc_finish_datafunction via_sdc_finish_commandfunction via_sdc_requestfunction via_sdc_set_powerfunction via_sdc_set_iosfunction via_sdc_get_rofunction via_reset_pcictrlfunction via_sdc_cmd_isrfunction via_sdc_data_isrfunction via_sdc_isrfunction via_sdc_timeoutfunction via_sdc_finish_bh_workfunction via_sdc_card_detectfunction via_init_mmc_hostfunction via_sd_probefunction via_sd_removefunction via_init_sdc_pmfunction via_sd_suspendfunction via_sd_resume
Annotated Snippet
static struct pci_driver via_sd_driver = {
.name = DRV_NAME,
.id_table = via_ids,
.probe = via_sd_probe,
.remove = via_sd_remove,
.driver.pm = pm_sleep_ptr(&via_sd_pm_ops),
};
module_pci_driver(via_sd_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("VIA Technologies Inc.");
MODULE_DESCRIPTION("VIA SD/MMC Card Interface driver");
Annotation
- Immediate include surface: `linux/pci.h`, `linux/module.h`, `linux/dma-mapping.h`, `linux/highmem.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/mmc/host.h`, `linux/workqueue.h`.
- Detected declarations: `struct sdhcreg`, `struct pcictrlreg`, `struct via_crdr_mmc_host`, `enum PCI_HOST_CLK_CONTROL`, `function via_print_sdchc`, `function via_print_pcictrl`, `function via_save_pcictrlreg`, `function via_restore_pcictrlreg`, `function via_save_sdcreg`, `function via_restore_sdcreg`.
- Atlas domain: Driver Families / drivers/mmc.
- Implementation status: pattern 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.