blob: 913893d446502981e6e268b4dc5ac3e9536b3109 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* arch/arm/mach-s3c2410/include/mach/system-reset.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System define for arch_reset() function
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <mach/hardware.h>
Ben Dooks3cba5ef2009-05-17 23:30:45 +010014#include <plat/watchdog-reset.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010015
16extern void (*s3c24xx_reset_hook)(void);
17
18static void
Russell Kingbe093be2009-03-19 16:20:24 +000019arch_reset(char mode, const char *cmd)
Russell Kinga09e64f2008-08-05 16:14:15 +010020{
Russell Kinga09e64f2008-08-05 16:14:15 +010021 if (mode == 's') {
Russell Kinge879c862011-11-01 13:16:26 +000022 soft_restart(0);
Russell Kinga09e64f2008-08-05 16:14:15 +010023 }
24
25 if (s3c24xx_reset_hook)
26 s3c24xx_reset_hook();
27
Ben Dooks3cba5ef2009-05-17 23:30:45 +010028 arch_wdt_reset();
Russell Kinga09e64f2008-08-05 16:14:15 +010029
30 /* we'll take a jump through zero as a poor second */
Russell Kinge879c862011-11-01 13:16:26 +000031 soft_restart(0);
Russell Kinga09e64f2008-08-05 16:14:15 +010032}