drivers/pci/controller/cadence/pcie-cadence-host-hpa.c
Source file repositories/reference/linux-study-clean/drivers/pci/controller/cadence/pcie-cadence-host-hpa.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/controller/cadence/pcie-cadence-host-hpa.c- Extension
.c- Size
- 11071 bytes
- Lines
- 369
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: exported/initcall integration point
- Status
- integration 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.
- 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/delay.hlinux/kernel.hlinux/list_sort.hlinux/of_address.hlinux/of_pci.hlinux/of_irq.hlinux/platform_device.hpcie-cadence.hpcie-cadence-host-common.h
Detected Declarations
function cdns_pcie_hpa_host_enable_ptm_responsefunction cdns_pcie_hpa_host_bar_ib_configfunction cdns_pcie_hpa_host_init_root_portfunction cdns_pcie_hpa_create_region_for_cfgfunction cdns_pcie_hpa_host_init_address_translationfunction cdns_pcie_hpa_host_initfunction cdns_pcie_hpa_host_link_setupfunction cdns_pcie_hpa_host_setupexport cdns_pcie_hpa_host_link_setupexport cdns_pcie_hpa_host_setup
Annotated Snippet
if (IS_ERR(pcie->reg_base)) {
dev_err(dev, "missing \"reg\"\n");
return PTR_ERR(pcie->reg_base);
}
}
/* ECAM config space is remapped at glue layer */
if (!rc->cfg_base) {
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg");
rc->cfg_base = devm_pci_remap_cfg_resource(dev, res);
if (IS_ERR(rc->cfg_base))
return PTR_ERR(rc->cfg_base);
rc->cfg_res = res;
}
/* Put EROM Bar aperture to 0 */
cdns_pcie_hpa_writel(pcie, REG_BANK_IP_CFG_CTRL_REG, CDNS_PCIE_EROM, 0x0);
ret = cdns_pcie_hpa_host_link_setup(rc);
if (ret)
return ret;
for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++)
rc->avail_ib_bar[bar] = true;
ret = cdns_pcie_hpa_host_init(rc);
if (ret)
return ret;
if (!bridge->ops)
bridge->ops = &cdns_pcie_hpa_host_ops;
return pci_host_probe(bridge);
}
EXPORT_SYMBOL_GPL(cdns_pcie_hpa_host_setup);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Cadence PCIe host controller driver");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/kernel.h`, `linux/list_sort.h`, `linux/of_address.h`, `linux/of_pci.h`, `linux/of_irq.h`, `linux/platform_device.h`, `pcie-cadence.h`.
- Detected declarations: `function cdns_pcie_hpa_host_enable_ptm_response`, `function cdns_pcie_hpa_host_bar_ib_config`, `function cdns_pcie_hpa_host_init_root_port`, `function cdns_pcie_hpa_create_region_for_cfg`, `function cdns_pcie_hpa_host_init_address_translation`, `function cdns_pcie_hpa_host_init`, `function cdns_pcie_hpa_host_link_setup`, `function cdns_pcie_hpa_host_setup`, `export cdns_pcie_hpa_host_link_setup`, `export cdns_pcie_hpa_host_setup`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.