2009-05-31 10:44:45 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007-2008
|
2011-10-31 23:00:39 +00:00
|
|
|
* Stelian Pop <stelian@popies.net>
|
2009-05-31 10:44:45 +00:00
|
|
|
* Lead Tech Design <www.leadtechdesign.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2009-05-31 10:44:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2010-11-07 12:26:14 +00:00
|
|
|
#include <asm/io.h>
|
2009-05-31 10:44:45 +00:00
|
|
|
#include <asm/arch/hardware.h>
|
|
|
|
#include <asm/arch/at91_rstc.h>
|
|
|
|
|
2010-08-09 11:25:37 +00:00
|
|
|
/* Reset the cpu by telling the reset controller to do so */
|
2009-05-31 10:44:45 +00:00
|
|
|
void reset_cpu(ulong ignored)
|
|
|
|
{
|
2010-11-03 14:39:55 +00:00
|
|
|
at91_rstc_t *rstc = (at91_rstc_t *) ATMEL_BASE_RSTC;
|
2010-02-03 21:46:58 +00:00
|
|
|
|
2010-08-09 11:25:37 +00:00
|
|
|
writel(AT91_RSTC_KEY
|
|
|
|
| AT91_RSTC_CR_PROCRST /* Processor Reset */
|
|
|
|
| AT91_RSTC_CR_PERRST /* Peripheral Reset */
|
|
|
|
#ifdef CONFIG_AT91RESET_EXTRST
|
|
|
|
| AT91_RSTC_CR_EXTRST /* External Reset (assert nRST pin) */
|
|
|
|
#endif
|
|
|
|
, &rstc->cr);
|
|
|
|
/* never reached */
|
|
|
|
while (1)
|
|
|
|
;
|
2009-05-31 10:44:45 +00:00
|
|
|
}
|