2 * Copyright (C) 2015, Miao Yan <yanmiaobest@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/fw_cfg.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
18 if (size < CPU_MAX_NAME_LEN)
26 static int cpu_qemu_get_count(struct udevice *dev)
28 return qemu_fwcfg_online_cpus();
31 static const struct cpu_ops cpu_qemu_ops = {
32 .get_desc = cpu_qemu_get_desc,
33 .get_count = cpu_qemu_get_count,
36 static const struct udevice_id cpu_qemu_ids[] = {
37 { .compatible = "cpu-qemu" },
41 U_BOOT_DRIVER(cpu_qemu_drv) = {
44 .of_match = cpu_qemu_ids,