drivers/mtd/nand/raw/cafe_nand.c
Source file repositories/reference/linux-study-clean/drivers/mtd/nand/raw/cafe_nand.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/nand/raw/cafe_nand.c- Extension
.c- Size
- 25071 bytes
- Lines
- 895
- 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.
- 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/device.hlinux/mtd/mtd.hlinux/mtd/rawnand.hlinux/mtd/partitions.hlinux/rslib.hlinux/pci.hlinux/delay.hlinux/interrupt.hlinux/dma-mapping.hlinux/slab.hlinux/module.hasm/io.h
Detected Declarations
struct cafe_privfunction cafe_device_readyfunction cafe_write_buffunction cafe_read_buffunction cafe_read_bytefunction cafe_nand_cmdfuncfunction cafe_select_chipfunction cafe_nand_interruptfunction cafe_nand_write_oobfunction cafe_nand_read_oobfunction cafe_nand_read_pagefunction cafe_ooblayout_eccfunction cafe_ooblayout_freefunction cafe_nand_write_page_lowlevelfunction gf64_mulfunction gf4096_mulfunction cafe_mulfunction cafe_nand_attach_chipfunction cafe_nand_detach_chipfunction cafe_nand_probefunction cafe_nand_removefunction cafe_nand_resume
Annotated Snippet
static struct pci_driver cafe_nand_pci_driver = {
.name = "CAFÉ NAND",
.id_table = cafe_nand_tbl,
.probe = cafe_nand_probe,
.remove = cafe_nand_remove,
.driver.pm = &cafe_nand_ops,
};
module_pci_driver(cafe_nand_pci_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("NAND flash driver for OLPC CAFÉ chip");
Annotation
- Immediate include surface: `linux/device.h`, `linux/mtd/mtd.h`, `linux/mtd/rawnand.h`, `linux/mtd/partitions.h`, `linux/rslib.h`, `linux/pci.h`, `linux/delay.h`, `linux/interrupt.h`.
- Detected declarations: `struct cafe_priv`, `function cafe_device_ready`, `function cafe_write_buf`, `function cafe_read_buf`, `function cafe_read_byte`, `function cafe_nand_cmdfunc`, `function cafe_select_chip`, `function cafe_nand_interrupt`, `function cafe_nand_write_oob`, `function cafe_nand_read_oob`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: pattern implementation candidate.
- 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.