Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58b2e0a2 authored by Li Jie's avatar Li Jie Committed by Russell King
Browse files

ARM: 5864/1: Implement arch_reset() in NUC900



Implement arch_reset(), reboot from shell become possible.

Signed-off-by: default avatarlijie <eltshanli@gmail.com>
Acked-by: default avatarWan ZongShun <mcuos.com@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1368c51c
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -15,7 +15,15 @@
 *
 */

#include <linux/io.h>
#include <asm/proc-fns.h>
#include <mach/map.h>
#include <mach/regs-timer.h>

#define	WTCR	(TMR_BA + 0x1C)
#define	WTCLK	(1 << 10)
#define	WTE	(1 << 7)
#define	WTRE	(1 << 1)

static void arch_idle(void)
{
@@ -23,6 +31,11 @@ static void arch_idle(void)

static void arch_reset(char mode, const char *cmd)
{
	if (mode == 's') {
		/* Jump into ROM at address 0 */
		cpu_reset(0);
	} else {
		__raw_writel(WTE | WTRE | WTCLK, WTCR);
	}
}