drivers/mmc/host/wbsd.c
Source file repositories/reference/linux-study-clean/drivers/mmc/host/wbsd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mmc/host/wbsd.c- Extension
.c- Size
- 40325 bytes
- Lines
- 2000
- Domain
- Driver Families
- Bucket
- drivers/mmc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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.
- 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/module.hlinux/moduleparam.hlinux/init.hlinux/ioport.hlinux/platform_device.hlinux/interrupt.hlinux/dma-mapping.hlinux/delay.hlinux/pnp.hlinux/highmem.hlinux/mmc/host.hlinux/mmc/mmc.hlinux/mmc/sd.hlinux/scatterlist.hlinux/slab.hasm/io.hasm/dma.hwbsd.h
Detected Declarations
function wbsd_unlock_configfunction wbsd_lock_configfunction wbsd_write_configfunction wbsd_read_configfunction wbsd_write_indexfunction wbsd_read_indexfunction wbsd_init_devicefunction wbsd_resetfunction wbsd_request_endfunction wbsd_init_sgfunction wbsd_next_sgfunction wbsd_sg_to_dmafunction wbsd_dma_to_sgfunction wbsd_get_short_replyfunction wbsd_get_long_replyfunction wbsd_send_commandfunction wbsd_empty_fifofunction lengthfunction wbsd_fill_fifofunction lengthfunction wbsd_prepare_datafunction levelsfunction wbsd_finish_datafunction wbsd_requestfunction wbsd_set_iosfunction wbsd_get_rofunction wbsd_reset_ignorefunction wbsd_card_bh_workfunction wbsd_fifo_bh_workfunction wbsd_crc_bh_workfunction wbsd_timeout_bh_workfunction wbsd_finish_bh_workfunction wbsd_irqfunction wbsd_alloc_mmcfunction wbsd_free_mmcfunction wbsd_scanfunction wbsd_request_regionfunction wbsd_release_regionsfunction wbsd_request_dmafunction wbsd_release_dmafunction wbsd_request_irqfunction wbsd_release_irqfunction wbsd_request_resourcesfunction wbsd_release_resourcesfunction wbsd_chip_configfunction wbsd_chip_validatefunction wbsd_chip_powerofffunction wbsd_init
Annotated Snippet
module_init(wbsd_drv_init);
module_exit(wbsd_drv_exit);
#ifdef CONFIG_PNP
module_param_hw_named(nopnp, param_nopnp, uint, other, 0444);
#endif
module_param_hw_named(io, param_io, uint, ioport, 0444);
module_param_hw_named(irq, param_irq, uint, irq, 0444);
module_param_hw_named(dma, param_dma, int, dma, 0444);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver");
#ifdef CONFIG_PNP
MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)");
#endif
MODULE_PARM_DESC(io, "I/O base to allocate. Must be 8 byte aligned. (default 0x248)");
MODULE_PARM_DESC(irq, "IRQ to allocate. (default 6)");
MODULE_PARM_DESC(dma, "DMA channel to allocate. -1 for no DMA. (default 2)");
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/ioport.h`, `linux/platform_device.h`, `linux/interrupt.h`, `linux/dma-mapping.h`, `linux/delay.h`.
- Detected declarations: `function wbsd_unlock_config`, `function wbsd_lock_config`, `function wbsd_write_config`, `function wbsd_read_config`, `function wbsd_write_index`, `function wbsd_read_index`, `function wbsd_init_device`, `function wbsd_reset`, `function wbsd_request_end`, `function wbsd_init_sg`.
- Atlas domain: Driver Families / drivers/mmc.
- Implementation status: integration 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.