summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-09-01 09:43:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-09-01 09:43:55 +0200
commit67e0a30e77c0dadfb225eef7e9bdcccdcae4d679 (patch)
treeaa1887ec66dc1e48eaeacca93ac38b55a49a3f99 /arch/arm/mach-ep93xx
parentb7ab2081b1f1f13f0823bb6e8e33884510e105d7 (diff)
parentce36b4a05e275dcc12e74e96ddae99c21faad466 (diff)
downloadbarebox-67e0a30e77c0dadfb225eef7e9bdcccdcae4d679.tar.gz
barebox-67e0a30e77c0dadfb225eef7e9bdcccdcae4d679.tar.xz
Merge branch 'for-next/restart'
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/clocksource.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/arm/mach-ep93xx/clocksource.c b/arch/arm/mach-ep93xx/clocksource.c
index f396d0a0a2..83c05cea00 100644
--- a/arch/arm/mach-ep93xx/clocksource.c
+++ b/arch/arm/mach-ep93xx/clocksource.c
@@ -20,6 +20,7 @@
#include <init.h>
#include <clock.h>
#include <io.h>
+#include <restart.h>
#include <mach/ep93xx-regs.h>
#define TIMER_CLKSEL (1 << 3)
@@ -63,10 +64,8 @@ static int clocksource_init(void)
core_initcall(clocksource_init);
-/*
- * Reset the cpu
- */
-void __noreturn reset_cpu(unsigned long addr)
+/* Reset the SoC */
+static void __noreturn ep92xx_restart_soc(struct restart_handler *rst)
{
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
uint32_t value;
@@ -84,7 +83,13 @@ void __noreturn reset_cpu(unsigned long addr)
writel(value, &syscon->devicecfg);
/* Dying... */
- while (1)
- ; /* noop */
+ hang();
+}
+
+static int restart_register_feature(void)
+{
+ restart_handler_register_fn(ep92xx_restart_soc);
+
+ return 0;
}
-EXPORT_SYMBOL(reset_cpu);
+coredevice_initcall(restart_register_feature);