diff options
author | Simon Glass <sjg@chromium.org> | 2015-08-10 07:05:07 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-14 03:24:21 -0600 |
commit | 412400abaaa6ef02adff35419188689ea6d3ec7e (patch) | |
tree | b056bd2a176dabe981308976c7f75d40584121be /arch/x86/lib/fsp/fsp_common.c | |
parent | 9e3ff9c2b464e4aa342bed74a534ec9844612459 (diff) |
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: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib/fsp/fsp_common.c')
-rw-r--r-- | arch/x86/lib/fsp/fsp_common.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index c585710824..6f72c6dc7b 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -19,19 +19,24 @@ int print_cpuinfo(void) return default_print_cpuinfo(); } -int board_pci_post_scan(struct pci_controller *hose) +int fsp_init_phase_pci(void) { u32 status; /* call into FspNotify */ debug("Calling into FSP (notify phase INIT_PHASE_PCI): "); status = fsp_notify(NULL, INIT_PHASE_PCI); - if (status != FSP_SUCCESS) + if (status) debug("fail, error code %x\n", status); else 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) |