[Skiboot] [PATCH RFC v2 2/6] core/pci: Make the pci_scan_one() function public

Sergey Miroshnichenko s.miroshnichenko at yadro.com
Fri Mar 8 01:07:32 AEDT 2019


This change will be used by the next commit to discover new PCI devices and
to create struct pci_device for them.

Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko at yadro.com>
---
 core/pci.c    | 4 ++--
 include/pci.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/pci.c b/core/pci.c
index dac4e853..4a59f8a1 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -226,8 +226,8 @@ bool pci_wait_crs(struct phb *phb, uint16_t bdfn, uint32_t *out_vdid)
 	return true;
 }
 
-static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *parent,
-				       uint16_t bdfn)
+struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *parent,
+				uint16_t bdfn)
 {
 	struct pci_device *pd = NULL;
 	uint32_t vdid;
diff --git a/include/pci.h b/include/pci.h
index 3262a4bd..ccde3031 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -454,6 +454,8 @@ extern void pci_remove_bus(struct phb *phb, struct list_head *list);
 extern uint8_t pci_scan_bus(struct phb *phb, uint8_t bus, uint8_t max_bus,
 			    struct list_head *list, struct pci_device *parent,
 			    bool scan_downstream);
+extern struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *parent,
+				       uint16_t bdfn);
 extern void pci_add_device_nodes(struct phb *phb,
 				 struct list_head *list,
 				 struct dt_node *parent_node,
-- 
2.20.1



More information about the Skiboot mailing list