Krzysztof Kozlowski | 4490e3c | 2017-12-25 20:54:35 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Tomasz Figa | 72551f6 | 2014-03-18 07:28:09 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Samsung Electronics Co., Ltd. |
| 4 | * Tomasz Figa <t.figa@samsung.com> |
| 5 | * Copyright (c) 2004 Simtec Electronics |
| 6 | * http://armlinux.simtec.co.uk/ |
| 7 | * Written by Ben Dooks, <ben@simtec.co.uk> |
Krzysztof Kozlowski | 4490e3c | 2017-12-25 20:54:35 +0100 | [diff] [blame] | 8 | */ |
Tomasz Figa | 72551f6 | 2014-03-18 07:28:09 +0900 | [diff] [blame] | 9 | |
| 10 | #ifndef __PLAT_SAMSUNG_PM_COMMON_H |
| 11 | #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__ |
| 12 | |
Tomasz Figa | b278991 | 2014-03-18 07:28:10 +0900 | [diff] [blame] | 13 | #include <linux/irq.h> |
Arnd Bergmann | 17132da | 2020-08-06 20:20:33 +0200 | [diff] [blame^] | 14 | #include <linux/soc/samsung/s3c-pm.h> |
Tomasz Figa | b278991 | 2014-03-18 07:28:10 +0900 | [diff] [blame] | 15 | |
| 16 | /* sleep save info */ |
| 17 | |
| 18 | /** |
| 19 | * struct sleep_save - save information for shared peripherals. |
| 20 | * @reg: Pointer to the register to save. |
| 21 | * @val: Holder for the value saved from reg. |
| 22 | * |
| 23 | * This describes a list of registers which is used by the pm core and |
| 24 | * other subsystem to save and restore register values over suspend. |
| 25 | */ |
| 26 | struct sleep_save { |
| 27 | void __iomem *reg; |
| 28 | unsigned long val; |
| 29 | }; |
| 30 | |
| 31 | #define SAVE_ITEM(x) \ |
| 32 | { .reg = (x) } |
| 33 | |
| 34 | /* helper functions to save/restore lists of registers. */ |
| 35 | |
| 36 | extern void s3c_pm_do_save(struct sleep_save *ptr, int count); |
| 37 | extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count); |
| 38 | extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count); |
| 39 | |
Tomasz Figa | 72551f6 | 2014-03-18 07:28:09 +0900 | [diff] [blame] | 40 | #endif |