Simon Glass | fcfd26e | 2019-12-08 17:40:14 -0700 | [diff] [blame] | 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 | |
Simon Glass | 791fa45 | 2020-01-26 22:06:27 -0700 | [diff] [blame] | 12 | static int apl_get_info(const struct udevice *dev, struct cpu_info *info) |
Simon Glass | fcfd26e | 2019-12-08 17:40:14 -0700 | [diff] [blame] | 13 | { |
| 14 | return cpu_intel_get_info(info, INTEL_BCLK_MHZ); |
| 15 | } |
| 16 | |
Simon Glass | fcfd26e | 2019-12-08 17:40:14 -0700 | [diff] [blame] | 17 | static const struct cpu_ops cpu_x86_apl_ops = { |
| 18 | .get_desc = cpu_x86_get_desc, |
| 19 | .get_info = apl_get_info, |
Wolfgang Wallner | 4e3dfd5 | 2020-02-25 13:19:48 +0100 | [diff] [blame] | 20 | .get_count = cpu_x86_get_count, |
Simon Glass | fcfd26e | 2019-12-08 17:40:14 -0700 | [diff] [blame] | 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 | }; |