Hi Bin, On 21 July 2015 at 09:37, Bin Meng <bmeng...@gmail.com> wrote: > On Tue, Jul 21, 2015 at 8:15 PM, Bin Meng <bmeng...@gmail.com> wrote: >> 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...@gmail.com> >> >> --- >> >> Changes in v2: >> - New patch to allow cpu-x86 driver to be probed for UP >> >> arch/x86/cpu/cpu.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c >> index b4e0fd9..1c69a18 100644 >> --- a/arch/x86/cpu/cpu.c >> +++ b/arch/x86/cpu/cpu.c >> @@ -35,6 +35,7 @@ >> #include <asm/processor-flags.h> >> #include <asm/interrupt.h> >> #include <asm/tables.h> >> +#include <dm/device-internal.h> >> #include <linux/compiler.h> >> >> DECLARE_GLOBAL_DATA_PTR; >> @@ -696,6 +697,12 @@ __weak int x86_init_cpus(void) >> #ifdef CONFIG_SMP >> debug("Init additional CPUs\n"); >> x86_mp_init(); >> +#else >> + struct udevice *dev = NULL; >> + >> + uclass_first_device(UCLASS_CPU, &dev); >> + if (dev) >> + device_probe(dev); > > Looks that the call to device_probe() is not necessary.
Right. Also shouldn't uclass_first_device() return an error on failure? If not, please add a comment. > >> #endif >> >> return 0; >> -- Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot