[x86] merge the olpc target with the x86 target, both tested and running
[openwrt.git] / target / linux / coldfire / patches / 087-m547x_8x_reboot_wd.patch
1 From b3a11478f28a24b719ff6426f52216c37c3331d7 Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Thu, 17 Jul 2008 17:02:29 -0600
4 Subject: [PATCH] Enable watchdog to reboot the processor.
5
6 LTIBName: m547x-8x-reboot-wd
7 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
8 ---
9 arch/m68k/coldfire/config.c | 9 +++++++++
10 1 files changed, 9 insertions(+), 0 deletions(-)
11
12 --- a/arch/m68k/coldfire/config.c
13 +++ b/arch/m68k/coldfire/config.c
14 @@ -50,6 +50,10 @@
15 #include <asm/mcf5445x_xbs.h>
16 #endif
17
18 +#ifdef CONFIG_M547X_8X
19 +#include <asm/m5485gpt.h>
20 +#endif
21 +
22 extern int get_irq_list(struct seq_file *p, void *v);
23 extern char _text, _end;
24 extern char _etext, _edata, __init_begin, __init_end;
25 @@ -379,6 +383,11 @@ void coldfire_reboot(void)
26 "moveb #0x80, %%d0\n\t"
27 "moveb %%d0, 0xfc0a0000\n\t"
28 : : : "%d0");
29 +#elif defined(CONFIG_M547X_8X)
30 + /* disable interrupts and enable the watchdog */
31 + printk(KERN_INFO "Rebooting\n");
32 + asm("movew #0x2700, %sr\n");
33 + MCF_GPT_GMS0 = MCF_GPT_GMS_WDEN | MCF_GPT_GMS_CE | MCF_GPT_GMS_TMS(4);
34 #endif
35 }
36
This page took 0.047589 seconds and 5 git commands to generate.