syscon_sandbox.c 567 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2015 Google, Inc
  3. * Written by Simon Glass <sjg@chromium.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <dm.h>
  9. #include <errno.h>
  10. #include <syscon.h>
  11. #include <asm/test.h>
  12. #include <dm/lists.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. static const struct udevice_id sandbox_syscon_ids[] = {
  15. { .compatible = "sandbox,syscon0", .data = SYSCON0 },
  16. { .compatible = "sandbox,syscon1", .data = SYSCON1 },
  17. { }
  18. };
  19. U_BOOT_DRIVER(sandbox_syscon) = {
  20. .name = "sandbox_syscon",
  21. .id = UCLASS_SYSCON,
  22. .of_match = sandbox_syscon_ids,
  23. };