]> www.infradead.org Git - users/jedix/linux-maple.git/commit
remoteproc: k3: Refactor of_get_memories() functions into common driver
authorBeleswar Padhi <b-padhi@ti.com>
Tue, 13 May 2025 05:45:07 +0000 (11:15 +0530)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 20 May 2025 17:19:12 +0000 (11:19 -0600)
commitc1724028012999910130165645705cf7df52a7ae
tree8bba6778df790e3563a00b102d309fd5418975bb
parent9179f8bfa98d1b0a30f4d75f4d695e7b4a3c9847
remoteproc: k3: Refactor of_get_memories() functions into common driver

The of_get_memories() implementations in the TI K3 R5, DSP and M4
remoteproc drivers initialize and assign memory regions used by the
remote processor in the same way. Refactor these implementations into
ti_k3_common.c driver as k3_rproc_of_get_memories() use this common
function for mem initialization in R5, DSP and M4 drivers.

Note: The TCM addresses for R5 core are configurable based on the
'loczrama' setting. Therefore, override the bus_addr assignment done by
the common function for TCMs of R5 remote processors by reading the
'loczrama' DT property in k3_r5_core_of_get_internal_memories().

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-34-b-padhi@ti.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/ti_k3_common.c
drivers/remoteproc/ti_k3_common.h
drivers/remoteproc/ti_k3_dsp_remoteproc.c
drivers/remoteproc/ti_k3_m4_remoteproc.c
drivers/remoteproc/ti_k3_r5_remoteproc.c