aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/drivers/misc/syscon_sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/drivers/misc/syscon_sandbox.c')
-rw-r--r--roms/u-boot/drivers/misc/syscon_sandbox.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/roms/u-boot/drivers/misc/syscon_sandbox.c b/roms/u-boot/drivers/misc/syscon_sandbox.c
new file mode 100644
index 000000000..d5cef188d
--- /dev/null
+++ b/roms/u-boot/drivers/misc/syscon_sandbox.c
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <syscon.h>
+#include <asm/test.h>
+#include <dm/lists.h>
+
+static const struct udevice_id sandbox_syscon_ids[] = {
+ { .compatible = "sandbox,syscon0", .data = SYSCON0 },
+ { .compatible = "sandbox,syscon1", .data = SYSCON1 },
+ { }
+};
+
+U_BOOT_DRIVER(sandbox_syscon) = {
+ .name = "sandbox_syscon",
+ .id = UCLASS_SYSCON,
+ .of_match = sandbox_syscon_ids,
+};