提交 412400ab 编写于 作者: S Simon Glass

x86: Split out fsp_init_phase_pci() code into a new function

This code may be useful for boards that use driver model for PCI.

Note: It would be better to have driver model automatically call this
function somehow. However for now it is probably safer to have it under
board control.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 9e3ff9c2
...@@ -207,4 +207,11 @@ void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len); ...@@ -207,4 +207,11 @@ void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
*/ */
void update_fsp_upd(struct upd_region *fsp_upd); void update_fsp_upd(struct upd_region *fsp_upd);
/**
* fsp_init_phase_pci() - Tell the FSP that we have completed PCI init
*
* @return 0 if OK, -EPERM if the FSP gave an error.
*/
int fsp_init_phase_pci(void);
#endif #endif
...@@ -19,19 +19,24 @@ int print_cpuinfo(void) ...@@ -19,19 +19,24 @@ int print_cpuinfo(void)
return default_print_cpuinfo(); return default_print_cpuinfo();
} }
int board_pci_post_scan(struct pci_controller *hose) int fsp_init_phase_pci(void)
{ {
u32 status; u32 status;
/* call into FspNotify */ /* call into FspNotify */
debug("Calling into FSP (notify phase INIT_PHASE_PCI): "); debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
status = fsp_notify(NULL, INIT_PHASE_PCI); status = fsp_notify(NULL, INIT_PHASE_PCI);
if (status != FSP_SUCCESS) if (status)
debug("fail, error code %x\n", status); debug("fail, error code %x\n", status);
else else
debug("OK\n"); debug("OK\n");
return 0; return status ? -EPERM : 0;
}
int board_pci_post_scan(struct pci_controller *hose)
{
return fsp_init_phase_pci();
} }
void board_final_cleanup(void) void board_final_cleanup(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册