Merge tag 'u-boot-rockchip-20200501' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / arch / x86 / cpu / cpu.c
index 290ee08..8526e85 100644 (file)
 
 #include <common.h>
 #include <command.h>
+#include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <syscon.h>
+#include <acpi/acpi_s3.h>
+#include <acpi/acpi_table.h>
 #include <asm/acpi.h>
-#include <asm/acpi_s3.h>
-#include <asm/acpi_table.h>
 #include <asm/control_regs.h>
 #include <asm/coreboot_tables.h>
 #include <asm/cpu.h>
@@ -45,6 +47,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifndef CONFIG_TPL_BUILD
 static const char *const x86_vendor_name[] = {
        [X86_VENDOR_INTEL]     = "Intel",
        [X86_VENDOR_CYRIX]     = "Cyrix",
@@ -57,6 +60,7 @@ static const char *const x86_vendor_name[] = {
        [X86_VENDOR_NSC]       = "NSC",
        [X86_VENDOR_SIS]       = "SiS",
 };
+#endif
 
 int __weak x86_cleanup_before_linux(void)
 {
@@ -113,6 +117,7 @@ int icache_status(void)
        return 1;
 }
 
+#ifndef CONFIG_TPL_BUILD
 const char *cpu_vendor_name(int vendor)
 {
        const char *name;
@@ -123,6 +128,7 @@ const char *cpu_vendor_name(int vendor)
 
        return name;
 }
+#endif
 
 char *cpu_get_name(char *name)
 {
@@ -233,8 +239,10 @@ int cpu_init_r(void)
        struct udevice *dev;
        int ret;
 
-       if (!ll_boot_init())
+       if (!ll_boot_init()) {
+               uclass_first_device(UCLASS_PCI, &dev);
                return 0;
+       }
 
        ret = x86_init_cpus();
        if (ret)