make reset_cpu a __noreturn function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
6eb741a2e1
commit
e11c07c339
|
@ -73,10 +73,13 @@ core_initcall(clocksource_init);
|
|||
/*
|
||||
* Reset the cpu through the reset controller
|
||||
*/
|
||||
void reset_cpu (ulong ignored)
|
||||
void __noreturn reset_cpu (unsigned long ignored)
|
||||
{
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY |
|
||||
AT91_RSTC_PROCRST |
|
||||
AT91_RSTC_PERRST);
|
||||
|
||||
/* Not reached */
|
||||
while (1);
|
||||
}
|
||||
EXPORT_SYMBOL(reset_cpu);
|
||||
|
|
|
@ -72,7 +72,7 @@ core_initcall(clocksource_init);
|
|||
/*
|
||||
* Reset the cpu
|
||||
*/
|
||||
void reset_cpu(ulong ignored)
|
||||
void __noreturn reset_cpu(unsigned long ignored)
|
||||
{
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
uint32_t value;
|
||||
|
|
|
@ -95,7 +95,7 @@ core_initcall(clocksource_init);
|
|||
/*
|
||||
* Reset the cpu by setting up the watchdog timer and let it time out
|
||||
*/
|
||||
void reset_cpu (ulong ignored)
|
||||
void __noreturn reset_cpu (unsigned long ignored)
|
||||
{
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
WCR = 0x0000;
|
||||
|
|
|
@ -137,9 +137,12 @@ failure:
|
|||
return COMMAND_ERROR_USAGE;
|
||||
}
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
{
|
||||
SYSTEM_REG(SYSTEM_RES_CR) = 0x01000008;
|
||||
|
||||
/* Not reached */
|
||||
while (1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
void reset_cpu(ulong addr)
|
||||
void __noreturn reset_cpu(ulong addr)
|
||||
{
|
||||
/* FIXME: Enable WDT and cause reset */
|
||||
hang();
|
||||
|
|
|
@ -221,7 +221,7 @@ static int clocksource_init (void)
|
|||
}
|
||||
core_initcall(clocksource_init);
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
{
|
||||
/* Disable watchdog */
|
||||
writew(0x0000, WTCON);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <asm/cpu.h>
|
||||
#include <init.h>
|
||||
|
||||
void reset_cpu(ulong ignored)
|
||||
void __noreturn reset_cpu(ulong ignored)
|
||||
{
|
||||
icache_disable();
|
||||
|
||||
|
@ -43,6 +43,9 @@ void reset_cpu(ulong ignored)
|
|||
:
|
||||
: "r" (L1_ISRAM)
|
||||
);
|
||||
|
||||
/* Not reached */
|
||||
while (1);
|
||||
}
|
||||
|
||||
void icache_disable(void)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
/**
|
||||
* Reset the cpu by setting up the watchdog timer and let it time out
|
||||
*/
|
||||
void reset_cpu (ulong ignored)
|
||||
void __noreturn reset_cpu (unsigned long ignored)
|
||||
{
|
||||
while ( ignored ) { ; };
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ int checkcpu (void)
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
void reset_cpu (ulong unused)
|
||||
void __noreturn reset_cpu (unsigned long unused)
|
||||
{
|
||||
ulong msr;
|
||||
/* Interrupts and MMU off */
|
||||
|
|
|
@ -137,7 +137,7 @@ uint64_t linux_get_time(void)
|
|||
return now;
|
||||
}
|
||||
|
||||
int reset_cpu(int unused)
|
||||
void __attribute__((noreturn)) reset_cpu(int unused)
|
||||
{
|
||||
cookmode();
|
||||
exit(0);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <common.h>
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
{
|
||||
/** How to reset the machine? */
|
||||
while(1)
|
||||
|
|
|
@ -80,7 +80,7 @@ int readline (const char *prompt, char *buf, int len);
|
|||
long get_ram_size (volatile long *, long);
|
||||
|
||||
/* $(CPU)/cpu.c */
|
||||
void reset_cpu (ulong addr);
|
||||
void __noreturn reset_cpu(unsigned long addr);
|
||||
|
||||
/* $(CPU)/interrupts.c */
|
||||
//void timer_interrupt (struct pt_regs *);
|
||||
|
|
Loading…
Reference in New Issue