x86: Probe pinctrl driver in cpu_init_r()
[oweals/u-boot.git] / arch / x86 / cpu / cpu.c
index 2e27d782d1bd76334651fedf1b9e8711ab0f7bd9..269043dedc13c976fd77f2fb9e6ee0cbbe9f1687 100644 (file)
@@ -24,7 +24,9 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <syscon.h>
 #include <asm/control_regs.h>
+#include <asm/coreboot_tables.h>
 #include <asm/cpu.h>
 #include <asm/lapic.h>
 #include <asm/microcode.h>
@@ -750,6 +752,10 @@ int cpu_init_r(void)
        uclass_first_device(UCLASS_PCH, &dev);
        uclass_first_device(UCLASS_LPC, &dev);
 
+       /* Set up pin control if available */
+       ret = syscon_get_by_driver_data(X86_SYSCON_PINCONF, &dev);
+       debug("%s, pinctrl=%p, ret=%d\n", __func__, dev, ret);
+
        return 0;
 }
 
@@ -757,9 +763,13 @@ int cpu_init_r(void)
 int reserve_arch(void)
 {
 #ifdef CONFIG_ENABLE_MRC_CACHE
-       return mrccache_reserve();
-#else
-       return 0;
+       mrccache_reserve();
 #endif
+
+#ifdef CONFIG_SEABIOS
+       high_table_reserve();
+#endif
+
+       return 0;
 }
 #endif