-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 251358 b: refs/heads/master c: c3dada1 h: refs/heads/master v: v3
- Loading branch information
Magnus Damm
authored and
Paul Mundt
committed
May 25, 2011
1 parent
23429fc
commit 0e9aea4
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: cac6f98dfca51ec2dc906064ba0bf8be4f820ba0 | ||
refs/heads/master: c3dada1894de46139c21352a1000c0fd02d308d5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Suspend-to-RAM support code for SH-Mobile ARM | ||
* | ||
* Copyright (C) 2011 Magnus Damm | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#include <linux/pm.h> | ||
#include <linux/suspend.h> | ||
#include <linux/module.h> | ||
#include <linux/err.h> | ||
#include <asm/system.h> | ||
#include <asm/io.h> | ||
|
||
static int shmobile_suspend_default_enter(suspend_state_t suspend_state) | ||
{ | ||
cpu_do_idle(); | ||
return 0; | ||
} | ||
|
||
static int shmobile_suspend_begin(suspend_state_t state) | ||
{ | ||
disable_hlt(); | ||
return 0; | ||
} | ||
|
||
static void shmobile_suspend_end(void) | ||
{ | ||
enable_hlt(); | ||
} | ||
|
||
struct platform_suspend_ops shmobile_suspend_ops = { | ||
.begin = shmobile_suspend_begin, | ||
.end = shmobile_suspend_end, | ||
.enter = shmobile_suspend_default_enter, | ||
.valid = suspend_valid_only_mem, | ||
}; | ||
|
||
static int __init shmobile_suspend_init(void) | ||
{ | ||
suspend_set_ops(&shmobile_suspend_ops); | ||
return 0; | ||
} | ||
late_initcall(shmobile_suspend_init); |