| .. | .. |
|---|
| 4 | 4 | #include <linux/kernel.h> |
|---|
| 5 | 5 | #include <linux/reboot.h> |
|---|
| 6 | 6 | #include <linux/module.h> |
|---|
| 7 | | -#ifdef CONFIG_SUPERH32 |
|---|
| 8 | 7 | #include <asm/watchdog.h> |
|---|
| 9 | | -#endif |
|---|
| 10 | 8 | #include <asm/addrspace.h> |
|---|
| 11 | 9 | #include <asm/reboot.h> |
|---|
| 12 | 10 | #include <asm/tlbflush.h> |
|---|
| .. | .. |
|---|
| 15 | 13 | void (*pm_power_off)(void); |
|---|
| 16 | 14 | EXPORT_SYMBOL(pm_power_off); |
|---|
| 17 | 15 | |
|---|
| 18 | | -#ifdef CONFIG_SUPERH32 |
|---|
| 19 | 16 | static void watchdog_trigger_immediate(void) |
|---|
| 20 | 17 | { |
|---|
| 21 | 18 | sh_wdt_write_cnt(0xFF); |
|---|
| 22 | 19 | sh_wdt_write_csr(0xC2); |
|---|
| 23 | 20 | } |
|---|
| 24 | | -#endif |
|---|
| 25 | 21 | |
|---|
| 26 | 22 | static void native_machine_restart(char * __unused) |
|---|
| 27 | 23 | { |
|---|
| .. | .. |
|---|
| 33 | 29 | /* Address error with SR.BL=1 first. */ |
|---|
| 34 | 30 | trigger_address_error(); |
|---|
| 35 | 31 | |
|---|
| 36 | | -#ifdef CONFIG_SUPERH32 |
|---|
| 37 | 32 | /* If that fails or is unsupported, go for the watchdog next. */ |
|---|
| 38 | 33 | watchdog_trigger_immediate(); |
|---|
| 39 | | -#endif |
|---|
| 40 | 34 | |
|---|
| 41 | 35 | /* |
|---|
| 42 | 36 | * Give up and sleep. |
|---|