1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: cpu: Add a new get_count method to cpu uclass

Introduce a new method 'get_count' in the UCLASS_CPU ops to get
the number of CPUs in the system.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Bin Meng
2015-06-17 11:15:34 +08:00
committed by Simon Glass
parent 4c71322b41
commit 780bfdd3c7
2 changed files with 26 additions and 0 deletions

View File

@@ -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