Skip to content

Commit fefbc58

Browse files
Mayank RanaMani-Sadhasivam
authored andcommitted
PCI: host-generic: Rename and export gen_pci_init() for PCIe controller drivers
Rename gen_pci_init() API as pci_host_common_ecam_create() and export it to allow the PCIe controller drivers to create and configure the ECAM region. Note that this API should only used by the drivers managing the drvdata on their own. Rest should continue using pci_host_common_init() API. Signed-off-by: Mayank Rana <[email protected]> [mani: commit message rewording] Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent a60d92f commit fefbc58

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/pci/controller/pci-host-common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void gen_pci_unmap_cfg(void *ptr)
2222
pci_ecam_free((struct pci_config_window *)ptr);
2323
}
2424

25-
static struct pci_config_window *gen_pci_init(struct device *dev,
25+
struct pci_config_window *pci_host_common_ecam_create(struct device *dev,
2626
struct pci_host_bridge *bridge, const struct pci_ecam_ops *ops)
2727
{
2828
int err;
@@ -50,6 +50,7 @@ static struct pci_config_window *gen_pci_init(struct device *dev,
5050

5151
return cfg;
5252
}
53+
EXPORT_SYMBOL_GPL(pci_host_common_ecam_create);
5354

5455
int pci_host_common_init(struct platform_device *pdev,
5556
const struct pci_ecam_ops *ops)
@@ -65,7 +66,7 @@ int pci_host_common_init(struct platform_device *pdev,
6566
of_pci_check_probe_only();
6667

6768
/* Parse and map our Configuration Space windows */
68-
cfg = gen_pci_init(dev, bridge, ops);
69+
cfg = pci_host_common_ecam_create(dev, bridge, ops);
6970
if (IS_ERR(cfg))
7071
return PTR_ERR(cfg);
7172

drivers/pci/controller/pci-host-common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ int pci_host_common_init(struct platform_device *pdev,
1717
const struct pci_ecam_ops *ops);
1818
void pci_host_common_remove(struct platform_device *pdev);
1919

20+
struct pci_config_window *pci_host_common_ecam_create(struct device *dev,
21+
struct pci_host_bridge *bridge, const struct pci_ecam_ops *ops);
2022
#endif

0 commit comments

Comments
 (0)