]> git.sur5r.net Git - u-boot/commitdiff
x86: Allow cpu-x86 driver to be probed for UP
authorBin Meng <bmeng.cn@gmail.com>
Wed, 22 Jul 2015 08:21:12 +0000 (01:21 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 28 Jul 2015 16:36:25 +0000 (10:36 -0600)
Currently cpu-x86 driver is probed only for SMP. We add the same
support for UP when there is only one cpu node in the deive tree.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c

index b4e0fd9bc2b896b309a115ef2e705d274e2df16e..b9134cfef3747602ea8cee9cc4964afae8511abd 100644 (file)
@@ -696,6 +696,15 @@ __weak int x86_init_cpus(void)
 #ifdef CONFIG_SMP
        debug("Init additional CPUs\n");
        x86_mp_init();
+#else
+       struct udevice *dev;
+
+       /*
+        * This causes the cpu-x86 driver to be probed.
+        * We don't check return value here as we want to allow boards
+        * which have not been converted to use cpu uclass driver to boot.
+        */
+       uclass_first_device(UCLASS_CPU, &dev);
 #endif
 
        return 0;