spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / arch / arm / mach-shmobile / suspend.c
blobc1febe13f709e6a24b0bcbf4d709d80d2f189bb0
1 /*
2 * Suspend-to-RAM support code for SH-Mobile ARM
4 * Copyright (C) 2011 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
11 #include <linux/pm.h>
12 #include <linux/suspend.h>
13 #include <linux/module.h>
14 #include <linux/err.h>
15 #include <asm/system.h>
16 #include <asm/io.h>
18 static int shmobile_suspend_default_enter(suspend_state_t suspend_state)
20 cpu_do_idle();
21 return 0;
24 static int shmobile_suspend_begin(suspend_state_t state)
26 disable_hlt();
27 return 0;
30 static void shmobile_suspend_end(void)
32 enable_hlt();
35 struct platform_suspend_ops shmobile_suspend_ops = {
36 .begin = shmobile_suspend_begin,
37 .end = shmobile_suspend_end,
38 .enter = shmobile_suspend_default_enter,
39 .valid = suspend_valid_only_mem,
42 static int __init shmobile_suspend_init(void)
44 suspend_set_ops(&shmobile_suspend_ops);
45 return 0;
47 late_initcall(shmobile_suspend_init);