hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/soc/tegra/bpmp.h
....@@ -1,14 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms and conditions of the GNU General Public License,
6
- * version 2, as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope it will be useful, but WITHOUT
9
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
- * more details.
124 */
135
146 #ifndef __SOC_TEGRA_BPMP_H
....@@ -23,6 +15,7 @@
2315 #include <soc/tegra/bpmp-abi.h>
2416
2517 struct tegra_bpmp_clk;
18
+struct tegra_bpmp_ops;
2619
2720 struct tegra_bpmp_soc {
2821 struct {
....@@ -32,6 +25,8 @@
3225 unsigned int timeout;
3326 } cpu_tx, thread, cpu_rx;
3427 } channels;
28
+
29
+ const struct tegra_bpmp_ops *ops;
3530 unsigned int num_resets;
3631 };
3732
....@@ -47,6 +42,7 @@
4742 struct tegra_bpmp_mb_data *ob;
4843 struct completion completion;
4944 struct tegra_ivc *ivc;
45
+ unsigned int index;
5046 };
5147
5248 typedef void (*tegra_bpmp_mrq_handler_t)(unsigned int mrq,
....@@ -63,12 +59,7 @@
6359 struct tegra_bpmp {
6460 const struct tegra_bpmp_soc *soc;
6561 struct device *dev;
66
-
67
- struct {
68
- struct gen_pool *pool;
69
- dma_addr_t phys;
70
- void *virt;
71
- } tx, rx;
62
+ void *priv;
7263
7364 struct {
7465 struct mbox_client client;
....@@ -129,6 +120,7 @@
129120 tegra_bpmp_mrq_handler_t handler, void *data);
130121 void tegra_bpmp_free_mrq(struct tegra_bpmp *bpmp, unsigned int mrq,
131122 void *data);
123
+bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp, unsigned int mrq);
132124 #else
133125 static inline struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
134126 {
....@@ -164,8 +156,16 @@
164156 unsigned int mrq, void *data)
165157 {
166158 }
159
+
160
+static inline bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp,
161
+ unsigned int mrq)
162
+{
163
+ return false;
164
+}
167165 #endif
168166
167
+void tegra_bpmp_handle_rx(struct tegra_bpmp *bpmp);
168
+
169169 #if IS_ENABLED(CONFIG_CLK_TEGRA_BPMP)
170170 int tegra_bpmp_init_clocks(struct tegra_bpmp *bpmp);
171171 #else