1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2015, Miao Yan <yanmiaobest@gmail.com>
13 int cpu_qemu_get_desc(const struct udevice *dev, char *buf, int size)
15 if (size < CPU_MAX_NAME_LEN)
23 static int cpu_qemu_get_count(const struct udevice *dev)
26 struct udevice *qfw_dev;
28 ret = qfw_get_dev(&qfw_dev);
32 return qfw_online_cpus(qfw_dev);
35 static const struct cpu_ops cpu_qemu_ops = {
36 .get_desc = cpu_qemu_get_desc,
37 .get_count = cpu_qemu_get_count,
40 static const struct udevice_id cpu_qemu_ids[] = {
41 { .compatible = "cpu-qemu" },
45 U_BOOT_DRIVER(cpu_qemu_drv) = {
48 .of_match = cpu_qemu_ids,