diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-05 08:10:55 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 07:57:14 -0500 |
commit | d1b860fbb2b0d25a5ccd8165ea4db2914b0820f5 (patch) | |
tree | b65b0c6ea80f9a9d0146fbaab6306a3be53ca449 /arch/arm/mach-ixp4xx/common.c | |
parent | b219415c39053dbe70e88c361b5e943acd74546c (diff) |
ARM: restart: ixp4xx: use new restart hook
Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Acked-by: Krzysztof HaĆasa <khc@pm.waw.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index b86a0055ab96..04aa12103bce 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -501,3 +501,23 @@ static void __init ixp4xx_clockevent_init(void) | |||
501 | 501 | ||
502 | clockevents_register_device(&clockevent_ixp4xx); | 502 | clockevents_register_device(&clockevent_ixp4xx); |
503 | } | 503 | } |
504 | |||
505 | void ixp4xx_restart(char mode, const char *cmd) | ||
506 | { | ||
507 | if ( 1 && mode == 's') { | ||
508 | /* Jump into ROM at address 0 */ | ||
509 | soft_restart(0); | ||
510 | } else { | ||
511 | /* Use on-chip reset capability */ | ||
512 | |||
513 | /* set the "key" register to enable access to | ||
514 | * "timer" and "enable" registers | ||
515 | */ | ||
516 | *IXP4XX_OSWK = IXP4XX_WDT_KEY; | ||
517 | |||
518 | /* write 0 to the timer register for an immediate reset */ | ||
519 | *IXP4XX_OSWT = 0; | ||
520 | |||
521 | *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE; | ||
522 | } | ||
523 | } | ||