X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fcpu.h;h=bfb0db2e2c6dd96c5c52fa65edeb3a1bb9cfeb49;hb=44f98f9c8e178942ad51b77b6d2a66820fa9d3cc;hp=34c60bcbaa1d0edd814f1faec85f6b46a96780ff;hpb=1131d4e22cf8f13d0dabaad7f1b84d9baffdfbd6;p=oweals%2Fu-boot.git diff --git a/include/cpu.h b/include/cpu.h index 34c60bcbaa..bfb0db2e2c 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -58,6 +58,14 @@ struct cpu_ops { * @return 0 if OK, -ve on error */ int (*get_info)(struct udevice *dev, struct cpu_info *info); + + /** + * get_count() - Get number of CPUs + * + * @dev: Device to check (UCLASS_CPU) + * @return CPU count if OK, -ve on error + */ + int (*get_count)(struct udevice *dev); }; #define cpu_get_ops(dev) ((struct cpu_ops *)(dev)->driver->ops) @@ -81,4 +89,12 @@ int cpu_get_desc(struct udevice *dev, char *buf, int size); */ int cpu_get_info(struct udevice *dev, struct cpu_info *info); +/** + * cpu_get_count() - Get number of CPUs + * + * @dev: Device to check (UCLASS_CPU) + * @return CPU count if OK, -ve on error + */ +int cpu_get_count(struct udevice *dev); + #endif