/* Board-specific reboot/shutdown routines * Copyright (c) 2009 Philippe Vachon * * 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 #include #include 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) { }