aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/nxp/pnx833x/common/reset.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-08 14:23:02 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-08 14:23:02 -0500
commit895e031707954a9ca26ed4f5f794575313854ed1 (patch)
treeec7cd5515f346e6f94bc43e63d55ebc8ddf4173d /arch/mips/nxp/pnx833x/common/reset.c
parent838e8bb71dc0c892bf8f84abd3c709d8fe3a8d3c (diff)
parenta622cf69b806bbb1887913c04e01d0c25b892876 (diff)
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'arch/mips/nxp/pnx833x/common/reset.c')
-rw-r--r--arch/mips/nxp/pnx833x/common/reset.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/mips/nxp/pnx833x/common/reset.c b/arch/mips/nxp/pnx833x/common/reset.c
new file mode 100644
index 000000000000..a9bc9bacad2b
--- /dev/null
+++ b/arch/mips/nxp/pnx833x/common/reset.c
@@ -0,0 +1,45 @@
1/*
2 * reset.c: reset support for PNX833X.
3 *
4 * Copyright 2008 NXP Semiconductors
5 * Chris Steel <chris.steel@nxp.com>
6 * Daniel Laird <daniel.j.laird@nxp.com>
7 *
8 * Based on software written by:
9 * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25#include <linux/slab.h>
26#include <linux/reboot.h>
27#include <pnx833x.h>
28
29void pnx833x_machine_restart(char *command)
30{
31 PNX833X_RESET_CONTROL_2 = 0;
32 PNX833X_RESET_CONTROL = 0;
33}
34
35void pnx833x_machine_halt(void)
36{
37 while (1)
38 __asm__ __volatile__ ("wait");
39
40}
41
42void pnx833x_machine_power_off(void)
43{
44 pnx833x_machine_halt();
45}