diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
commit | a94ab561e2f49a80d8579930e840b810ab1a1330 (patch) | |
tree | 77913e7bd9309afa6b2ddc6f3e3e49827da2025c /arch/x86/cpu/qfw_cpu.c | |
parent | 3b676a1662ac6b54d1e97ea40a0c41ee0925ffe3 (diff) | |
parent | 8c4e3b79bd0bb76eea16869e9666e19047c0d005 (diff) |
Merge branch '2021-04-13-assorted-improvements'
- A large assortment of bug fixes, code cleanups and a few feature
enhancements.
Diffstat (limited to 'arch/x86/cpu/qfw_cpu.c')
-rw-r--r-- | arch/x86/cpu/qfw_cpu.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/cpu/qfw_cpu.c b/arch/x86/cpu/qfw_cpu.c index b959eadddef..ee00b8fe732 100644 --- a/arch/x86/cpu/qfw_cpu.c +++ b/arch/x86/cpu/qfw_cpu.c @@ -18,7 +18,7 @@ int qemu_cpu_fixup(void) int cpu_num; int cpu_online; struct uclass *uc; - struct udevice *dev, *pdev; + struct udevice *dev, *pdev, *qfwdev; struct cpu_plat *plat; char *cpu; @@ -39,6 +39,13 @@ int qemu_cpu_fixup(void) return -ENODEV; } + /* get qfw dev */ + ret = qfw_get_dev(&qfwdev); + if (ret) { + printf("unable to find qfw device\n"); + return ret; + } + /* calculate cpus that are already bound */ cpu_num = 0; for (uclass_find_first_device(UCLASS_CPU, &dev); @@ -48,7 +55,7 @@ int qemu_cpu_fixup(void) } /* get actual cpu number */ - cpu_online = qemu_fwcfg_online_cpus(); + cpu_online = qfw_online_cpus(qfwdev); if (cpu_online < 0) { printf("unable to get online cpu number: %d\n", cpu_online); return cpu_online; |