Coverage Report

Created: 2026-03-11 06:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/u-boot/drivers/soc/soc_sandbox.c
Line
Count
Source
1
// SPDX-License-Identifier: GPL-2.0+
2
/*
3
 * Sandbox driver for the SOC uclass
4
 *
5
 * (C) Copyright 2020 - Texas Instruments Incorporated - https://www.ti.com/
6
 * Dave Gerlach <d-gerlach@ti.com>
7
 */
8
9
#include <dm.h>
10
#include <soc.h>
11
12
int soc_sandbox_get_family(struct udevice *dev, char *buf, int size)
13
0
{
14
0
  snprintf(buf, size, "SANDBOX1xx");
15
16
0
  return 0;
17
0
}
18
19
int soc_sandbox_get_machine(struct udevice *dev, char *buf, int size)
20
0
{
21
0
  snprintf(buf, size, "SANDBOX123");
22
23
0
  return 0;
24
0
}
25
26
int soc_sandbox_get_revision(struct udevice *dev, char *buf, int size)
27
0
{
28
0
  snprintf(buf, size, "1.0");
29
30
0
  return 0;
31
0
}
32
33
static const struct soc_ops soc_sandbox_ops = {
34
  .get_family = soc_sandbox_get_family,
35
  .get_revision = soc_sandbox_get_revision,
36
  .get_machine = soc_sandbox_get_machine,
37
};
38
39
int soc_sandbox_probe(struct udevice *dev)
40
0
{
41
0
  return 0;
42
0
}
43
44
static const struct udevice_id soc_sandbox_ids[] = {
45
  { .compatible = "sandbox,soc" },
46
  { }
47
};
48
49
U_BOOT_DRIVER(soc_sandbox) = {
50
  .name           = "soc_sandbox",
51
  .id             = UCLASS_SOC,
52
  .ops    = &soc_sandbox_ops,
53
  .of_match       = soc_sandbox_ids,
54
  .probe          = soc_sandbox_probe,
55
};