2 * Copyright (c) 2016, NVIDIA CORPORATION.
4 * SPDX-License-Identifier: GPL-2.0
11 #include <asm/reset.h>
13 struct sandbox_reset_test {
17 int sandbox_reset_test_get(struct udevice *dev)
19 struct sandbox_reset_test *sbrt = dev_get_priv(dev);
21 return reset_get_by_name(dev, "test", &sbrt->ctl);
24 int sandbox_reset_test_assert(struct udevice *dev)
26 struct sandbox_reset_test *sbrt = dev_get_priv(dev);
28 return reset_assert(&sbrt->ctl);
31 int sandbox_reset_test_deassert(struct udevice *dev)
33 struct sandbox_reset_test *sbrt = dev_get_priv(dev);
35 return reset_deassert(&sbrt->ctl);
38 int sandbox_reset_test_free(struct udevice *dev)
40 struct sandbox_reset_test *sbrt = dev_get_priv(dev);
42 return reset_free(&sbrt->ctl);
45 static const struct udevice_id sandbox_reset_test_ids[] = {
46 { .compatible = "sandbox,reset-ctl-test" },
50 U_BOOT_DRIVER(sandbox_reset_test) = {
51 .name = "sandbox_reset_test",
53 .of_match = sandbox_reset_test_ids,
54 .priv_auto_alloc_size = sizeof(struct sandbox_reset_test),