hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/soc/fsl/dpio/dpio.c
....@@ -166,6 +166,22 @@
166166 return 0;
167167 }
168168
169
+int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
170
+ u32 cmd_flags,
171
+ u16 token,
172
+ u8 sdest)
173
+{
174
+ struct fsl_mc_command cmd = { 0 };
175
+ struct dpio_stashing_dest *dpio_cmd;
176
+
177
+ cmd.header = mc_encode_cmd_header(DPIO_CMDID_SET_STASHING_DEST,
178
+ cmd_flags, token);
179
+ dpio_cmd = (struct dpio_stashing_dest *)cmd.params;
180
+ dpio_cmd->sdest = sdest;
181
+
182
+ return mc_send_command(mc_io, &cmd);
183
+}
184
+
169185 /**
170186 * dpio_get_api_version - Get Data Path I/O API version
171187 * @mc_io: Pointer to MC portal's DPIO object
....@@ -196,3 +212,26 @@
196212
197213 return 0;
198214 }
215
+
216
+/**
217
+ * dpio_reset() - Reset the DPIO, returns the object to initial state.
218
+ * @mc_io: Pointer to MC portal's I/O object
219
+ * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
220
+ * @token: Token of DPIO object
221
+ *
222
+ * Return: '0' on Success; Error code otherwise.
223
+ */
224
+int dpio_reset(struct fsl_mc_io *mc_io,
225
+ u32 cmd_flags,
226
+ u16 token)
227
+{
228
+ struct fsl_mc_command cmd = { 0 };
229
+
230
+ /* prepare command */
231
+ cmd.header = mc_encode_cmd_header(DPIO_CMDID_RESET,
232
+ cmd_flags,
233
+ token);
234
+
235
+ /* send command to mc*/
236
+ return mc_send_command(mc_io, &cmd);
237
+}