1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-29 06:00:37 +02:00
openwrt-xburst/target/linux/xburst/files-2.6.27/arch/mips/jz4730/reset.c
Mirko Vogt dc3d3f1c49 yet another patchset - 2.6.27
it's basically also provided by ingenic and nativly based on 2.6.27,
adjusted to fit into the OpenWrt-environment
2009-10-28 03:13:11 +08:00

41 lines
816 B
C

/*
* linux/arch/mips/jz4730/reset.c
*
* JZ4730 reset routines.
*
* Copyright (c) 2006-2007 Ingenic Semiconductor Inc.
* Author: <jlwei@ingenic.cn>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/sched.h>
#include <linux/mm.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/reboot.h>
#include <asm/system.h>
#include <asm/jzsoc.h>
void jz_restart(char *command)
{
__wdt_set_count(0xffffffff-32); /* reset after 1/1024 s */
__wdt_start();
while (1);
}
void jz_halt(void)
{
__wdt_set_count(0xffffffff-32); /* reset after 1/1024 s */
__wdt_start();
while (1);
}
void jz_power_off(void)
{
jz_halt();
}