]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
remoteproc: k3-r5: Re-order k3_r5_release_tsp() function
authorBeleswar Padhi <b-padhi@ti.com>
Tue, 13 May 2025 05:44:40 +0000 (11:14 +0530)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 20 May 2025 17:19:10 +0000 (11:19 -0600)
The TI-SCI processor control handle, 'tsp', will be refactored from
k3_r5_core struct into k3_r5_rproc struct in a future commit. So, the
'tsp' pointer will be initialized inside k3_r5_cluster_rproc_init() now.

Move the k3_r5_release_tsp() function, which releases the tsp handle,
above k3_r5_cluster_rproc_init(), so that the later can register the
former as a devm action.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Tested-by: Judith Mendez <jm@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250513054510.3439842-7-b-padhi@ti.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/ti_k3_r5_remoteproc.c

index 062a654cac0f00515514e791a9a37c99614ff712..8e2d9fa44666270343788317eaa745f3217ad7b2 100644 (file)
@@ -1356,6 +1356,13 @@ static int k3_r5_core_of_get_sram_memories(struct platform_device *pdev,
        return 0;
 }
 
+static void k3_r5_release_tsp(void *data)
+{
+       struct ti_sci_proc *tsp = data;
+
+       ti_sci_proc_release(tsp);
+}
+
 static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
 {
        struct k3_r5_cluster *cluster = platform_get_drvdata(pdev);
@@ -1495,13 +1502,6 @@ static void k3_r5_cluster_rproc_exit(void *data)
        }
 }
 
-static void k3_r5_release_tsp(void *data)
-{
-       struct ti_sci_proc *tsp = data;
-
-       ti_sci_proc_release(tsp);
-}
-
 static int k3_r5_core_of_init(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;