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