48 lines
1015 B
C
48 lines
1015 B
C
/* Board-specific reboot/shutdown routines
|
|
* Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
|
|
*
|
|
* Copyright (C) 2009 Lemote Inc.
|
|
* Author: Wu Zhangjin, wuzhangjin@gmail.com
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*/
|
|
|
|
#include <loongson.h>
|
|
#include <gsc3280/gsc3280_regs.h>
|
|
#include <linux/kernel.h>
|
|
|
|
void loongson_wait(void)
|
|
{
|
|
#ifdef CONFIG_CPU_WAIT
|
|
unsigned int volatile *addr = (unsigned int volatile *)GSC3280_REGADDR_ICTL_INTEN_L;
|
|
|
|
|
|
if (system_state == SYSTEM_BOOTING)
|
|
return;
|
|
|
|
__asm__ volatile (
|
|
".set push \n"
|
|
".set noreorder \n"
|
|
".set mips3 \n"
|
|
"lw $0, %0 \n"
|
|
"nop \n"
|
|
"wait \n"
|
|
"nop \n"
|
|
".set mips2 \n"
|
|
".set pop \n"
|
|
: : "m" (addr)
|
|
);
|
|
#endif
|
|
}
|
|
|
|
void mach_prepare_reboot(void)
|
|
{
|
|
}
|
|
|
|
void mach_prepare_shutdown(void)
|
|
{
|
|
}
|