drivers/mtd/maps/pci.c
Source file repositories/reference/linux-study-clean/drivers/mtd/maps/pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/maps/pci.c- Extension
.c- Size
- 7414 bytes
- Lines
- 325
- Domain
- Driver Families
- Bucket
- drivers/mtd
- 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.
- 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/kernel.hlinux/pci.hlinux/slab.hlinux/mtd/mtd.hlinux/mtd/map.hlinux/mtd/partitions.h
Detected Declarations
struct map_pci_infostruct mtd_pci_infostruct map_pci_infofunction mtd_pci_read8function mtd_pci_read32function mtd_pci_copyfromfunction mtd_pci_write8function mtd_pci_write32function mtd_pci_copytofunction intel_iq80310_initfunction intel_iq80310_exitfunction intel_iq80310_translatefunction bytesfunction intel_dc21285_initfunction intel_dc21285_exitfunction intel_dc21285_translatefunction mtd_pci_probefunction mtd_pci_remove
Annotated Snippet
static struct pci_driver mtd_pci_driver = {
.name = "MTD PCI",
.probe = mtd_pci_probe,
.remove = mtd_pci_remove,
.id_table = mtd_pci_ids,
};
module_pci_driver(mtd_pci_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
MODULE_DESCRIPTION("Generic PCI map driver");
MODULE_DEVICE_TABLE(pci, mtd_pci_ids);
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/pci.h`, `linux/slab.h`, `linux/mtd/mtd.h`, `linux/mtd/map.h`, `linux/mtd/partitions.h`.
- Detected declarations: `struct map_pci_info`, `struct mtd_pci_info`, `struct map_pci_info`, `function mtd_pci_read8`, `function mtd_pci_read32`, `function mtd_pci_copyfrom`, `function mtd_pci_write8`, `function mtd_pci_write32`, `function mtd_pci_copyto`, `function intel_iq80310_init`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: pattern 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.