Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163524
b: refs/heads/master
c: b46373e
h: refs/heads/master
v: v3
  • Loading branch information
Jon Frosdick authored and Paul Mundt committed Aug 24, 2009
1 parent becba37 commit fe57520
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27a30f53bbb77fd7e2e0459197e23b63fe3b74d4
refs/heads/master: b46373e0d4b9f714ab757aae0c19c41fbcc73ef5
20 changes: 20 additions & 0 deletions trunk/arch/sh/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,35 @@
#include <asm/ubc.h>
#include <asm/fpu.h>
#include <asm/syscalls.h>
#include <asm/watchdog.h>

int ubc_usercnt = 0;

#ifdef CONFIG_32BIT
static void watchdog_trigger_immediate(void)
{
sh_wdt_write_cnt(0xFF);
sh_wdt_write_csr(0xC2);
}

void machine_restart(char * __unused)
{
local_irq_disable();

/* Use watchdog timer to trigger reset */
watchdog_trigger_immediate();

while (1)
cpu_sleep();
}
#else
void machine_restart(char * __unused)
{
/* SR.BL=1 and invoke address error to let CPU reset (manual reset) */
asm volatile("ldc %0, sr\n\t"
"mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
}
#endif

void machine_halt(void)
{
Expand Down

0 comments on commit fe57520

Please sign in to comment.