2019-06-04 16:11:33 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2005-11-06 23:03:23 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2005 Richard Purdie
|
|
|
|
*/
|
|
|
|
|
2007-10-18 18:04:39 +08:00
|
|
|
#include <linux/suspend.h>
|
|
|
|
|
2007-07-18 18:38:45 +08:00
|
|
|
struct pxa_cpu_pm_fns {
|
2008-05-03 04:17:06 +08:00
|
|
|
int save_count;
|
2007-07-18 18:38:45 +08:00
|
|
|
void (*save)(unsigned long *);
|
|
|
|
void (*restore)(unsigned long *);
|
|
|
|
int (*valid)(suspend_state_t state);
|
|
|
|
void (*enter)(suspend_state_t state);
|
2008-08-27 19:55:04 +08:00
|
|
|
int (*prepare)(void);
|
|
|
|
void (*finish)(void);
|
2007-07-18 18:38:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
|
|
|
|
|
2007-07-18 18:40:13 +08:00
|
|
|
/* sleep.S */
|
2011-07-02 16:54:01 +08:00
|
|
|
extern int pxa25x_finish_suspend(unsigned long);
|
|
|
|
extern int pxa27x_finish_suspend(unsigned long);
|
2007-07-18 18:40:13 +08:00
|
|
|
|
2005-11-06 23:03:23 +08:00
|
|
|
extern int pxa_pm_enter(suspend_state_t state);
|
2009-06-11 23:25:09 +08:00
|
|
|
extern int pxa_pm_prepare(void);
|
|
|
|
extern void pxa_pm_finish(void);
|
2009-01-19 18:43:12 +08:00
|
|
|
|
2016-01-29 22:06:30 +08:00
|
|
|
extern const char pm_enter_standby_start[], pm_enter_standby_end[];
|
|
|
|
extern int pxa3xx_finish_suspend(unsigned long);
|
|
|
|
|
2009-01-19 18:43:12 +08: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
|