blob: 0a6d2ad7a4ac65becadcd895262b851fe6813ed1 [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
Simon Glass791fa452020-01-26 22:06:27 -070012static int apl_get_info(const struct udevice *dev, struct cpu_info *info)
Simon Glassfcfd26e2019-12-08 17:40:14 -070013{
14 return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
15}
16
Simon Glassfcfd26e2019-12-08 17:40:14 -070017static const struct cpu_ops cpu_x86_apl_ops = {
18 .get_desc = cpu_x86_get_desc,
19 .get_info = apl_get_info,
Wolfgang Wallner4e3dfd52020-02-25 13:19:48 +010020 .get_count = cpu_x86_get_count,
Simon Glassfcfd26e2019-12-08 17:40:14 -070021 .get_vendor = cpu_x86_get_vendor,
22};
23
24static const struct udevice_id cpu_x86_apl_ids[] = {
25 { .compatible = "intel,apl-cpu" },
26 { }
27};
28
29U_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};