/all/20230906124756.3480579-1-a-nan...@ti.com/
Apurva Nandan (1):
remoteproc: k3-r5: Wait for core0 power-up before powering up core1
Beleswar Padhi (1):
remoteproc: k3-r5: Do not allow core1 to power up before core0 via
sysfs
drivers/remoteproc/ti_k3_r5_remoteproc.c | 51
From: Apurva Nandan
PSC controller has a limitation that it can only power-up the second core
when the first core is in ON state. Power-state for core0 should be equal
to or higher than core1, else the kernel is seen hanging during rproc
loading.
Make the powering up of cores sequential, by wait
shutting down before
core1 has been shut down from sysfs.
Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F
subsystem")
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 23 +--
1 file changed, 21 insertions(+), 2
):
remoteproc: k3-r5: Wait for core0 power-up before powering up core1
Beleswar Padhi (1):
remoteproc: k3-r5: Do not allow core1 to power up before core0 via
sysfs
drivers/remoteproc/ti_k3_r5_remoteproc.c | 56 +++-
1 file changed, 54 insertions(+), 2 deletions
: Add a remoteproc driver for R5F
subsystem")
Signed-off-by: Apurva Nandan
[added comments and fixed code style]
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 33
1 file changed, 33 insertions(+)
diff --git a/drivers/
shutting down before
core1 has been shut down from sysfs.
Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F
subsystem")
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 23 +--
1 file changed, 21 insertions(+), 2
or
handling label to return with required -EPERM error code during the
core stop operation from sysfs.
Fixes: 3c8a9066d584 ("remoteproc: k3-r5: Do not allow core1 to power up before
core0 via sysfs")
Signed-off-by: Beleswar Padhi
---
As stated in the bug-report[0], Smatch comp
ff-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 66
1 file changed, 21 insertions(+), 45 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c
b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 26362a509ae3..157e8fd57665 100644
--- a/dr
ff-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 67 +++
1 file changed, 21 insertions(+), 46 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
index 3555b535b168..88cda609a5eb 100644
--- a/dr
paths. This makes our k3_rproc_attach() &
k3_rproc_detach() functions NOP.
Also, use the devm_rproc_alloc() helper to automatically free created
rprocs incase of a probe defer.
Beleswar Padhi (3):
remoteproc: k3-r5: Use devm_rproc_alloc() helper
remoteproc: k3-r5: Acquire mailbox handle dur
Use the device lifecycle managed allocation function. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 6 ++
1 file changed, 2 insertions(+), 4
Andrew's comments in v1 regarding some cleanup (Using
dev_err_probe, removing unused labels, adding matching mbox_free_channel
call during device removal).
Link to v1:
https://lore.kernel.org/all/20240530090737.655054-1-b-pa...@ti.com/
Beleswar Padhi (3):
remoteproc: k3-r5: Use devm_rproc_
Use the device lifecycle managed allocation function. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 6 ++
1 file changed, 2 insertions(+), 4
ff-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 74 +---
1 file changed, 26 insertions(+), 48 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c
b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 26362a509ae3c..7e02e3472ce25 100644
--- a/dr
ff-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 76 ---
1 file changed, 26 insertions(+), 50 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
index 3555b535b1683..edaa5e91aebe9 100644
--- a/dr
nup (Using
dev_err_probe, removing unused labels, adding matching mbox_free_channel
call during device removal).
Link to v1:
https://lore.kernel.org/all/20240530090737.655054-1-b-pa...@ti.com/
Beleswar Padhi (3):
remoteproc: k3-r5: Use devm_rproc_alloc() helper
remoteproc: k3-r5: Acquire mai
Use the device lifecycle managed allocation function. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 6 ++
1 file changed, 2 insertions(+), 4
Fixes: 1168af40b1ad ("remoteproc: k3-r5: Add support for IPC-only mode for all
R5Fs")
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 78 +---
1 file changed, 30 insertions(+), 48 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5_remotepr
Fixes: b8431920391d ("remoteproc: k3-dsp: Add support for IPC-only mode for all
K3 DSPs")
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 80 +--
1 file changed, 30 insertions(+), 50 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_dsp_remotepr
s in v1 regarding some cleanup (Using
dev_err_probe, removing unused labels, adding matching mbox_free_channel
call during device removal).
Link to v1:
https://lore.kernel.org/all/20240530090737.655054-1-b-pa...@ti.com/
Beleswar Padhi (3):
remoteproc: k3-r5: Use devm_rproc_alloc() helper
remo
Use the device lifecycle managed allocation function. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 16 +---
1 file changed, 5 insertions
ff-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 78 +---
1 file changed, 30 insertions(+), 48 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c
b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 57067308b3c0..8a63a9360c0f 100644
--- a/dr
ff-by: Beleswar Padhi
Acked-by: Andrew Davis
---
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 80 +--
1 file changed, 30 insertions(+), 50 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
index a22d41689a7d..9009367
oted rprocs ]
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c
b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 39a47540c590..f1710a61247f 100644
---
oted rprocs ]
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
* Mathieu
1) Rebased changes on top of -next-20240820 tag.
Link to v1:
https://lore.kernel.org/all/20240809060132.308642-1-b-pa...@ti.com/
drivers/remoteproc/ti_k3_r5_remoteproc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deleti
n firmware booting, while still maintaining
the required power-synchronization between cores.
Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before
powering up core1")
Signed-off-by: Beleswar Padhi
---
Posted this as a Fix as this was breaking usecases where we wante
. Tested that each patch in this series generates no new warnings/errors.
[0]: https://lore.kernel.org/all/Zr4w8Vj0mVo5sBsJ@p14s/
Beleswar Padhi (5):
remoteproc: k3-r5: Add devm action to release reserved memory
remoteproc: k3-r5: Use devm_kcalloc() helper
remoteproc: k3-r5: Add devm action to
Use a device lifecycle managed action to release reserved memory. This
helps prevent mistakes like releasing out of order in cleanup functions
and forgetting to release on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 21 +
1 file
Use a device lifecycle managed action to release tsp ti_sci_proc handle.
This helps prevent mistakes like releasing out of order in cleanup
functions and forgetting to release on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 17 +++--
1
Use a device lifecycle managed action to free memory. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 +---
1 file changed, 1 insertion(+), 3
Use device lifecycle managed devm_rproc_add() helper function. This
helps prevent mistakes like deleting out of order in cleanup functions
and forgetting to delete on all error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 +---
1 file changed, 1
Use a device lifecycle managed ioremap helper function. This helps
prevent mistakes like unmapping out of order in cleanup functions and
forgetting to unmap on all error paths.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 40 +---
1 file
.unprepare ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 30 ++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 26 +--
drivers/remoteproc/ti_k3_m4_remoteproc.c | 31
tached. The callbacks are updated
to return early only if the core is actually detached and not during an
ongoing attach operation in IPC-only mode.
Reported-by: Siddharth Vadapalli
Closes: https://lore.kernel.org/all/20240916083131.2801755-1-s-vadapa...@ti.com/
Fixes: f3f11cfe8907 ("remotepro
tached. The callbacks are updated
to return early only if the core is actually detached and not during an
ongoing attach operation in IPC-only mode.
Reported-by: Siddharth Vadapalli
Closes: https://lore.kernel.org/all/20240916083131.2801755-1-s-vadapa...@ti.com/
Fixes: ea1d6fb5b571 ("remoteproc
they deal with Core Run/Halt
operations, and as such, there is no constraint in Running or Halting
the cores of a cluster in order.
Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before
powering up core1")
Signed-off-by: Beleswar Padhi
---
Link to v2:
https://lore.ker
/
[1]: https://lore.kernel.org/all/20250103101231.1508151-1-b-pa...@ti.com/
[2]:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/linux/wait.h#n289
Beleswar Padhi (3):
remoteproc: k3-r5: Fix checks in k3_r5_rproc_{mbox_callback/kick}
remoteproc: k3-dsp: Fix che
tached. The callbacks are updated
to return early only if the core is actually detached and not during an
ongoing attach operation in IPC-only mode.
Reported-by: Siddharth Vadapalli
Closes: https://lore.kernel.org/all/20240916083131.2801755-1-s-vadapa...@ti.com/
Fixes: f3f11cfe8907 ("re
they deal with Core Run/Halt
operations, and as such, there is no constraint in Running or Halting
the cores of a cluster in order.
Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before
powering up core1")
Signed-off-by: Beleswar Padhi
---
Link to v1:
https://lore.ker
attached. The callbacks are updated
to return early only if the core is actually detached and not during an
ongoing attach operation in IPC-only mode.
Reported-by: Siddharth Vadapalli
Closes: https://lore.kernel.org/all/20240916083131.2801755-1-s-vadapa...@ti.com/
Fixes: ea1d6fb5b571 ("rem
ning, which is expected as it is called out in the implementation
of the macro itself[1].
Thanks,
Beleswar
[0]: https://lore.kernel.org/all/20241219110545.1898883-1-b-pa...@ti.com/
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/linux/wait.h#n289
Bel
r4w8Vj0mVo5sBsJ@p14s/
Beleswar Padhi (5):
remoteproc: k3-r5: Add devm action to release reserved memory
remoteproc: k3-r5: Use devm_kcalloc() helper
remoteproc: k3-r5: Use devm_ioremap_wc() helper
remoteproc: k3-r5: Use devm_rproc_add() helper
remoteproc: k3-r5: Add devm action to r
Use a device lifecycle managed ioremap helper function. This helps
prevent mistakes like unmapping out of order in cleanup functions and
forgetting to unmap on all error paths.
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
1. Re-ordered [PATCH 4/5] from v1 to [PATCH v2 3/5] in v2. [Andrew]
2
Use a device lifecycle managed action to release reserved memory. This
helps prevent mistakes like releasing out of order in cleanup functions
and forgetting to release on error paths.
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
1. None to this patch
Link to v1:
https://lore.kernel.org
Use a device lifecycle managed action to free memory. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting
to free on error paths.
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
1. None to this patch
Link to v1:
https://lore.kernel.org/all
Use device lifecycle managed devm_rproc_add() helper function. This
helps prevent mistakes like deleting out of order in cleanup functions
and forgetting to delete on all error paths.
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
1. Re-ordered [PATCH 5/5] from v1 to [PATCH v2 4/5] in v2
Use a device lifecycle managed action to release tsp ti_sci_proc handle.
This helps prevent mistakes like releasing out of order in cleanup
functions and forgetting to release on error paths.
Signed-off-by: Beleswar Padhi
---
v2: Changelog:
1. Re-ordered [PATCH 3/5] from v1 to [PATCH v2 5/5] in
is detached, and is not undergoing an attach
operation in IPC-only mode.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_m4_remoteproc.c | 41
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_m4_remoteproc.c
b/drivers
1050233-1-b-pa...@ti.com/
Beleswar Padhi (20):
remoteproc: k3-m4: Prevent Mailbox level IPC with detached core
remoteproc: k3: Refactor shared data structures
remoteproc: k3: Refactor mailbox rx_callback functions into common
driver
remoteproc: k3: Refactor .kick rproc ops into common dr
The ti_k3_dsp_remoteproc.c and ti_k3_m4_remoteproc.c drivers share the
same data structure definitions. Refactor the shared data structures
into a new common header file, 'ti_k3_common.h', and update both drivers
to use the unified data structures.
Signed-off-by: Beleswar Padhi
--
n it.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/Makefile | 4 +-
drivers/remoteproc/ti_k3_common.c | 90 +++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 57 +-
drivers/remoteproc/t
, refactor the above function into the ti_k3_common.c driver as
k3_rproc_reset() and use it throughout DSP and M4 drivers for resetting
the remote processor.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 25 +++
drivers/remoteproc/ti_k3_common.h
The .kick rproc ops implementations in ti_k3_dsp_remoteproc.c and
ti_k3_m4_remoteproc.c drivers sends a mailbox message to the remote
processor in the same way. Refactor the implementations into a common
function 'k3_rproc_kick()' in the ti_k3_common.c driver.
Signed-off-by: Bele
.
Further, refactor the above function into the ti_k3_common.c driver as
k3_rproc_release() and use it throughout DSP and M4 drivers for
releasing the reset from the remote processor.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 27
drivers/remoteproc
The ti_k3_m4_remoteproc.c driver previously hardcoded device memory
region addresses and names. Change this to use the k3_rproc_mem_data
structure to store memory information. This aligns with
ti_k3_dsp_remoteproc.c driver, and can be refactored out later.
Signed-off-by: Beleswar Padhi
tach() and align DSP and M4 drivers to register this
common function as .attach ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 20
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remotep
from sysfs. Refactor the k3_m4_rproc_prepare()
function into the ti_k3_common.c driver as k3_rproc_prepare() and align
DSP and M4 drivers to register this common function as .prepare ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 46
his common function as .detach ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 19 +++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 20 +---
drivers/remoteproc/ti_k3_m4_remotepr
k3_get_loaded_rsc_table() and align DSP
and M4 drivers to register this common function as .get_loaded_rsc_table
ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 33 +++
drivers/remoteproc/ti_k3_common.h | 2 +
drivers/remoteproc
this common function when releasing the reset on the remote
processor.
Further, do not override the .start ops with NULL when operating in
IPC-only mode in ti_k3_dsp_remoteproc.c, as .start is never invoked in
rproc_attach routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c
not override the .stop ops with NULL when operating in
IPC-only mode in ti_k3_dsp_remoteproc.c, as .stop is never invoked in
rproc_detach routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 14 ++
drivers/remoteproc/ti_k3_common.h | 1
() function into ti_k3_common.c as
k3_rproc_request_mbox() and align DSP and M4 drivers to use this common
function during probe routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 36 +++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers
common function as .da_to_va ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 61 ++
drivers/remoteproc/ti_k3_common.h | 4 ++
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 63 +--
drivers/remoteproc
The k3_{dsp_/m4_}reserved_mem_init() functions initialize the reserved
memory regions associated with the remote processor. Refactor these
functions into ti_k3_common.c driver as k3_reserved_mem_init() and align
DSP and M4 drivers to use this common function throughout.
Signed-off-by: Beleswar
.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 8
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 +
drivers/remoteproc/ti_k3_m4_remoteproc.c | 9 +
4 files changed, 11 insertions(+), 16
: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 53 ++
drivers/remoteproc/ti_k3_common.h | 2 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 54 +--
drivers/remoteproc/ti_k3_m4_remoteproc.c | 54 +--
4 files changed, 57
-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 8
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 +
drivers/remoteproc/ti_k3_m4_remoteproc.c | 9 +
4 files changed, 11 insertions(+), 16 deletions
common function throughout.
Further, override the bus_addr assignment for TCMs for R5 remote
processors by reading the 'loczrama' DT property in
k3_r5_core_of_get_internal_memories().
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 53 +
.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 8
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 +
drivers/remoteproc/ti_k3_m4_remoteproc.c | 9 +
drivers/remoteproc/ti_k3_r5_remoteproc.c | 9
The ti_k3_m4_remoteproc.c driver previously hardcoded device memory
region addresses and names. Change this to use the k3_rproc_mem_data
structure to store memory information. This aligns with DSP and R5
drivers, and can be refactored out later.
Signed-off-by: Beleswar Padhi
---
drivers
The TI K3 R5, DSP and M4 remoteproc drivers share the same data
structure definitions. Refactor the shared data structures into a new
common header file, 'ti_k3_common.h', and update the drivers to use the
unified data structures.
Signed-off-by: Beleswar Padhi
---
drivers/
The mailbox .rx_callback implementations in TI K3 R5, DSP and M4
remoteproc drivers handle inbound mailbox messages in the same way.
Introduce a common driver 'ti_k3_common.c' and refactor the
implementations into a common function 'k3_rproc_mbox_callback'() in it.
Signed-of
The .kick rproc ops implementations in TI K3 R5, DSP and M4 remoteproc
drivers sends a mailbox message to the remote processor in the same
way. Refactor the implementations into a common function
'k3_rproc_kick()' in the ti_k3_common.c driver.
Signed-off-by: Beleswar Padhi
--
6-1-hnaga...@ti.com/
Thanks,
Beleswar
Beleswar Padhi (24):
remoteproc: k3-r5: Re-order internal memory initialization function
remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4
remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory info
remoteproc: k3-{m4/dsp
nction triggers the probe of the Virtio
RPMsg devices associated with the remote core, which require that the
"k3_dsp_rproc_kick()" and "k3_dsp_rproc_mbox_callback()" callbacks are
functional. Hence, drop the check in the callbacks.
Fixes: ea1d6fb5b571 ("remoteproc: k3-d
nction triggers the probe of the Virtio
RPMsg devices associated with the remote core, which require that the
"k3_r5_rproc_kick()" and "k3_r5_rproc_mbox_callback()" callbacks are
functional. Hence, drop the check in the callbacks.
Fixes: f3f11cfe8907 ("remoteproc: k3-r5: Ac
they deal with Core Run/Halt
operations, and as such, there is no constraint in Running or Halting
the cores of a cluster in order.
Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before
powering up core1")
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/t
, refactor the above function into the ti_k3_common.c driver as
k3_rproc_reset() and use it throughout DSP and M4 drivers for resetting
the remote processor.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 25 +++
drivers/remoteproc/ti_k3_common.h
this common function when releasing the reset on the remote
processor.
Further, do not override the .start ops with NULL when operating in
IPC-only mode in ti_k3_dsp_remoteproc.c, as .start is never invoked in
rproc_attach routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c
from sysfs. Refactor the k3_m4_rproc_prepare()
function into the ti_k3_common.c driver as k3_rproc_prepare() and align
DSP and M4 drivers to register this common function as .prepare ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 46
for address translation.
Additionally, handle R5 SRAM memory translations specifically in the R5
remoteproc driver.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 57
drivers/remoteproc/ti_k3_common.h | 4 ++
drivers/remoteproc
throughout.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 8
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 +
drivers/remoteproc/ti_k3_m4_remoteproc.c | 9 +
drivers/remoteproc
e a void *priv pointer in k3_r5_rproc that can be
typecasted to point to the k3_r5_core structure. This abstraction is
done to ensure common functionalities across R5, DSP and M4 drivers can
be refactored at a later stage.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remotepro
ation function,
k3_r5_core_of_get_internal_memories() above k3_r5_rproc_init() so that
it can be invoked from there.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_r5_remoteproc.c | 158 +++
1 file changed, 79 insertions(+), 79 deletions(-)
diff --git a/dr
within k3_m4_rproc internal struct. This is done to
align the data structures with R5 driver which can be factored out at a
later stage.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 ++
drivers/remoteproc/ti_k3_m4_remoteproc.c | 5 +
2 files changed, 7
() function into ti_k3_common.c as
k3_rproc_request_mbox() and align R5, DSP and M4 drivers to use this
common function during probe routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 36 +++
drivers/remoteproc/ti_k3_common.h | 1
.unprepare ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 30 ++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 26 +--
drivers/remoteproc/ti_k3_m4_remoteproc.c | 31
not override the .stop ops with NULL when operating in
IPC-only mode in ti_k3_dsp_remoteproc.c, as .stop is never invoked in
rproc_detach routine.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 14 ++
drivers/remoteproc/ti_k3_common.h | 1
.
Further, refactor the above function into the ti_k3_common.c driver as
k3_rproc_release() and use it throughout DSP and M4 drivers for
releasing the reset from the remote processor.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 27
drivers/remoteproc
The .attach rproc ops implementations in TI K3 R5, DSP and M4 drivers
are NOPs. Refactor the implementations into ti_k3_common.c driver
as k3_rproc_attach() and align R5, DSP and M4 drivers to register this
common function as .attach ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc
k3_get_loaded_rsc_table() and align R5, DSP and M4 drivers to register
this common function as .get_loaded_rsc_table ops.
Signed-off-by: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 33 +++
drivers/remoteproc/ti_k3_common.h | 2 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c
The .detach rproc ops implementations in TI K3 R5, DSP and M4
remoteproc drivers are NOPs. Refactor the implementations into
ti_k3_common.c driver as k3_rproc_detach() and align R5, DSP and M4
drivers to register this common function as .detach ops.
Signed-off-by: Beleswar Padhi
---
drivers
The ti_k3_r5_remoteproc.c driver previously hardcoded device memory
region addresses and names. Change this to use the k3_r5_rproc_mem_data
structure to store memory information. This aligns with K3 DSP and M4
drivers, and can be refactored out later.
Signed-off-by: Beleswar Padhi
---
drivers
: Beleswar Padhi
---
drivers/remoteproc/ti_k3_common.c | 70 +++
drivers/remoteproc/ti_k3_common.h | 1 +
drivers/remoteproc/ti_k3_dsp_remoteproc.c | 72 +---
drivers/remoteproc/ti_k3_m4_remoteproc.c | 71 +---
drivers/remoteproc
The .kick rproc ops implementations in TI K3 R5, DSP and M4 remoteproc
drivers sends a mailbox message to the remote processor in the same
way. Refactor the implementations into a common function
'k3_rproc_kick()' in the ti_k3_common.c driver.
Signed-off-by: Beleswar Padhi
---
v10:
The .detach rproc ops implementations in TI K3 R5, DSP and M4
remoteproc drivers are NOPs. Refactor the implementations into
ti_k3_common.c driver as k3_rproc_detach() and register this common
function as .detach ops in R5, DSP and M4 drivers.
Signed-off-by: Beleswar Padhi
---
v10: Changelog:
1
invoked by the later.
While at it, also re-order the k3_r5_core_of_get_sram_memories() to keep
all the internal memory initialization functions at one place.
Signed-off-by: Beleswar Padhi
---
v10: Changelog:
1. Re-ordered both core_of_get_{internal/sram}_memories() together.
2. Moved releas
#x27; DT property in k3_r5_core_of_get_internal_memories().
Signed-off-by: Beleswar Padhi
---
v10: Changelog:
1. Updated commit message to call out the changes better.
Link to v9:
https://lore.kernel.org/all/20250317120622.1746415-24-b-pa...@ti.com/
drivers/remoteproc/ti_k3_common.c | 53 ++
The ti_k3_m4_remoteproc.c driver previously hardcoded device memory
region addresses and names. Change this to use the k3_rproc_mem_data
structure to store memory information. This aligns with DSP and R5
drivers, and can be refactored out later.
Signed-off-by: Beleswar Padhi
---
v10: Changelog
all/20230302171450.1598576-1-martyn.we...@collabora.com/
v2:
https://lore.kernel.org/all/2023030323.1532479-4-martyn.we...@collabora.com/
v1: https://lore.kernel.org/all/20220110040650.18186-1-hnaga...@ti.com/
Thanks,
Beleswar
Beleswar Padhi (31):
remoteproc: k3-r5: Refactor sequential c
1 - 100 of 205 matches
Mail list logo