18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2005 Richard Purdie
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include <linux/suspend.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_cistruct pxa_cpu_pm_fns {
98c2ecf20Sopenharmony_ci	int	save_count;
108c2ecf20Sopenharmony_ci	void	(*save)(unsigned long *);
118c2ecf20Sopenharmony_ci	void	(*restore)(unsigned long *);
128c2ecf20Sopenharmony_ci	int	(*valid)(suspend_state_t state);
138c2ecf20Sopenharmony_ci	void	(*enter)(suspend_state_t state);
148c2ecf20Sopenharmony_ci	int	(*prepare)(void);
158c2ecf20Sopenharmony_ci	void	(*finish)(void);
168c2ecf20Sopenharmony_ci};
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciextern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/* sleep.S */
218c2ecf20Sopenharmony_ciextern int pxa25x_finish_suspend(unsigned long);
228c2ecf20Sopenharmony_ciextern int pxa27x_finish_suspend(unsigned long);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciextern int pxa_pm_enter(suspend_state_t state);
258c2ecf20Sopenharmony_ciextern int pxa_pm_prepare(void);
268c2ecf20Sopenharmony_ciextern void pxa_pm_finish(void);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciextern const char pm_enter_standby_start[], pm_enter_standby_end[];
298c2ecf20Sopenharmony_ciextern int pxa3xx_finish_suspend(unsigned long);
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* NOTE: this is for PM debugging on Lubbock,  it's really a big
328c2ecf20Sopenharmony_ci * ugly, but let's keep the crap minimum here, instead of direct
338c2ecf20Sopenharmony_ci * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
348c2ecf20Sopenharmony_ci */
358c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_LUBBOCK
368c2ecf20Sopenharmony_ciextern void lubbock_set_hexled(uint32_t value);
378c2ecf20Sopenharmony_ci#else
388c2ecf20Sopenharmony_ci#define lubbock_set_hexled(x)
398c2ecf20Sopenharmony_ci#endif
40