blob: 5b256324e1721c546ca058eb83468060274feaae [file] [log] [blame]
Simon Glass509805b2015-01-27 22:13:39 -07001/*
2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <errno.h>
9#include <asm/io.h>
10#include <asm/post.h>
11#include <asm/processor.h>
12#include <asm/fsp/fsp_support.h>
13
14int print_cpuinfo(void)
15{
16 post_code(POST_CPU_INFO);
17 return default_print_cpuinfo();
18}
19
Simon Glass509805b2015-01-27 22:13:39 -070020int board_pci_post_scan(struct pci_controller *hose)
21{
22 u32 status;
23
24 /* call into FspNotify */
25 debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
26 status = fsp_notify(NULL, INIT_PHASE_PCI);
27 if (status != FSP_SUCCESS)
28 debug("fail, error code %x\n", status);
29 else
30 debug("OK\n");
31
32 return 0;
33}
34
35void board_final_cleanup(void)
36{
37 u32 status;
38
39 /* call into FspNotify */
40 debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
41 status = fsp_notify(NULL, INIT_PHASE_BOOT);
42 if (status != FSP_SUCCESS)
43 debug("fail, error code %x\n", status);
44 else
45 debug("OK\n");
46
47 return;
48}
Bin Mengd560c5c2015-06-07 11:33:14 +080049
50int x86_fsp_init(void)
51{
52 if (!gd->arch.hob_list)
53 fsp_init(CONFIG_FSP_TEMP_RAM_ADDR, BOOT_FULL_CONFIG, NULL);
54
55 return 0;
56}