summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorWolfgang Wallner <wolfgang.wallner@br-automation.com>2020-02-25 15:19:48 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-03-05 13:25:22 +0300
commit2c64d11e3239b5b3cf29c911fd9cdb6ebb3880d6 (patch)
tree30d0db0155174797c61f57d8125988dd8725dd4f /arch/x86/cpu
parentfc35d7e1b1acc915111cff1ab73c24e56dba3a9d (diff)
downloadu-boot-2c64d11e3239b5b3cf29c911fd9cdb6ebb3880d6.tar.xz
x86: apl: Use cpu_x86_get_count() for cpu_ops.get_count
Use cpu_x86_get_count() to read the number of cores. cpu_x86_get_count() reads the number of CPUs from the device tree. Using this function we can support multiple Apollo Lake variants, e.g.: E3940 (4 cores) and E3930 (2 cores). This was tested on the E3940 and E3930 Apollo Lake variants. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/apollolake/cpu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/cpu/apollolake/cpu.c b/arch/x86/cpu/apollolake/cpu.c
index 3d05c82a5c..aa7a3dbd63 100644
--- a/arch/x86/cpu/apollolake/cpu.c
+++ b/arch/x86/cpu/apollolake/cpu.c
@@ -14,15 +14,10 @@ static int apl_get_info(struct udevice *dev, struct cpu_info *info)
return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
}
-static int apl_get_count(struct udevice *dev)
-{
- return 4;
-}
-
static const struct cpu_ops cpu_x86_apl_ops = {
.get_desc = cpu_x86_get_desc,
.get_info = apl_get_info,
- .get_count = apl_get_count,
+ .get_count = cpu_x86_get_count,
.get_vendor = cpu_x86_get_vendor,
};