Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2013 Samsung Electronics Co., Ltd.
0004  *  Tomasz Figa <t.figa@samsung.com>
0005  * Copyright (c) 2004 Simtec Electronics
0006  *  http://armlinux.simtec.co.uk/
0007  *  Written by Ben Dooks, <ben@simtec.co.uk>
0008  */
0009 
0010 #ifndef __PLAT_SAMSUNG_PM_COMMON_H
0011 #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__
0012 
0013 #include <linux/irq.h>
0014 #include <linux/soc/samsung/s3c-pm.h>
0015 
0016 /* sleep save info */
0017 
0018 /**
0019  * struct sleep_save - save information for shared peripherals.
0020  * @reg: Pointer to the register to save.
0021  * @val: Holder for the value saved from reg.
0022  *
0023  * This describes a list of registers which is used by the pm core and
0024  * other subsystem to save and restore register values over suspend.
0025  */
0026 struct sleep_save {
0027     void __iomem    *reg;
0028     unsigned long   val;
0029 };
0030 
0031 #define SAVE_ITEM(x) \
0032     { .reg = (x) }
0033 
0034 /* helper functions to save/restore lists of registers. */
0035 
0036 extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
0037 extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
0038 extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
0039 
0040 #endif