[PATCH v10 09/33] remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rproc
From: Beleswar Padhi
Date: Thu Apr 17 2025 - 14:22:27 EST
Add a pointer to the rproc struct within k3_m4_rproc internal struct.
This is done to align the M4 internal rproc data structure with R5
driver which can be factored out at a later stage.
Signed-off-by: Beleswar Padhi <b-padhi@xxxxxx>
---
v10: Changelog:
1. Split [v9 04/26] into [v10 08/33] and [v10 09/33] patches.
Link to v9:
https://lore.kernel.org/all/20250317120622.1746415-5-b-padhi@xxxxxx/
drivers/remoteproc/ti_k3_m4_remoteproc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/remoteproc/ti_k3_m4_remoteproc.c b/drivers/remoteproc/ti_k3_m4_remoteproc.c
index 24c90db58ee3d..d0ee7a8d460d4 100644
--- a/drivers/remoteproc/ti_k3_m4_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_m4_remoteproc.c
@@ -50,6 +50,7 @@ struct k3_m4_rproc_mem_data {
/**
* struct k3_m4_rproc - k3 remote processor driver structure
* @dev: cached device pointer
+ * @rproc: remoteproc device handle
* @mem: internal memory regions data
* @num_mems: number of internal memory regions
* @rmem: reserved memory regions data
@@ -64,6 +65,7 @@ struct k3_m4_rproc_mem_data {
*/
struct k3_m4_rproc {
struct device *dev;
+ struct rproc *rproc;
struct k3_m4_rproc_mem *mem;
int num_mems;
struct k3_m4_rproc_mem *rmem;
@@ -580,6 +582,7 @@ static int k3_m4_rproc_probe(struct platform_device *pdev)
rproc->recovery_disabled = true;
kproc = rproc->priv;
kproc->dev = dev;
+ kproc->rproc = rproc;
platform_set_drvdata(pdev, rproc);
kproc->ti_sci = devm_ti_sci_get_by_phandle(dev, "ti,sci");
--
2.34.1