arch/mips/cavium-octeon/flash_setup.c
Source file repositories/reference/linux-study-clean/arch/mips/cavium-octeon/flash_setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/cavium-octeon/flash_setup.c- Extension
.c- Size
- 3716 bytes
- Lines
- 145
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/semaphore.hlinux/mtd/mtd.hlinux/mtd/map.hlinux/of.hlinux/platform_device.hlinux/mtd/partitions.hasm/octeon/octeon.h
Detected Declarations
function octeon_flash_map_readfunction octeon_flash_map_writefunction octeon_flash_map_copy_fromfunction octeon_flash_map_copy_tofunction octeon_flash_probefunction octeon_flash_init
Annotated Snippet
if (mymtd) {
mymtd->owner = THIS_MODULE;
mtd_device_parse_register(mymtd, part_probe_types,
NULL, NULL, 0);
} else {
pr_err("Failed to register MTD device for flash\n");
}
}
return 0;
}
static const struct of_device_id of_flash_match[] = {
{
.compatible = "cfi-flash",
},
{ },
};
MODULE_DEVICE_TABLE(of, of_flash_match);
static struct platform_driver of_flash_driver = {
.driver = {
.name = "octeon-of-flash",
.of_match_table = of_flash_match,
},
.probe = octeon_flash_probe,
};
static int octeon_flash_init(void)
{
return platform_driver_register(&of_flash_driver);
}
late_initcall(octeon_flash_init);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/semaphore.h`, `linux/mtd/mtd.h`, `linux/mtd/map.h`, `linux/of.h`, `linux/platform_device.h`, `linux/mtd/partitions.h`.
- Detected declarations: `function octeon_flash_map_read`, `function octeon_flash_map_write`, `function octeon_flash_map_copy_from`, `function octeon_flash_map_copy_to`, `function octeon_flash_probe`, `function octeon_flash_init`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.