forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/intel/skylake/skl-sst-ipc.h
....@@ -1,16 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Intel SKL IPC Support
34 *
45 * Copyright (C) 2014-15, Intel Corporation.
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 as version 2, as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
146 */
157
168 #ifndef __SKL_IPC_H
....@@ -18,9 +10,9 @@
1810
1911 #include <linux/irqreturn.h>
2012 #include "../common/sst-ipc.h"
13
+#include "skl-sst-dsp.h"
2114
2215 struct sst_dsp;
23
-struct skl_sst;
2416 struct sst_generic_ipc;
2517
2618 enum skl_ipc_pipeline_state {
....@@ -75,54 +67,6 @@
7567 const struct firmware *fw;
7668 };
7769
78
-struct skl_sst {
79
- struct device *dev;
80
- struct sst_dsp *dsp;
81
-
82
- /* boot */
83
- wait_queue_head_t boot_wait;
84
- bool boot_complete;
85
-
86
- /* module load */
87
- wait_queue_head_t mod_load_wait;
88
- bool mod_load_complete;
89
- bool mod_load_status;
90
-
91
- /* IPC messaging */
92
- struct sst_generic_ipc ipc;
93
-
94
- /* callback for miscbdge */
95
- void (*enable_miscbdcge)(struct device *dev, bool enable);
96
- /* Is CGCTL.MISCBDCGE disabled */
97
- bool miscbdcg_disabled;
98
-
99
- /* Populate module information */
100
- struct list_head uuid_list;
101
-
102
- /* Is firmware loaded */
103
- bool fw_loaded;
104
-
105
- /* first boot ? */
106
- bool is_first_boot;
107
-
108
- /* multi-core */
109
- struct skl_dsp_cores cores;
110
-
111
- /* library info */
112
- struct skl_lib_info lib_info[SKL_MAX_LIB];
113
- int lib_count;
114
-
115
- /* Callback to update D0i3C register */
116
- void (*update_d0i3c)(struct device *dev, bool enable);
117
-
118
- struct skl_d0i3_data d0i3;
119
-
120
- const struct skl_dsp_ops *dsp_ops;
121
-
122
- /* Callback to update dynamic clock and power gating registers */
123
- void (*clock_power_gating)(struct device *dev, bool enable);
124
-};
125
-
12670 struct skl_ipc_init_instance_msg {
12771 u32 module_id;
12872 u32 instance_id;
....@@ -163,12 +107,12 @@
163107
164108 irqreturn_t skl_dsp_irq_thread_handler(int irq, void *context);
165109
166
-int skl_ipc_create_pipeline(struct sst_generic_ipc *sst_ipc,
110
+int skl_ipc_create_pipeline(struct sst_generic_ipc *ipc,
167111 u16 ppl_mem_size, u8 ppl_type, u8 instance_id, u8 lp_mode);
168112
169
-int skl_ipc_delete_pipeline(struct sst_generic_ipc *sst_ipc, u8 instance_id);
113
+int skl_ipc_delete_pipeline(struct sst_generic_ipc *ipc, u8 instance_id);
170114
171
-int skl_ipc_set_pipeline_state(struct sst_generic_ipc *sst_ipc,
115
+int skl_ipc_set_pipeline_state(struct sst_generic_ipc *ipc,
172116 u8 instance_id, enum skl_ipc_pipeline_state state);
173117
174118 int skl_ipc_save_pipeline(struct sst_generic_ipc *ipc,
....@@ -176,10 +120,10 @@
176120
177121 int skl_ipc_restore_pipeline(struct sst_generic_ipc *ipc, u8 instance_id);
178122
179
-int skl_ipc_init_instance(struct sst_generic_ipc *sst_ipc,
123
+int skl_ipc_init_instance(struct sst_generic_ipc *ipc,
180124 struct skl_ipc_init_instance_msg *msg, void *param_data);
181125
182
-int skl_ipc_bind_unbind(struct sst_generic_ipc *sst_ipc,
126
+int skl_ipc_bind_unbind(struct sst_generic_ipc *ipc,
183127 struct skl_ipc_bind_unbind_msg *msg);
184128
185129 int skl_ipc_load_modules(struct sst_generic_ipc *ipc,
....@@ -195,7 +139,8 @@
195139 struct skl_ipc_large_config_msg *msg, u32 *param);
196140
197141 int skl_ipc_get_large_config(struct sst_generic_ipc *ipc,
198
- struct skl_ipc_large_config_msg *msg, u32 *param);
142
+ struct skl_ipc_large_config_msg *msg,
143
+ u32 **payload, size_t *bytes);
199144
200145 int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
201146 u8 dma_id, u8 table_id, bool wait);
....@@ -205,14 +150,14 @@
205150
206151 int skl_ipc_check_D0i0(struct sst_dsp *dsp, bool state);
207152
208
-void skl_ipc_int_enable(struct sst_dsp *dsp);
153
+void skl_ipc_int_enable(struct sst_dsp *ctx);
209154 void skl_ipc_op_int_enable(struct sst_dsp *ctx);
210155 void skl_ipc_op_int_disable(struct sst_dsp *ctx);
211
-void skl_ipc_int_disable(struct sst_dsp *dsp);
156
+void skl_ipc_int_disable(struct sst_dsp *ctx);
212157
213
-bool skl_ipc_int_status(struct sst_dsp *dsp);
158
+bool skl_ipc_int_status(struct sst_dsp *ctx);
214159 void skl_ipc_free(struct sst_generic_ipc *ipc);
215
-int skl_ipc_init(struct device *dev, struct skl_sst *skl);
160
+int skl_ipc_init(struct device *dev, struct skl_dev *skl);
216161 void skl_clear_module_cnt(struct sst_dsp *ctx);
217162
218163 void skl_ipc_process_reply(struct sst_generic_ipc *ipc,