x86: cpu_x86: Make cpu_x86_get_count() non-static
The function cpu_x86_get_count() is also useful for other modules. Make it non-static and add a prototype + description. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
6301615e54
commit
fc35d7e1b1
2 changed files with 13 additions and 1 deletions
|
@ -52,7 +52,7 @@ int cpu_x86_get_desc(struct udevice *dev, char *buf, int size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cpu_x86_get_count(struct udevice *dev)
|
||||
int cpu_x86_get_count(struct udevice *dev)
|
||||
{
|
||||
int node, cpu;
|
||||
int num = 0;
|
||||
|
|
|
@ -30,6 +30,18 @@ int cpu_x86_bind(struct udevice *dev);
|
|||
*/
|
||||
int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
|
||||
|
||||
/**
|
||||
* cpu_x86_get_count() - Get the number of cores for an x86 CPU
|
||||
*
|
||||
* This function is suitable to use as the get_count() method for
|
||||
* the CPU uclass.
|
||||
*
|
||||
* @dev: Device to check (UCLASS_CPU)
|
||||
* @return: Number of cores if successful,
|
||||
* -ENOENT if not "/cpus" entry is found in the device tree
|
||||
*/
|
||||
int cpu_x86_get_count(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue