drivers/mtd/maps/ck804xrom.c
Source file repositories/reference/linux-study-clean/drivers/mtd/maps/ck804xrom.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/maps/ck804xrom.c- Extension
.c- Size
- 10861 bytes
- Lines
- 387
- 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/types.hlinux/kernel.hlinux/init.hlinux/slab.hasm/io.hlinux/mtd/mtd.hlinux/mtd/map.hlinux/mtd/cfi.hlinux/mtd/flashchip.hlinux/pci.hlinux/pci_ids.hlinux/list.h
Detected Declarations
struct ck804xrom_windowstruct ck804xrom_map_infofunction ck804xrom_cleanupfunction ck804xrom_init_onefunction ck804xrom_remove_onefunction init_ck804xromfunction cleanup_ck804xrommodule init init_ck804xrom
Annotated Snippet
static struct pci_driver ck804xrom_driver = {
.name = MOD_NAME,
.id_table = ck804xrom_pci_tbl,
.probe = ck804xrom_init_one,
.remove = ck804xrom_remove_one,
};
#endif
static int __init init_ck804xrom(void)
{
struct pci_dev *pdev;
const struct pci_device_id *id;
int retVal;
pdev = NULL;
for(id = ck804xrom_pci_tbl; id->vendor; id++) {
pdev = pci_get_device(id->vendor, id->device, NULL);
if (pdev)
break;
}
if (pdev) {
retVal = ck804xrom_init_one(pdev, id);
pci_dev_put(pdev);
return retVal;
}
return -ENXIO;
#if 0
return pci_register_driver(&ck804xrom_driver);
#endif
}
static void __exit cleanup_ck804xrom(void)
{
ck804xrom_remove_one(ck804xrom_window.pdev);
}
module_init(init_ck804xrom);
module_exit(cleanup_ck804xrom);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Eric Biederman <ebiederman@lnxi.com>, Dave Olsen <dolsen@lnxi.com>");
MODULE_DESCRIPTION("MTD map driver for BIOS chips on the Nvidia ck804 southbridge");
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/kernel.h`, `linux/init.h`, `linux/slab.h`, `asm/io.h`, `linux/mtd/mtd.h`, `linux/mtd/map.h`.
- Detected declarations: `struct ck804xrom_window`, `struct ck804xrom_map_info`, `function ck804xrom_cleanup`, `function ck804xrom_init_one`, `function ck804xrom_remove_one`, `function init_ck804xrom`, `function cleanup_ck804xrom`, `module init init_ck804xrom`.
- 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.