/*1* Thomas Horsten <[email protected]>2* Copyright (C) 2000 LASAT Networks A/S.3*4* This program is free software; you can distribute it and/or modify it5* under the terms of the GNU General Public License (Version 2) as6* published by the Free Software Foundation.7*8* This program is distributed in the hope it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* for more details.12*13* You should have received a copy of the GNU General Public License along14* with this program; if not, write to the Free Software Foundation, Inc.,15* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.16*17* Reset the LASAT board.18*/19#include <linux/kernel.h>20#include <linux/pm.h>2122#include <asm/reboot.h>23#include <asm/system.h>24#include <asm/lasat/lasat.h>2526#include "picvue.h"27#include "prom.h"2829static void lasat_machine_restart(char *command);30static void lasat_machine_halt(void);3132/* Used to set machine to boot in service mode via /proc interface */33int lasat_boot_to_service;3435static void lasat_machine_restart(char *command)36{37local_irq_disable();3839if (lasat_boot_to_service) {40*(volatile unsigned int *)0xa0000024 = 0xdeadbeef;41*(volatile unsigned int *)0xa00000fc = 0xfedeabba;42}43*lasat_misc->reset_reg = 0xbedead;44for (;;) ;45}4647static void lasat_machine_halt(void)48{49local_irq_disable();5051prom_monitor();52for (;;) ;53}5455void lasat_reboot_setup(void)56{57_machine_restart = lasat_machine_restart;58_machine_halt = lasat_machine_halt;59pm_power_off = lasat_machine_halt;60}616263