2005-11-06 15:03:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2005 Richard Purdie
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-10-18 10:04:39 +00:00
|
|
|
#include <linux/suspend.h>
|
|
|
|
|
2007-07-18 10:38:45 +00:00
|
|
|
struct pxa_cpu_pm_fns {
|
2008-05-02 20:17:06 +00:00
|
|
|
int save_count;
|
2007-07-18 10:38:45 +00:00
|
|
|
void (*save)(unsigned long *);
|
|
|
|
void (*restore)(unsigned long *);
|
|
|
|
int (*valid)(suspend_state_t state);
|
|
|
|
void (*enter)(suspend_state_t state);
|
2008-08-27 11:55:04 +00:00
|
|
|
int (*prepare)(void);
|
|
|
|
void (*finish)(void);
|
2007-07-18 10:38:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
|
|
|
|
|
2007-07-18 10:40:13 +00:00
|
|
|
/* sleep.S */
|
2011-02-06 17:41:26 +00:00
|
|
|
extern void pxa25x_cpu_suspend(unsigned int, long);
|
|
|
|
extern void pxa27x_cpu_suspend(unsigned int, long);
|
2007-07-18 10:40:13 +00:00
|
|
|
|
2005-11-06 15:03:23 +00:00
|
|
|
extern int pxa_pm_enter(suspend_state_t state);
|
2009-06-11 15:25:09 +00:00
|
|
|
extern int pxa_pm_prepare(void);
|
|
|
|
extern void pxa_pm_finish(void);
|
2009-01-19 10:43:12 +00:00
|
|
|
|
|
|
|
/* NOTE: this is for PM debugging on Lubbock, it's really a big
|
|
|
|
* ugly, but let's keep the crap minimum here, instead of direct
|
|
|
|
* accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_ARCH_LUBBOCK
|
|
|
|
extern void lubbock_set_hexled(uint32_t value);
|
|
|
|
#else
|
|
|
|
#define lubbock_set_hexled(x)
|
|
|
|
#endif
|