drivers/pci/controller/pcie-iproc-platform.c
Source file repositories/reference/linux-study-clean/drivers/pci/controller/pcie-iproc-platform.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/controller/pcie-iproc-platform.c- Extension
.c- Size
- 3515 bytes
- Lines
- 145
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/pci.hlinux/clk.hlinux/module.hlinux/slab.hlinux/interrupt.hlinux/platform_device.hlinux/of_address.hlinux/of_pci.hlinux/of_platform.hlinux/phy/phy.h../pci.hpcie-iproc.h
Detected Declarations
function iproc_pltfm_pcie_probefunction iproc_pltfm_pcie_removefunction iproc_pltfm_pcie_shutdown
Annotated Snippet
if (ret) {
dev_err(dev,
"missing brcm,pcie-ob-axi-offset property\n");
return ret;
}
pcie->ob.axi_offset = val;
pcie->need_ob_cfg = true;
}
/*
* DT nodes are not used by all platforms that use the iProc PCIe
* core driver. For platforms that require explicit inbound mapping
* configuration, "dma-ranges" would have been present in DT
*/
pcie->need_ib_cfg = of_property_read_bool(np, "dma-ranges");
/* PHY use is optional */
pcie->phy = devm_phy_optional_get(dev, "pcie-phy");
if (IS_ERR(pcie->phy))
return PTR_ERR(pcie->phy);
/* PAXC doesn't support legacy IRQs, skip mapping */
switch (pcie->type) {
case IPROC_PCIE_PAXC:
case IPROC_PCIE_PAXC_V2:
pcie->map_irq = NULL;
break;
default:
break;
}
ret = iproc_pcie_setup(pcie, &bridge->windows);
if (ret) {
dev_err(dev, "PCIe controller setup failed\n");
return ret;
}
platform_set_drvdata(pdev, pcie);
return 0;
}
static void iproc_pltfm_pcie_remove(struct platform_device *pdev)
{
struct iproc_pcie *pcie = platform_get_drvdata(pdev);
iproc_pcie_remove(pcie);
}
static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev)
{
struct iproc_pcie *pcie = platform_get_drvdata(pdev);
iproc_pcie_shutdown(pcie);
}
static struct platform_driver iproc_pltfm_pcie_driver = {
.driver = {
.name = "iproc-pcie",
.of_match_table = of_match_ptr(iproc_pcie_of_match_table),
},
.probe = iproc_pltfm_pcie_probe,
.remove = iproc_pltfm_pcie_remove,
.shutdown = iproc_pltfm_pcie_shutdown,
};
module_platform_driver(iproc_pltfm_pcie_driver);
MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
MODULE_DESCRIPTION("Broadcom iPROC PCIe platform driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/pci.h`, `linux/clk.h`, `linux/module.h`, `linux/slab.h`, `linux/interrupt.h`, `linux/platform_device.h`, `linux/of_address.h`.
- Detected declarations: `function iproc_pltfm_pcie_probe`, `function iproc_pltfm_pcie_remove`, `function iproc_pltfm_pcie_shutdown`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.