File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -308,5 +308,15 @@ EXPORT_SYMBOL_GPL(k3_rproc_stop);
308308int k3_rproc_attach (struct rproc * rproc ) { return 0 ; }
309309EXPORT_SYMBOL_GPL (k3_rproc_attach );
310310
311+ /*
312+ * Detach from a running remote processor (IPC-only mode)
313+ *
314+ * The rproc detach callback is a NOP. The remote processor is not stopped and
315+ * will be left in booted state in IPC-only mode. This callback is invoked only
316+ * in IPC-only mode and exists for sanity sake
317+ */
318+ int k3_rproc_detach (struct rproc * rproc ) { return 0 ; }
319+ EXPORT_SYMBOL_GPL (k3_rproc_detach );
320+
311321MODULE_LICENSE ("GPL" );
312322MODULE_DESCRIPTION ("TI K3 common Remoteproc code" );
Original file line number Diff line number Diff line change @@ -103,4 +103,5 @@ int k3_rproc_unprepare(struct rproc *rproc);
103103int k3_rproc_start (struct rproc * rproc );
104104int k3_rproc_stop (struct rproc * rproc );
105105int k3_rproc_attach (struct rproc * rproc );
106+ int k3_rproc_detach (struct rproc * rproc );
106107#endif /* REMOTEPROC_TI_K3_COMMON_H */
Original file line number Diff line number Diff line change @@ -58,15 +58,6 @@ static int k3_dsp_rproc_start(struct rproc *rproc)
5858 return 0 ;
5959}
6060
61- /*
62- * Detach from a running DSP remote processor (IPC-only mode)
63- *
64- * This rproc detach callback is a NOP. The DSP core is not stopped and will be
65- * left to continue to run its booted firmware. This callback is invoked only in
66- * IPC-only mode and exists for sanity sake.
67- */
68- static int k3_dsp_rproc_detach (struct rproc * rproc ) { return 0 ; }
69-
7061/*
7162 * This function implements the .get_loaded_rsc_table() callback and is used
7263 * to provide the resource table for a booted DSP in IPC-only mode. The K3 DSP
@@ -162,7 +153,7 @@ static const struct rproc_ops k3_dsp_rproc_ops = {
162153 .start = k3_dsp_rproc_start ,
163154 .stop = k3_rproc_stop ,
164155 .attach = k3_rproc_attach ,
165- .detach = k3_dsp_rproc_detach ,
156+ .detach = k3_rproc_detach ,
166157 .kick = k3_rproc_kick ,
167158 .da_to_va = k3_dsp_rproc_da_to_va ,
168159 .get_loaded_rsc_table = k3_dsp_get_loaded_rsc_table ,
Original file line number Diff line number Diff line change @@ -244,25 +244,13 @@ static void k3_m4_release_tsp(void *data)
244244 ti_sci_proc_release (tsp );
245245}
246246
247- /*
248- * Detach from a running M4 remote processor (IPC-only mode)
249- *
250- * This rproc detach callback performs the opposite operation to attach
251- * callback, the M4 core is not stopped and will be left to continue to
252- * run its booted firmware. This callback is invoked only in IPC-only mode.
253- */
254- static int k3_m4_rproc_detach (struct rproc * rproc )
255- {
256- return 0 ;
257- }
258-
259247static const struct rproc_ops k3_m4_rproc_ops = {
260248 .prepare = k3_rproc_prepare ,
261249 .unprepare = k3_rproc_unprepare ,
262250 .start = k3_rproc_start ,
263251 .stop = k3_rproc_stop ,
264252 .attach = k3_rproc_attach ,
265- .detach = k3_m4_rproc_detach ,
253+ .detach = k3_rproc_detach ,
266254 .kick = k3_rproc_kick ,
267255 .da_to_va = k3_m4_rproc_da_to_va ,
268256 .get_loaded_rsc_table = k3_m4_get_loaded_rsc_table ,
Original file line number Diff line number Diff line change @@ -559,15 +559,6 @@ static int k3_r5_rproc_stop(struct rproc *rproc)
559559 return ret ;
560560}
561561
562- /*
563- * Detach from a running R5F remote processor (IPC-only mode)
564- *
565- * The R5F detach callback is a NOP. The R5F cores are not stopped and will be
566- * left in booted state in IPC-only mode. This callback is invoked only in
567- * IPC-only mode and exists for sanity sake.
568- */
569- static int k3_r5_rproc_detach (struct rproc * rproc ) { return 0 ; }
570-
571562/*
572563 * This function implements the .get_loaded_rsc_table() callback and is used
573564 * to provide the resource table for the booted R5F in IPC-only mode. The K3 R5F
@@ -1049,7 +1040,7 @@ static int k3_r5_rproc_configure_mode(struct k3_rproc *kproc)
10491040 kproc -> rproc -> ops -> start = NULL ;
10501041 kproc -> rproc -> ops -> stop = NULL ;
10511042 kproc -> rproc -> ops -> attach = k3_rproc_attach ;
1052- kproc -> rproc -> ops -> detach = k3_r5_rproc_detach ;
1043+ kproc -> rproc -> ops -> detach = k3_rproc_detach ;
10531044 kproc -> rproc -> ops -> get_loaded_rsc_table =
10541045 k3_r5_get_loaded_rsc_table ;
10551046 } else if (!c_state ) {
You can’t perform that action at this time.
0 commit comments