2 * linux/arch/mips/jz4740/reset.c
4 * JZ4740 reset routines.
6 * Copyright (c) 2006-2007 Ingenic Semiconductor Inc.
7 * Author: <yliu@ingenic.cn>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 #include <linux/sched.h>
16 #include <asm/pgtable.h>
17 #include <asm/processor.h>
18 #include <asm/reboot.h>
19 #include <asm/system.h>
20 #include <asm/mach-jz4740/regs.h>
21 #include <asm/mach-jz4740/timer.h>
22 #include <asm/mach-jz4740/jz4740.h>
24 void jz_restart(char *command
)
26 printk(KERN_NOTICE
"Restarting after 4 ms\n");
27 REG_WDT_TCSR
= WDT_TCSR_PRESCALE4
| WDT_TCSR_EXT_EN
;
29 REG_WDT_TDR
= JZ_EXTAL
/1000; /* reset after 4ms */
30 jz4740_timer_enable_watchdog();
31 REG_WDT_TCER
= WDT_TCER_TCEN
; /* wdt start */
37 /* Put CPU to power down mode */
38 while (!(REG_RTC_RCR
& RTC_RCR_WRDY
));
39 REG_RTC_HCR
= RTC_HCR_PD
;
42 __asm__(".set\tmips3\n\t"
47 void jz_power_off(void)
This page took 0.048395 seconds and 5 git commands to generate.