sysreset_socfpga_soc64.c 642 B

1234567891011121314151617181920212223242526272829
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2019 Pepperl+Fuchs
  4. * Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <errno.h>
  9. #include <sysreset.h>
  10. #include <asm/arch/mailbox_s10.h>
  11. static int socfpga_sysreset_request(struct udevice *dev,
  12. enum sysreset_t type)
  13. {
  14. puts("Mailbox: Issuing mailbox cmd REBOOT_HPS\n");
  15. mbox_reset_cold();
  16. return -EINPROGRESS;
  17. }
  18. static struct sysreset_ops socfpga_sysreset = {
  19. .request = socfpga_sysreset_request,
  20. };
  21. U_BOOT_DRIVER(sysreset_socfpga) = {
  22. .id = UCLASS_SYSRESET,
  23. .name = "socfpga_sysreset",
  24. .ops = &socfpga_sysreset,
  25. };