hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/clk/samsung/clk-s5pv210.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
34 * Author: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
45 *
56 * Based on clock drivers for S3C64xx and Exynos4 SoCs.
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 * Common Clock Framework support for all S5PC110/S5PV210 SoCs.
129 */
....@@ -14,7 +11,6 @@
1411 #include <linux/clk-provider.h>
1512 #include <linux/of.h>
1613 #include <linux/of_address.h>
17
-#include <linux/syscore_ops.h>
1814
1915 #include "clk.h"
2016 #include "clk-pll.h"
....@@ -83,9 +79,6 @@
8379
8480 static void __iomem *reg_base;
8581
86
-#ifdef CONFIG_PM_SLEEP
87
-static struct samsung_clk_reg_dump *s5pv210_clk_dump;
88
-
8982 /* List of registers that need to be preserved across suspend/resume. */
9083 static unsigned long s5pv210_clk_regs[] __initdata = {
9184 CLK_SRC0,
....@@ -131,40 +124,6 @@
131124 VPLL_CON,
132125 CLK_OUT,
133126 };
134
-
135
-static int s5pv210_clk_suspend(void)
136
-{
137
- samsung_clk_save(reg_base, s5pv210_clk_dump,
138
- ARRAY_SIZE(s5pv210_clk_regs));
139
- return 0;
140
-}
141
-
142
-static void s5pv210_clk_resume(void)
143
-{
144
- samsung_clk_restore(reg_base, s5pv210_clk_dump,
145
- ARRAY_SIZE(s5pv210_clk_regs));
146
-}
147
-
148
-static struct syscore_ops s5pv210_clk_syscore_ops = {
149
- .suspend = s5pv210_clk_suspend,
150
- .resume = s5pv210_clk_resume,
151
-};
152
-
153
-static void s5pv210_clk_sleep_init(void)
154
-{
155
- s5pv210_clk_dump =
156
- samsung_clk_alloc_reg_dump(s5pv210_clk_regs,
157
- ARRAY_SIZE(s5pv210_clk_regs));
158
- if (!s5pv210_clk_dump) {
159
- pr_warn("%s: Failed to allocate sleep save data\n", __func__);
160
- return;
161
- }
162
-
163
- register_syscore_ops(&s5pv210_clk_syscore_ops);
164
-}
165
-#else
166
-static inline void s5pv210_clk_sleep_init(void) { }
167
-#endif
168127
169128 /* Mux parent lists. */
170129 static const char *const fin_pll_p[] __initconst = {
....@@ -822,7 +781,8 @@
822781 samsung_clk_register_alias(ctx, s5pv210_aliases,
823782 ARRAY_SIZE(s5pv210_aliases));
824783
825
- s5pv210_clk_sleep_init();
784
+ samsung_clk_sleep_init(reg_base, s5pv210_clk_regs,
785
+ ARRAY_SIZE(s5pv210_clk_regs));
826786
827787 samsung_clk_of_add_provider(np, ctx);
828788