2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
7 * Copyright (C) 1997, 2001 Ralf Baechle
8 * Copyright 2001 MontaVista Software Inc.
9 * Author: jsun@mvista.com or jsun@junsun.net
11 #include <linux/sched.h>
14 #include <asm/pgtable.h>
15 #include <asm/processor.h>
16 #include <asm/reboot.h>
17 #include <asm/system.h>
18 #include <linux/delay.h>
20 void momenco_ocelot_restart(char *command)
22 void *nvram = ioremap_nocache(0x2c807000, 0x1000);
25 printk(KERN_NOTICE "ioremap of reset register failed\n");
28 writeb(0x84, nvram + 0xff7); /* Ask the NVRAM/RTC/watchdog chip to
29 assert reset in 1/16 second */
32 printk(KERN_NOTICE "Watchdog reset failed\n");
35 void momenco_ocelot_halt(void)
37 printk(KERN_NOTICE "\n** You can safely turn off the power\n");
39 __asm__(".set\tmips3\n\t"
44 void momenco_ocelot_power_off(void)
46 momenco_ocelot_halt();