diff options
author | Tom Rini <trini@konsulko.com> | 2018-09-18 20:42:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-18 20:42:37 -0400 |
commit | 4e710ebb4463c8e031eb269c012fbadb2479608b (patch) | |
tree | f334518436bc0262b483308026fbba413a45493e /drivers/cpu/cpu-uclass.c | |
parent | b57f1895b669e3fbdca486e7c40dfea00f22bb93 (diff) | |
parent | 75629a25087cd9897305375421abe2248bc40e72 (diff) |
Merge git://git.denx.de/u-boot-dm
- MPC83xx device tree additions (CPU and RAM)
- Fix sandbox build error
- Sync bitrev with Linux
- Various ofnode/DT improvements
Diffstat (limited to 'drivers/cpu/cpu-uclass.c')
-rw-r--r-- | drivers/cpu/cpu-uclass.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c index f362eb11e72..457f77b7c89 100644 --- a/drivers/cpu/cpu-uclass.c +++ b/drivers/cpu/cpu-uclass.c @@ -11,6 +11,29 @@ #include <dm/lists.h> #include <dm/root.h> +int cpu_probe_all(void) +{ + struct udevice *cpu; + int ret; + + ret = uclass_first_device(UCLASS_CPU, &cpu); + if (ret) { + debug("%s: No CPU found (err = %d)\n", __func__, ret); + return ret; + } + + while (cpu) { + ret = uclass_next_device(&cpu); + if (ret) { + debug("%s: Error while probing CPU (err = %d)\n", + __func__, ret); + return ret; + } + } + + return 0; +} + int cpu_get_desc(struct udevice *dev, char *buf, int size) { struct cpu_ops *ops = cpu_get_ops(dev); |