From: Beleswar Padhi Date: Tue, 13 May 2025 05:44:40 +0000 (+0530) Subject: remoteproc: k3-r5: Re-order k3_r5_release_tsp() function X-Git-Tag: v6.16-rc1~83^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11d35a94d5914c31169dc0655a2de6df705ab6f4;p=thirdparty%2Flinux.git remoteproc: k3-r5: Re-order k3_r5_release_tsp() function 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 Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-7-b-padhi@ti.com Signed-off-by: Mathieu Poirier --- diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 062a654cac0f0..8e2d9fa446662 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -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;