Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* 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 Dooks | 3cba5ef | 2009-05-17 23:30:45 +0100 | [diff] [blame] | 14 | #include <plat/watchdog-reset.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 15 | |
| 16 | extern void (*s3c24xx_reset_hook)(void); |
| 17 | |
| 18 | static void |
Russell King | be093be | 2009-03-19 16:20:24 +0000 | [diff] [blame] | 19 | arch_reset(char mode, const char *cmd) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 20 | { |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 21 | if (mode == 's') { |
Russell King | e879c86 | 2011-11-01 13:16:26 +0000 | [diff] [blame^] | 22 | soft_restart(0); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | if (s3c24xx_reset_hook) |
| 26 | s3c24xx_reset_hook(); |
| 27 | |
Ben Dooks | 3cba5ef | 2009-05-17 23:30:45 +0100 | [diff] [blame] | 28 | arch_wdt_reset(); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 29 | |
| 30 | /* we'll take a jump through zero as a poor second */ |
Russell King | e879c86 | 2011-11-01 13:16:26 +0000 | [diff] [blame^] | 31 | soft_restart(0); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 32 | } |