1 /* SPDX-License-Identifier: GPL-2.0 */
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>
10 #ifndef __LINUX_SOC_SAMSUNG_S3C_PM_H
11 #define __LINUX_SOC_SAMSUNG_S3C_PM_H __FILE__
13 #include <linux/types.h>
15 /* PM debug functions */
18 * struct pm_uart_save - save block for core UART
19 * @ulcon: Save value for S3C2410_ULCON
20 * @ucon: Save value for S3C2410_UCON
21 * @ufcon: Save value for S3C2410_UFCON
22 * @umcon: Save value for S3C2410_UMCON
23 * @ubrdiv: Save value for S3C2410_UBRDIV
25 * Save block for UART registers to be held over sleep and restored if they
26 * are needed (say by debug).
37 #ifdef CONFIG_SAMSUNG_PM_DEBUG
39 * s3c_pm_dbg() - low level debug function for use in suspend/resume.
40 * @msg: The message to print.
42 * This function is used mainly to debug the resume process before the system
43 * can rely on printk/console output. It uses the low-level debugging output
44 * routine printascii() to do its work.
46 extern void s3c_pm_dbg(const char *msg, ...);
48 #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
50 extern void s3c_pm_save_uarts(bool is_s3c24xx);
51 extern void s3c_pm_restore_uarts(bool is_s3c24xx);
53 #ifdef CONFIG_ARCH_S3C64XX
54 extern void s3c_pm_arch_update_uart(void __iomem *regs,
55 struct pm_uart_save *save);
58 s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
64 #define S3C_PMDBG(fmt...) pr_debug(fmt)
66 static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
67 static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
70 /* suspend memory checking */
72 #ifdef CONFIG_SAMSUNG_PM_CHECK
73 extern void s3c_pm_check_prepare(void);
74 extern void s3c_pm_check_restore(void);
75 extern void s3c_pm_check_cleanup(void);
76 extern void s3c_pm_check_store(void);
78 #define s3c_pm_check_prepare() do { } while (0)
79 #define s3c_pm_check_restore() do { } while (0)
80 #define s3c_pm_check_cleanup() do { } while (0)
81 #define s3c_pm_check_store() do { } while (0)
84 /* system device subsystems */
86 extern struct bus_type s3c2410_subsys;
87 extern struct bus_type s3c2410a_subsys;
88 extern struct bus_type s3c2412_subsys;
89 extern struct bus_type s3c2416_subsys;
90 extern struct bus_type s3c2440_subsys;
91 extern struct bus_type s3c2442_subsys;
92 extern struct bus_type s3c2443_subsys;