forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/clk/samsung/clk.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
34 * Copyright (c) 2013 Linaro Ltd.
45 * Author: Thomas Abraham <thomas.ab@samsung.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * Common Clock Framework support for all Samsung platforms
118 */
....@@ -26,7 +23,7 @@
2623 void __iomem *reg_base;
2724 struct device *dev;
2825 spinlock_t lock;
29
- /* clk_data must be the last entry due to variable lenght 'hws' array */
26
+ /* clk_data must be the last entry due to variable length 'hws' array */
3027 struct clk_hw_onecell_data clk_data;
3128 };
3229
....@@ -279,6 +276,8 @@
279276 void __iomem *reg_base;
280277 struct samsung_clk_reg_dump *rdump;
281278 unsigned int rd_num;
279
+ const struct samsung_clk_reg_dump *rsuspend;
280
+ unsigned int rsuspend_num;
282281 };
283282
284283 struct samsung_cmu_info {
....@@ -358,9 +357,21 @@
358357
359358 extern unsigned long _get_rate(const char *clk_name);
360359
361
-extern void samsung_clk_sleep_init(void __iomem *reg_base,
360
+#ifdef CONFIG_PM_SLEEP
361
+extern void samsung_clk_extended_sleep_init(void __iomem *reg_base,
362362 const unsigned long *rdump,
363
- unsigned long nr_rdump);
363
+ unsigned long nr_rdump,
364
+ const struct samsung_clk_reg_dump *rsuspend,
365
+ unsigned long nr_rsuspend);
366
+#else
367
+static inline void samsung_clk_extended_sleep_init(void __iomem *reg_base,
368
+ const unsigned long *rdump,
369
+ unsigned long nr_rdump,
370
+ const struct samsung_clk_reg_dump *rsuspend,
371
+ unsigned long nr_rsuspend) {}
372
+#endif
373
+#define samsung_clk_sleep_init(reg_base, rdump, nr_rdump) \
374
+ samsung_clk_extended_sleep_init(reg_base, rdump, nr_rdump, NULL, 0)
364375
365376 extern void samsung_clk_save(void __iomem *base,
366377 struct samsung_clk_reg_dump *rd,