1 // SPDX-License-Identifier: GPL-2.0+
4 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
11 int cpu_sandbox_get_desc(struct udevice *dev, char *buf, int size)
13 snprintf(buf, size, "LEG Inc. SuperMegaUltraTurbo CPU No. 1");
18 int cpu_sandbox_get_info(struct udevice *dev, struct cpu_info *info)
20 info->cpu_freq = 42 * 42 * 42 * 42 * 42;
21 info->features = 0x42424242;
26 int cpu_sandbox_get_count(struct udevice *dev)
31 int cpu_sandbox_get_vendor(struct udevice *dev, char *buf, int size)
33 snprintf(buf, size, "Languid Example Garbage Inc.");
38 static const struct cpu_ops cpu_sandbox_ops = {
39 .get_desc = cpu_sandbox_get_desc,
40 .get_info = cpu_sandbox_get_info,
41 .get_count = cpu_sandbox_get_count,
42 .get_vendor = cpu_sandbox_get_vendor,
45 int cpu_sandbox_probe(struct udevice *dev)
50 static const struct udevice_id cpu_sandbox_ids[] = {
51 { .compatible = "sandbox,cpu_sandbox" },
55 U_BOOT_DRIVER(cpu_sandbox) = {
56 .name = "cpu_sandbox",
58 .ops = &cpu_sandbox_ops,
59 .of_match = cpu_sandbox_ids,
60 .probe = cpu_sandbox_probe,