reset.c 676 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2007-2008
  4. * Stelian Pop <stelian@popies.net>
  5. * Lead Tech Design <www.leadtechdesign.com>
  6. */
  7. #include <common.h>
  8. #include <asm/io.h>
  9. #include <asm/arch/hardware.h>
  10. #include <asm/arch/at91_rstc.h>
  11. /* Reset the cpu by telling the reset controller to do so */
  12. void reset_cpu(ulong ignored)
  13. {
  14. at91_rstc_t *rstc = (at91_rstc_t *) ATMEL_BASE_RSTC;
  15. writel(AT91_RSTC_KEY
  16. | AT91_RSTC_CR_PROCRST /* Processor Reset */
  17. | AT91_RSTC_CR_PERRST /* Peripheral Reset */
  18. #ifdef CONFIG_AT91RESET_EXTRST
  19. | AT91_RSTC_CR_EXTRST /* External Reset (assert nRST pin) */
  20. #endif
  21. , &rstc->cr);
  22. /* never reached */
  23. while (1)
  24. ;
  25. }