tizen 2.4 release
[kernel/u-boot-tm1.git] / property / reboot_mode.c
1 #include <config.h>
2 #include <common.h>
3 #include <linux/types.h>
4 #include <asm/arch/bits.h>
5
6 #include <asm/arch/cmddef.h>
7 #include <boot_mode.h>
8 #include <asm/arch/sci_types.h>
9 #include <asm/arch/boot_drvapi.h>
10 #include <asm/arch/mocor_boot_mode.h>
11
12 static void ResetMCU(void)
13 {
14     /* set watchdog reset flag */
15     CHIP_PHY_ResetHWFlag(0x1FFF);
16     CHIP_PHY_SetWDGHWFlag(TYPE_RESET, AUTO_TEST_MODE);
17     /* reset the system via watchdog timeout */
18     CHIP_ResetMCU();
19
20     while (1);
21 }
22
23 void reboot_func(void)
24 {
25         /* reboot example only for amazing */
26         printf("\n--------%s %d-------\n", __FUNCTION__, __LINE__);
27         ResetMCU();
28 }
29
30