From 38ae26e8e417cc32b56561270c4403d9c92e2498 Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Thu, 2 Jul 2009 23:21:27 +0800 Subject: [PATCH] --- yaml --- r: 162825 b: refs/heads/master c: f256a5775a357e2527c7bbfb59c125c4c4c356ad h: refs/heads/master i: 162823: 447b2aa4770c8e494071bbe00199252f2d102d3f v: v3 --- [refs] | 2 +- trunk/arch/mips/lemote/lm2e/reset.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index da77680ce0d3..4f2a5658dcbb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f0de87fa97667fa05c7bc938396ec759f021a21 +refs/heads/master: f256a5775a357e2527c7bbfb59c125c4c4c356ad diff --git a/trunk/arch/mips/lemote/lm2e/reset.c b/trunk/arch/mips/lemote/lm2e/reset.c index a6499a200788..0faa140f4036 100644 --- a/trunk/arch/mips/lemote/lm2e/reset.c +++ b/trunk/arch/mips/lemote/lm2e/reset.c @@ -6,22 +6,24 @@ * * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology * Author: Fuxin Zhang, zhangfx@lemote.com + * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology + * Author: Zhangjin Wu, wuzj@lemote.com */ #include #include +#include #include +#include static void loongson2e_restart(char *command) { -#ifdef CONFIG_32BIT - *(unsigned long *)0xbfe00104 &= ~(1 << 2); - *(unsigned long *)0xbfe00104 |= (1 << 2); -#else - *(unsigned long *)0xffffffffbfe00104 &= ~(1 << 2); - *(unsigned long *)0xffffffffbfe00104 |= (1 << 2); -#endif - __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000)); + /* do preparation for reboot */ + BONITO_BONGENCFG &= ~(1 << 2); + BONITO_BONGENCFG |= (1 << 2); + + /* reboot via jumping to boot base address */ + ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) (); } static void loongson2e_halt(void)