hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/clk/qcom/gdsc.h
....@@ -1,14 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
2
- * Copyright (c) 2015, 2017-2018, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
3
+ * Copyright (c) 2015, 2017-2018, 2022, The Linux Foundation. All rights reserved.
124 */
135
146 #ifndef __QCOM_GDSC_H__
....@@ -18,6 +10,7 @@
1810 #include <linux/pm_domain.h>
1911
2012 struct regmap;
13
+struct regulator;
2114 struct reset_controller_dev;
2215
2316 /**
....@@ -29,6 +22,9 @@
2922 * @cxcs: offsets of branch registers to toggle mem/periph bits in
3023 * @cxc_count: number of @cxcs
3124 * @pwrsts: Possible powerdomain power states
25
+ * @en_rest_wait_val: transition delay value for receiving enr ack signal
26
+ * @en_few_wait_val: transition delay value for receiving enf ack signal
27
+ * @clk_dis_wait_val: transition delay value for halting clock
3228 * @resets: ids of resets associated with this gdsc
3329 * @reset_count: number of @resets
3430 * @rcdev: reset controller
....@@ -42,6 +38,9 @@
4238 unsigned int clamp_io_ctrl;
4339 unsigned int *cxcs;
4440 unsigned int cxc_count;
41
+ unsigned int en_rest_wait_val;
42
+ unsigned int en_few_wait_val;
43
+ unsigned int clk_dis_wait_val;
4544 const u8 pwrsts;
4645 /* Powerdomain allowable state bitfields */
4746 #define PWRSTS_OFF BIT(0)
....@@ -49,7 +48,7 @@
4948 #define PWRSTS_ON BIT(2)
5049 #define PWRSTS_OFF_ON (PWRSTS_OFF | PWRSTS_ON)
5150 #define PWRSTS_RET_ON (PWRSTS_RET | PWRSTS_ON)
52
- const u8 flags;
51
+ const u16 flags;
5352 #define VOTABLE BIT(0)
5453 #define CLAMP_IO BIT(1)
5554 #define HW_CTRL BIT(2)
....@@ -57,9 +56,14 @@
5756 #define AON_RESET BIT(4)
5857 #define POLL_CFG_GDSCR BIT(5)
5958 #define ALWAYS_ON BIT(6)
59
+#define RETAIN_FF_ENABLE BIT(7)
60
+#define NO_RET_PERIPH BIT(8)
6061 struct reset_controller_dev *rcdev;
6162 unsigned int *resets;
6263 unsigned int reset_count;
64
+
65
+ const char *supply;
66
+ struct regulator *rsupply;
6367 };
6468
6569 struct gdsc_desc {
....@@ -72,6 +76,7 @@
7276 int gdsc_register(struct gdsc_desc *desc, struct reset_controller_dev *,
7377 struct regmap *);
7478 void gdsc_unregister(struct gdsc_desc *desc);
79
+int gdsc_gx_do_nothing_enable(struct generic_pm_domain *domain);
7580 #else
7681 static inline int gdsc_register(struct gdsc_desc *desc,
7782 struct reset_controller_dev *rcdev,