xref: /openbmc/u-boot/arch/x86/include/asm/cpu_x86.h (revision e8f80a5a)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2be3f06bcSBin Meng /*
3be3f06bcSBin Meng  * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
4be3f06bcSBin Meng  */
5be3f06bcSBin Meng 
6be3f06bcSBin Meng #ifndef _ASM_CPU_X86_H
7be3f06bcSBin Meng #define _ASM_CPU_X86_H
8be3f06bcSBin Meng 
9be3f06bcSBin Meng /**
10be3f06bcSBin Meng  * cpu_x86_bind() - Bind an x86 CPU with the driver
11be3f06bcSBin Meng  *
12be3f06bcSBin Meng  * This updates cpu device's platform data with information from device tree,
13be3f06bcSBin Meng  * like the processor local apic id.
14be3f06bcSBin Meng  *
15be3f06bcSBin Meng  * @dev:	Device to check (UCLASS_CPU)
16be3f06bcSBin Meng  * @return	0 always
17be3f06bcSBin Meng  */
18be3f06bcSBin Meng int cpu_x86_bind(struct udevice *dev);
19be3f06bcSBin Meng 
20be3f06bcSBin Meng /**
21be3f06bcSBin Meng  * cpu_x86_get_desc() - Get a description string for an x86 CPU
22be3f06bcSBin Meng  *
23be3f06bcSBin Meng  * This uses cpu_get_name() and is suitable to use as the get_desc() method for
24be3f06bcSBin Meng  * the CPU uclass.
25be3f06bcSBin Meng  *
26be3f06bcSBin Meng  * @dev:	Device to check (UCLASS_CPU)
27be3f06bcSBin Meng  * @buf:	Buffer to place string
28be3f06bcSBin Meng  * @size:	Size of string space
29be3f06bcSBin Meng  * @return:	0 if OK, -ENOSPC if buffer is too small, other -ve on error
30be3f06bcSBin Meng  */
31be3f06bcSBin Meng int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
32be3f06bcSBin Meng 
3394eaa79cSAlexander Graf /**
3494eaa79cSAlexander Graf  * cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
3594eaa79cSAlexander Graf  *
3694eaa79cSAlexander Graf  * This uses cpu_vendor_name() and is suitable to use as the get_vendor()
3794eaa79cSAlexander Graf  * method for the CPU uclass.
3894eaa79cSAlexander Graf  *
3994eaa79cSAlexander Graf  * @dev:	Device to check (UCLASS_CPU)
4094eaa79cSAlexander Graf  * @buf:	Buffer to place string
4194eaa79cSAlexander Graf  * @size:	Size of string space
4294eaa79cSAlexander Graf  * @return:	0 if OK, -ENOSPC if buffer is too small, other -ve on error
4394eaa79cSAlexander Graf  */
4494eaa79cSAlexander Graf int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size);
4594eaa79cSAlexander Graf 
46be3f06bcSBin Meng #endif /* _ASM_CPU_X86_H */
47