xref: /OK3568_Linux_fs/u-boot/arch/x86/include/asm/cpu_x86.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef _ASM_CPU_X86_H
8*4882a593Smuzhiyun #define _ASM_CPU_X86_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun /**
11*4882a593Smuzhiyun  * cpu_x86_bind() - Bind an x86 CPU with the driver
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * This updates cpu device's platform data with information from device tree,
14*4882a593Smuzhiyun  * like the processor local apic id.
15*4882a593Smuzhiyun  *
16*4882a593Smuzhiyun  * @dev:	Device to check (UCLASS_CPU)
17*4882a593Smuzhiyun  * @return	0 always
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun int cpu_x86_bind(struct udevice *dev);
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun /**
22*4882a593Smuzhiyun  * cpu_x86_get_desc() - Get a description string for an x86 CPU
23*4882a593Smuzhiyun  *
24*4882a593Smuzhiyun  * This uses cpu_get_name() and is suitable to use as the get_desc() method for
25*4882a593Smuzhiyun  * the CPU uclass.
26*4882a593Smuzhiyun  *
27*4882a593Smuzhiyun  * @dev:	Device to check (UCLASS_CPU)
28*4882a593Smuzhiyun  * @buf:	Buffer to place string
29*4882a593Smuzhiyun  * @size:	Size of string space
30*4882a593Smuzhiyun  * @return:	0 if OK, -ENOSPC if buffer is too small, other -ve on error
31*4882a593Smuzhiyun  */
32*4882a593Smuzhiyun int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun /**
35*4882a593Smuzhiyun  * cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
36*4882a593Smuzhiyun  *
37*4882a593Smuzhiyun  * This uses cpu_vendor_name() and is suitable to use as the get_vendor()
38*4882a593Smuzhiyun  * method for the CPU uclass.
39*4882a593Smuzhiyun  *
40*4882a593Smuzhiyun  * @dev:	Device to check (UCLASS_CPU)
41*4882a593Smuzhiyun  * @buf:	Buffer to place string
42*4882a593Smuzhiyun  * @size:	Size of string space
43*4882a593Smuzhiyun  * @return:	0 if OK, -ENOSPC if buffer is too small, other -ve on error
44*4882a593Smuzhiyun  */
45*4882a593Smuzhiyun int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size);
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun #endif /* _ASM_CPU_X86_H */
48