aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:25:15 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:25:27 -0500
commit7b9dd47136c07ffd883aff6926c7b281e4c1eea4 (patch)
treeb835312e76fe323de3e1cbbb0d15fca5a3f7ef9c /arch/arm/mach-ixp4xx/common.c
parent2e0e943436912ffe0848ece58167edfe754edb96 (diff)
parent0575fb754dbfc32a01f297e778533340a533ec68 (diff)
Merge branch 'restart' into for-linus
Conflicts: arch/arm/mach-exynos/cpu.c The changes to arch/arm/mach-exynos/cpu.c were moved to mach-exynos/common.c.
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index c1b12f945fc9..3841ab4146ba 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -491,3 +491,23 @@ static void __init ixp4xx_clockevent_init(void)
491 491
492 clockevents_register_device(&clockevent_ixp4xx); 492 clockevents_register_device(&clockevent_ixp4xx);
493} 493}
494
495void ixp4xx_restart(char mode, const char *cmd)
496{
497 if ( 1 && mode == 's') {
498 /* Jump into ROM at address 0 */
499 soft_restart(0);
500 } else {
501 /* Use on-chip reset capability */
502
503 /* set the "key" register to enable access to
504 * "timer" and "enable" registers
505 */
506 *IXP4XX_OSWK = IXP4XX_WDT_KEY;
507
508 /* write 0 to the timer register for an immediate reset */
509 *IXP4XX_OSWT = 0;
510
511 *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
512 }
513}