Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190518
b: refs/heads/master
c: 64fc74f
h: refs/heads/master
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Apr 30, 2010
1 parent 9a60120 commit d7ad913
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b197b6286650feb9c991826519065aac6f4399b1
refs/heads/master: 64fc74f5f6055e8470208a7d9cfc8d3994fff34d
20 changes: 19 additions & 1 deletion trunk/arch/mips/loongson/common/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,31 @@

#include <loongson.h>

static inline void loongson_reboot(void)
{
#ifndef CONFIG_CPU_JUMP_WORKAROUNDS
((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) ();
#else
void (*func)(void);

func = (void *)ioremap_nocache(LOONGSON_BOOT_BASE, 4);

__asm__ __volatile__(
" .set noat \n"
" jr %[func] \n"
" .set at \n"
: /* No outputs */
: [func] "r" (func));
#endif
}

static void loongson_restart(char *command)
{
/* do preparation for reboot */
mach_prepare_reboot();

/* reboot via jumping to boot base address */
((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) ();
loongson_reboot();
}

static void loongson_poweroff(void)
Expand Down

0 comments on commit d7ad913

Please sign in to comment.