2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/tnc.h>
12 #include <asm/arch/fsp/fsp_support.h>
13 #include <asm/processor.h>
15 static void unprotect_spi_flash(void)
19 bc = pci_read_config32(PCH_LPC_DEV, 0xd8);
20 bc |= 0x1; /* unprotect the flash */
21 pci_write_config32(PCH_LPC_DEV, 0xd8, bc);
24 int arch_cpu_init(void)
26 struct pci_controller *hose;
29 post_code(POST_CPU_INIT);
30 #ifdef CONFIG_SYS_X86_TSC_TIMER
31 timer_set_base(rdtsc());
34 ret = x86_cpu_init_f();
38 ret = pci_early_init_hose(&hose);
42 unprotect_spi_flash();
47 int print_cpuinfo(void)
49 post_code(POST_CPU_INFO);
50 return default_print_cpuinfo();
53 void reset_cpu(ulong addr)
56 outb(0x06, PORT_RESET);
59 void board_final_cleanup(void)
63 /* call into FspNotify */
64 debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
65 status = fsp_notify(NULL, INIT_PHASE_BOOT);
66 if (status != FSP_SUCCESS)
67 debug("fail, error code %x\n", status);