Merge tag 'dm-pull-20jul20-take2a' of https://gitlab.denx.de/u-boot/custodians/u...
[platform/kernel/u-boot.git] / arch / x86 / cpu / apollolake / cpu.c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright 2019 Google LLC
4  */
5
6 #include <common.h>
7 #include <cpu.h>
8 #include <dm.h>
9 #include <asm/cpu_common.h>
10 #include <asm/cpu_x86.h>
11
12 static int apl_get_info(const struct udevice *dev, struct cpu_info *info)
13 {
14         return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
15 }
16
17 static const struct cpu_ops cpu_x86_apl_ops = {
18         .get_desc       = cpu_x86_get_desc,
19         .get_info       = apl_get_info,
20         .get_count      = cpu_x86_get_count,
21         .get_vendor     = cpu_x86_get_vendor,
22 };
23
24 static const struct udevice_id cpu_x86_apl_ids[] = {
25         { .compatible = "intel,apl-cpu" },
26         { }
27 };
28
29 U_BOOT_DRIVER(cpu_x86_apl_drv) = {
30         .name           = "cpu_x86_apl",
31         .id             = UCLASS_CPU,
32         .of_match       = cpu_x86_apl_ids,
33         .bind           = cpu_x86_bind,
34         .ops            = &cpu_x86_apl_ops,
35         .flags          = DM_FLAG_PRE_RELOC,
36 };