pm.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * 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.
 *
 */

10 11
#include <linux/suspend.h>

12
struct pxa_cpu_pm_fns {
13
	int	save_count;
14 15 16 17
	void	(*save)(unsigned long *);
	void	(*restore)(unsigned long *);
	int	(*valid)(suspend_state_t state);
	void	(*enter)(suspend_state_t state);
18 19
	int	(*prepare)(void);
	void	(*finish)(void);
20 21 22 23
};

extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;

24 25 26 27 28
/* sleep.S */
extern void pxa25x_cpu_suspend(unsigned int);
extern void pxa27x_cpu_suspend(unsigned int);
extern void pxa_cpu_resume(void);

29
extern int pxa_pm_enter(suspend_state_t state);
30 31
extern int pxa_pm_prepare(void);
extern void pxa_pm_finish(void);
32 33 34 35 36 37 38 39 40 41

/* 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