blob: 3d05c82a5c6461cf0e5e84439ac49c878d1ce12a [file] [log] [blame]
Simon Glassfcfd26e2019-12-08 17:40:14 -07001// 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
12static int apl_get_info(struct udevice *dev, struct cpu_info *info)
13{
14 return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
15}
16
17static int apl_get_count(struct udevice *dev)
18{
19 return 4;
20}
21
22static const struct cpu_ops cpu_x86_apl_ops = {
23 .get_desc = cpu_x86_get_desc,
24 .get_info = apl_get_info,
25 .get_count = apl_get_count,
26 .get_vendor = cpu_x86_get_vendor,
27};
28
29static const struct udevice_id cpu_x86_apl_ids[] = {
30 { .compatible = "intel,apl-cpu" },
31 { }
32};
33
34U_BOOT_DRIVER(cpu_x86_apl_drv) = {
35 .name = "cpu_x86_apl",
36 .id = UCLASS_CPU,
37 .of_match = cpu_x86_apl_ids,
38 .bind = cpu_x86_bind,
39 .ops = &cpu_x86_apl_ops,
40 .flags = DM_FLAG_PRE_RELOC,
41};