1 // SPDX-License-Identifier: GPL-2.0+
3 * Sandbox driver for the SOC uclass
5 * (C) Copyright 2020 - Texas Instruments Incorporated - http://www.ti.com/
13 int soc_sandbox_get_family(struct udevice *dev, char *buf, int size)
15 snprintf(buf, size, "SANDBOX1xx");
20 int soc_sandbox_get_machine(struct udevice *dev, char *buf, int size)
22 snprintf(buf, size, "SANDBOX123");
27 int soc_sandbox_get_revision(struct udevice *dev, char *buf, int size)
29 snprintf(buf, size, "1.0");
34 static const struct soc_ops soc_sandbox_ops = {
35 .get_family = soc_sandbox_get_family,
36 .get_revision = soc_sandbox_get_revision,
37 .get_machine = soc_sandbox_get_machine,
40 int soc_sandbox_probe(struct udevice *dev)
45 static const struct udevice_id soc_sandbox_ids[] = {
46 { .compatible = "sandbox,soc" },
50 U_BOOT_DRIVER(soc_sandbox) = {
51 .name = "soc_sandbox",
53 .ops = &soc_sandbox_ops,
54 .of_match = soc_sandbox_ids,
55 .probe = soc_sandbox_probe,