[U-Boot] [PATCH v2 4/7] x86: Allow cpu-x86 driver to be probed for UP
Bin Meng
bmeng.cn at gmail.com
Tue Jul 21 17:37:05 CEST 2015
On Tue, Jul 21, 2015 at 8:15 PM, Bin Meng <bmeng.cn at 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.cn at 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.
> #endif
>
> return 0;
> --
Regards,
Bin
More information about the U-Boot
mailing list