-
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.
unicore32 additional architecture files: pm related files
This patch adds pm related files, including hibernate and sleep supports. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Acked-by: Arnd Bergmann <arnd@arndb.de>
- Loading branch information
GuanXuetao
committed
Mar 17, 2011
1 parent
f864d2f
commit 6490988
Showing
8 changed files
with
1,156 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* linux/arch/unicore32/include/asm/suspend.h | ||
* | ||
* Code specific to PKUnity SoC and UniCore ISA | ||
* | ||
* Copyright (C) 2001-2010 GUAN Xue-tao | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __UNICORE_SUSPEND_H__ | ||
#define __UNICORE_SUSPEND_H__ | ||
|
||
#ifndef __ASSEMBLY__ | ||
static inline int arch_prepare_suspend(void) { return 0; } | ||
|
||
#include <asm/ptrace.h> | ||
|
||
struct swsusp_arch_regs { | ||
struct cpu_context_save cpu_context; /* cpu context */ | ||
#ifdef CONFIG_UNICORE_FPU_F64 | ||
struct fp_state fpstate __attribute__((aligned(8))); | ||
#endif | ||
}; | ||
#endif | ||
|
||
#endif /* __UNICORE_SUSPEND_H__ */ | ||
|
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,43 @@ | ||
/* | ||
* linux/arch/unicore/include/mach/pm.h | ||
* | ||
* Code specific to PKUnity SoC and UniCore ISA | ||
* | ||
* Copyright (C) 2001-2010 GUAN Xue-tao | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#ifndef __PUV3_PM_H__ | ||
#define __PUV3_PM_H__ | ||
|
||
#include <linux/suspend.h> | ||
|
||
struct puv3_cpu_pm_fns { | ||
int save_count; | ||
void (*save)(unsigned long *); | ||
void (*restore)(unsigned long *); | ||
int (*valid)(suspend_state_t state); | ||
void (*enter)(suspend_state_t state); | ||
int (*prepare)(void); | ||
void (*finish)(void); | ||
}; | ||
|
||
extern struct puv3_cpu_pm_fns *puv3_cpu_pm_fns; | ||
|
||
/* sleep.S */ | ||
extern void puv3_cpu_suspend(unsigned int); | ||
|
||
extern void puv3_cpu_resume(void); | ||
|
||
extern int puv3_pm_enter(suspend_state_t state); | ||
|
||
/* Defined in hibernate_asm.S */ | ||
extern int restore_image(pgd_t *resume_pg_dir, struct pbe *restore_pblist); | ||
|
||
/* References to section boundaries */ | ||
extern const void __nosave_begin, __nosave_end; | ||
|
||
extern struct pbe *restore_pblist; | ||
#endif |
Oops, something went wrong.