mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-01 18:51:33 +02:00
common: board_f: Use cpu_get_current_dev in print_cpuinfo
Current print_cpuinfo gets the first udevice in CPU class to return the cpu info. This has problem if the boot CPU is not fixed. Changing to use new API cpu_get_current_dev to fix the issue. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
143f0eeddd
commit
f5b66af2cb
@ -183,11 +183,11 @@ static int print_cpuinfo(void)
|
|||||||
char desc[512];
|
char desc[512];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = uclass_first_device_err(UCLASS_CPU, &dev);
|
dev = cpu_get_current_dev();
|
||||||
if (ret) {
|
if (!dev) {
|
||||||
debug("%s: Could not get CPU device (err = %d)\n",
|
debug("%s: Could not get CPU device\n",
|
||||||
__func__, ret);
|
__func__);
|
||||||
return ret;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = cpu_get_desc(dev, desc, sizeof(desc));
|
ret = cpu_get_desc(dev, desc, sizeof(desc));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user