2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/device.h>
12 #include <asm/arch/irq.h>
13 #include <asm/fsp/fsp_support.h>
14 #include <asm/processor.h>
16 static void unprotect_spi_flash(void)
20 bc = x86_pci_read_config32(TNC_LPC, 0xd8);
21 bc |= 0x1; /* unprotect the flash */
22 x86_pci_write_config32(TNC_LPC, 0xd8, bc);
25 int arch_cpu_init(void)
27 struct pci_controller *hose;
30 post_code(POST_CPU_INIT);
31 #ifdef CONFIG_SYS_X86_TSC_TIMER
32 timer_set_base(rdtsc());
35 ret = x86_cpu_init_f();
39 ret = pci_early_init_hose(&hose);
43 unprotect_spi_flash();
48 int arch_misc_init(void)