forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/arm/mach-omap2/pm.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * OMAP2/3 Power Management Routines
34 *
45 * Copyright (C) 2008 Nokia Corporation
56 * Jouni Hogander
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118 #ifndef __ARCH_ARM_MACH_OMAP2_PM_H
129 #define __ARCH_ARM_MACH_OMAP2_PM_H
....@@ -52,11 +49,7 @@
5249 extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
5350 extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
5451
55
-#ifdef CONFIG_PM_DEBUG
5652 extern u32 enable_off_mode;
57
-#else
58
-#define enable_off_mode 0
59
-#endif
6053
6154 #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
6255 extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
....@@ -110,6 +103,11 @@
110103 #define IS_PM44XX_ERRATUM(id) 0
111104 #endif
112105
106
+#define OMAP4_VP_CONFIG_ERROROFFSET 0x00
107
+#define OMAP4_VP_VSTEPMIN_VSTEPMIN 0x01
108
+#define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04
109
+#define OMAP4_VP_VLIMITTO_TIMEOUT_US 200
110
+
113111 #ifdef CONFIG_POWER_AVS_OMAP
114112 extern int omap_devinit_smartreflex(void);
115113 extern void omap_enable_smartreflex_on_init(void);
....@@ -137,6 +135,15 @@
137135 }
138136 #endif
139137
138
+#if IS_ENABLED(CONFIG_MFD_CPCAP)
139
+extern int omap4_cpcap_init(void);
140
+#else
141
+static inline int omap4_cpcap_init(void)
142
+{
143
+ return -EINVAL;
144
+}
145
+#endif
146
+
140147 #ifdef CONFIG_PM
141148 extern void omap_pm_setup_oscillator(u32 tstart, u32 tshut);
142149 extern void omap_pm_get_oscillator(u32 *tstart, u32 *tshut);