Path: blob/master/arch/arm/mach-bcmring/include/mach/system.h
10820 views
/*1*2* Copyright (C) 1999 ARM Limited3* Copyright (C) 2000 Deep Blue Solutions Ltd4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/19#ifndef __ASM_ARCH_SYSTEM_H20#define __ASM_ARCH_SYSTEM_H2122#include <mach/csp/chipcHw_inline.h>2324extern int bcmring_arch_warm_reboot;2526static inline void arch_idle(void)27{28cpu_do_idle();29}3031static inline void arch_reset(char mode, const char *cmd)32{33printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot);3435if (mode == 'h') {36/* Reboot configured in proc entry */37if (bcmring_arch_warm_reboot) {38printk("warm reset\n");39/* Issue Warm reset (do not reset ethernet switch, keep alive) */40chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM);41} else {42/* Force reset of everything */43printk("force reset\n");44chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);45}46} else {47/* Force reset of everything */48printk("force reset\n");49chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);50}51}5253#endif545556