reset_manager.c 580 B

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