mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-01 11:03:09 +02:00
make poweroff command work
This commit is contained in:
parent
3fc244fbb4
commit
1649bbc3d6
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
void jz_restart(char *command)
|
void jz_restart(char *command)
|
||||||
{
|
{
|
||||||
printk("Restarting after 4 ms\n");
|
printk(KERN_NOTICE "Restarting after 4 ms\n");
|
||||||
REG_WDT_TCSR = WDT_TCSR_PRESCALE4 | WDT_TCSR_EXT_EN;
|
REG_WDT_TCSR = WDT_TCSR_PRESCALE4 | WDT_TCSR_EXT_EN;
|
||||||
REG_WDT_TCNT = 0;
|
REG_WDT_TCNT = 0;
|
||||||
REG_WDT_TDR = JZ_EXTAL/1000; /* reset after 4ms */
|
REG_WDT_TDR = JZ_EXTAL/1000; /* reset after 4ms */
|
||||||
@ -32,7 +32,9 @@ void jz_restart(char *command)
|
|||||||
|
|
||||||
void jz_halt(void)
|
void jz_halt(void)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "\n** You can safely turn off the power\n");
|
/* Put CPU to power down mode */
|
||||||
|
while (!(REG_RTC_RCR & RTC_RCR_WRDY));
|
||||||
|
REG_RTC_HCR = RTC_HCR_PD;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
__asm__(".set\tmips3\n\t"
|
__asm__(".set\tmips3\n\t"
|
||||||
|
Loading…
Reference in New Issue
Block a user