From e03a58d617d3116b0894629a9c359c9a9ec91247 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=90=B4=E5=BA=86=E6=A3=8B?= Date: Sat, 12 Jun 2010 06:53:37 +0000 Subject: [PATCH] 2818 reboot function --- arch/arm/mach-rk2818/include/mach/system.h | 41 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rk2818/include/mach/system.h b/arch/arm/mach-rk2818/include/mach/system.h index 7baec047d6a7..d96755306066 100644 --- a/arch/arm/mach-rk2818/include/mach/system.h +++ b/arch/arm/mach-rk2818/include/mach/system.h @@ -12,15 +12,46 @@ * GNU General Public License for more details. * */ + + /*************** +* DEBUG +****************/ +#define RESTART_DEBUG +#ifdef RESTART_DEBUG +#define restart_dbg(format, arg...) \ + printk("RESTART_DEBUG : " format "\n" , ## arg) +#else +#define restart_dbg(format, arg...) do {} while (0) +#endif -#include +#ifdef CONFIG_RK2818_POWER +extern int rk2818_restart( int mode, const char *cmd) ; -static inline void arch_idle(void) +static inline void arch_reset(int mode, const char *cmd) { - cpu_do_idle(); + + /* + * debug trace + */ + restart_dbg("%s->%s->%d->mode=%d cmd=%s",__FILE__,__FUNCTION__,__LINE__,mode,cmd); + rk2818_restart( mode, cmd) ; } -static inline void arch_reset(char mode, const char *cmd) +#else + +static inline void arch_reset(int mode, const char *cmd) { - for (;;) ; /* depends on IPC w/ other core */ + + /* + * debug trace + */ + restart_dbg("%s->%s->%d->mode=%c cmd=%s",__FILE__,__FUNCTION__,__LINE__,mode,cmd); + printk("Can't reboot. Please open rk2818 power manage!!\n"); + for(;;); +} +#endif + +static inline void arch_idle(void) +{ + cpu_do_idle(); } -- 2.34.1