/*1* Carsten Langgaard, [email protected]2* Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.3* Portions copyright (C) 2009 Cisco Systems, Inc.4*5* This program is free software; you can distribute it and/or modify it6* under the terms of the GNU General Public License (Version 2) as7* published by the Free Software Foundation.8*9* This program is distributed in the hope it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* for more details.13*14* You should have received a copy of the GNU General Public License along15* with this program; if not, write to the Free Software Foundation, Inc.,16* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.17*/18#include <linux/pm.h>1920#include <linux/io.h>21#include <asm/reboot.h> /* Not included by linux/reboot.h */2223#ifdef CONFIG_BOOTLOADER_DRIVER24#include <asm/mach-powertv/kbldr.h>25#endif2627#include <asm/mach-powertv/asic_regs.h>28#include "reset.h"2930static void mips_machine_restart(char *command)31{32#ifdef CONFIG_BOOTLOADER_DRIVER33/*34* Call the bootloader's reset function to ensure35* that persistent data is flushed before hard reset36*/37kbldr_SetCauseAndReset();38#else39writel(0x1, asic_reg_addr(watchdog));40#endif41}4243void mips_reboot_setup(void)44{45_machine_restart = mips_machine_restart;46}474849