reset.c 609 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2014, STMicroelectronics - All Rights Reserved
  4. * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
  5. */
  6. #include <common.h>
  7. #include <asm/io.h>
  8. #include <asm/arch/stv0991_wdru.h>
  9. void reset_cpu(ulong ignored)
  10. {
  11. puts("System is going to reboot ...\n");
  12. /*
  13. * This 1 second delay will allow the above message
  14. * to be printed before reset
  15. */
  16. udelay((1000 * 1000));
  17. /* Setting bit 1 of the WDRU unit will reset the SoC */
  18. writel(WDRU_RST_SYS, &stv0991_wd_ru_ptr->wdru_ctrl1);
  19. /* system will restart */
  20. while (1)
  21. ;
  22. }