reset_manager.c 577 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2013 Altera Corporation <www.altera.com>
  4. */
  5. #include <common.h>
  6. #include <asm/io.h>
  7. #include <asm/arch/reset_manager.h>
  8. static const struct socfpga_reset_manager *reset_manager_base =
  9. (void *)SOCFPGA_RSTMGR_ADDRESS;
  10. /*
  11. * Write the reset manager register to cause reset
  12. */
  13. void reset_cpu(ulong addr)
  14. {
  15. /* request a warm reset */
  16. writel(1 << RSTMGR_CTRL_SWWARMRSTREQ_LSB,
  17. &reset_manager_base->ctrl);
  18. /*
  19. * infinite loop here as watchdog will trigger and reset
  20. * the processor
  21. */
  22. while (1)
  23. ;
  24. }