Some EP deivces need to initialize before RC scan it, e.g. NXP
layerscape platform, so add the init function in pci_ep uclass.
Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
}
#endif
+#ifdef CONFIG_PCI_ENDPOINT
+static int initr_pci_ep(void)
+{
+ pci_ep_init();
+
+ return 0;
+}
+#endif
+
#ifdef CONFIG_PCI
static int initr_pci(void)
{
#ifdef CONFIG_BITBANGMII
initr_bbmii,
#endif
+#ifdef CONFIG_PCI_ENDPOINT
+ initr_pci_ep,
+#endif
#ifdef CONFIG_CMD_NET
INIT_FUNC_WATCHDOG_RESET
initr_net,
.name = "pci_ep",
.flags = DM_UC_FLAG_SEQ_ALIAS,
};
+
+void pci_ep_init(void)
+{
+ struct udevice *dev;
+
+ for (uclass_first_device_check(UCLASS_PCI_EP, &dev);
+ dev;
+ uclass_next_device_check(&dev)) {
+ ;
+ }
+}
int update_flash_size(int flash_size);
int arch_early_init_r(void);
void pci_init(void);
+void pci_ep_init(void);
int misc_init_r(void);
#if defined(CONFIG_VID)
int init_func_vid(void);