summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-03-30 10:16:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-03-30 14:15:03 +0200
commite11c07c33994383052f041dd5551b80bee4fb6f3 (patch)
tree2e8e7c4f7e90f7268b0153baea8fede139e6309a /arch
parent6eb741a2e1e8a956097ea59dfe573727ff11160f (diff)
downloadbarebox-e11c07c33994383052f041dd5551b80bee4fb6f3.tar.gz
barebox-e11c07c33994383052f041dd5551b80bee4fb6f3.tar.xz
make reset_cpu a __noreturn function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/clocksource.c5
-rw-r--r--arch/arm/mach-ep93xx/clocksource.c2
-rw-r--r--arch/arm/mach-imx/clocksource.c2
-rw-r--r--arch/arm/mach-netx/generic.c5
-rw-r--r--arch/arm/mach-omap/omap3_generic.c2
-rw-r--r--arch/arm/mach-s3c24xx/generic.c2
-rw-r--r--arch/blackfin/lib/cpu.c5
-rw-r--r--arch/m68k/mach-mcfv4e/mcf_reset_cpu.c2
-rw-r--r--arch/ppc/mach-mpc5xxx/cpu.c2
-rw-r--r--arch/sandbox/os/common.c2
-rw-r--r--arch/x86/mach-i386/reset.c2
11 files changed, 20 insertions, 11 deletions
diff --git a/arch/arm/mach-at91/clocksource.c b/arch/arm/mach-at91/clocksource.c
index 564b560092..84df1a13ad 100644
--- a/arch/arm/mach-at91/clocksource.c
+++ b/arch/arm/mach-at91/clocksource.c
@@ -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);
diff --git a/arch/arm/mach-ep93xx/clocksource.c b/arch/arm/mach-ep93xx/clocksource.c
index 2a7d90e4e2..3aa8e14a7a 100644
--- a/arch/arm/mach-ep93xx/clocksource.c
+++ b/arch/arm/mach-ep93xx/clocksource.c
@@ -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;
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 09d43183b8..4b400a0ca7 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -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;
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 69cf196c61..de1e1b0434 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -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);
}
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index 05c5c198bd..9893145780 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -56,7 +56,7 @@
*
* @return void
*/
-void reset_cpu(ulong addr)
+void __noreturn reset_cpu(ulong addr)
{
/* FIXME: Enable WDT and cause reset */
hang();
diff --git a/arch/arm/mach-s3c24xx/generic.c b/arch/arm/mach-s3c24xx/generic.c
index 2de03ca809..372904f89d 100644
--- a/arch/arm/mach-s3c24xx/generic.c
+++ b/arch/arm/mach-s3c24xx/generic.c
@@ -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);
diff --git a/arch/blackfin/lib/cpu.c b/arch/blackfin/lib/cpu.c
index e81fa9a6d0..f96d22da13 100644
--- a/arch/blackfin/lib/cpu.c
+++ b/arch/blackfin/lib/cpu.c
@@ -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)
diff --git a/arch/m68k/mach-mcfv4e/mcf_reset_cpu.c b/arch/m68k/mach-mcfv4e/mcf_reset_cpu.c
index c7b77abcf5..3b1a25b269 100644
--- a/arch/m68k/mach-mcfv4e/mcf_reset_cpu.c
+++ b/arch/m68k/mach-mcfv4e/mcf_reset_cpu.c
@@ -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 ) { ; };
diff --git a/arch/ppc/mach-mpc5xxx/cpu.c b/arch/ppc/mach-mpc5xxx/cpu.c
index 59b1538cd0..7ee1954be4 100644
--- a/arch/ppc/mach-mpc5xxx/cpu.c
+++ b/arch/ppc/mach-mpc5xxx/cpu.c
@@ -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 */
diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c
index d63a2f4063..acfa35e035 100644
--- a/arch/sandbox/os/common.c
+++ b/arch/sandbox/os/common.c
@@ -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);
diff --git a/arch/x86/mach-i386/reset.c b/arch/x86/mach-i386/reset.c
index a4eb364870..cdd970e53e 100644
--- a/arch/x86/mach-i386/reset.c
+++ b/arch/x86/mach-i386/reset.c
@@ -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)