drivers/eisa/pci_eisa.c
Source file repositories/reference/linux-study-clean/drivers/eisa/pci_eisa.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/eisa/pci_eisa.c- Extension
.c- Size
- 2377 bytes
- Lines
- 90
- Domain
- Driver Families
- Bucket
- drivers/eisa
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/device.hlinux/eisa.hlinux/pci.hlinux/module.hlinux/init.h
Detected Declarations
function pci_eisa_initfunction eisa_root_registerfunction pci_eisa_init_earlyfunction for_each_pci_dev
Annotated Snippet
if (res && (res->flags & IORESOURCE_IO)) {
bus_res = res;
break;
}
if (!bus_res) {
dev_err(&pdev->dev, "No resources available\n");
return -1;
}
pci_eisa_root.dev = &pdev->dev;
pci_eisa_root.res = bus_res;
pci_eisa_root.bus_base_addr = bus_res->start;
pci_eisa_root.slots = EISA_MAX_SLOTS;
pci_eisa_root.dma_mask = pdev->dma_mask;
dev_set_drvdata(pci_eisa_root.dev, &pci_eisa_root);
if (eisa_root_register (&pci_eisa_root)) {
dev_err(&pdev->dev, "Could not register EISA root\n");
return -1;
}
return 0;
}
/*
* We have to call pci_eisa_init_early() before pnpacpi_init()/isapnp_init().
* Otherwise pnp resource will get enabled early and could prevent eisa
* to be initialized.
* Also need to make sure pci_eisa_init_early() is called after
* x86/pci_subsys_init().
* So need to use subsys_initcall_sync with it.
*/
static int __init pci_eisa_init_early(void)
{
struct pci_dev *dev = NULL;
int ret;
for_each_pci_dev(dev)
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_EISA) {
ret = pci_eisa_init(dev);
if (ret)
return ret;
}
return 0;
}
subsys_initcall_sync(pci_eisa_init_early);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/device.h`, `linux/eisa.h`, `linux/pci.h`, `linux/module.h`, `linux/init.h`.
- Detected declarations: `function pci_eisa_init`, `function eisa_root_register`, `function pci_eisa_init_early`, `function for_each_pci_dev`.
- Atlas domain: Driver Families / drivers/eisa.
- Implementation status: integration 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.