diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2007-07-18 06:38:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-20 12:25:10 -0400 |
commit | 711be5ccfe9a02ba560aa918a008c31ea4760163 (patch) | |
tree | b54cba04944a5ae0cb8a2d8ecd4d8efd14f2e495 /include | |
parent | e09d02e123fb6944af23a0697369ebcfc15acf73 (diff) |
[ARM] 4488/1: pxa: move pxa25x/pxa27x specific code out of pm.c
1. introduce a structure pxa_cpu_pm_fns for pxa25x/pxa27x specific
operations as follows:
struct pxa_cpu_pm_fns {
int save_size;
void (*save)(unsigned long *);
void (*restore)(unsigned long *);
int (*valid)(suspend_state_t state);
void (*enter)(suspend_state_t state);
}
2. processor specific registers saving and restoring are performed
by calling the corresponding (*save) and (*restore)
3. pxa_cpu_pm_fns->save_size should be initialized to the required
size for processor specific registers saving, the allocated
memory address will be passed to (*save) and (*restore)
memory allocation happens early in pxa_pm_init(), and save_size
should be assigned prior to this (which is usually true, since
pxa_pm_init() happens in device_initcall()
4. there're some redundancies for those SLEEP_SAVE_XXX and related
macros, will be fixed later, one way possible is for the system
devices to handle the specific registers saving and restoring
Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/pm.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asm-arm/arch-pxa/pm.h b/include/asm-arm/arch-pxa/pm.h index 52243a62c4e7..62b69004819d 100644 --- a/include/asm-arm/arch-pxa/pm.h +++ b/include/asm-arm/arch-pxa/pm.h | |||
@@ -7,5 +7,14 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | extern int pxa_pm_prepare(suspend_state_t state); | 10 | struct pxa_cpu_pm_fns { |
11 | int save_size; | ||
12 | void (*save)(unsigned long *); | ||
13 | void (*restore)(unsigned long *); | ||
14 | int (*valid)(suspend_state_t state); | ||
15 | void (*enter)(suspend_state_t state); | ||
16 | }; | ||
17 | |||
18 | extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; | ||
19 | |||
11 | extern int pxa_pm_enter(suspend_state_t state); | 20 | extern int pxa_pm_enter(suspend_state_t state); |