[RFC PATCH] remoteproc: core: Do not process carveout and devmem rsc in attach mode

2025-07-24 Thread Beleswar Padhi
pings lists respectively. Signed-off-by: Beleswar Padhi --- Testing: 1. Tested IPC with remoteprocs in attach mode in TI platforms. [However, TI K3 platforms do not use resource table for carveouts, all the memory regions are reserved statically in Device Tree.] drivers/remoteproc/remoteproc_

[PATCH v12 30/36] remoteproc: k3: Refactor .detach rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith

[PATCH v12 20/36] remoteproc: k3: Refactor rproc_release() implementation into common driver

2025-05-12 Thread Beleswar Padhi
: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-20-b-pa...@ti.com/ v11: Changelog: 1. Split [v10 17/33] into [v11 18/35] and [v11 19/35]. 2. Carried T/B tag. Link to v10

[PATCH v12 21/36] remoteproc: k3-m4: Ping the mbox while acquiring the channel

2025-05-12 Thread Beleswar Padhi
is done to align the rproc_request_mbox() implementation with R5 and DSP drivers which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104

[PATCH v12 18/36] remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets

2025-05-12 Thread Beleswar Padhi
The k3_dsp_rproc_release() function erroneously deasserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly deassert only the global reset for devices that do not have a local reset. Signed-off-by: Beleswar Padhi

[PATCH v12 36/36] remoteproc: k3: Refactor release_tsp() functions into common driver

2025-05-12 Thread Beleswar Padhi
in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-36-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10: https

[PATCH v12 32/36] remoteproc: k3: Refactor .da_to_va rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
DDR and internal memory regions in R5, DSP and M4 drivers. Note: The R5 SRAM memory translations are still handled in the .da_to_va ops of the R5 remoteproc driver. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Added R/B tag. Link to v11

[PATCH v12 29/36] remoteproc: k3: Refactor .attach rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
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 register this common function as .attach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez

[PATCH v12 34/36] remoteproc: k3: Refactor mem_release() functions into common driver

2025-05-12 Thread Beleswar Padhi
. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-34-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all

[PATCH v12 33/36] remoteproc: k3: Refactor of_get_memories() functions into common driver

2025-05-12 Thread Beleswar Padhi
#x27; DT property in k3_r5_core_of_get_internal_memories(). Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Assign data->num_mems to num_mems. [Mathieu] 2. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-33-b-pa...@ti.com/ v11: Change

[PATCH v12 35/36] remoteproc: k3: Refactor reserved_mem_init() functions into common driver

2025-05-12 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-35-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all

[PATCH v12 31/36] remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driver

2025-05-12 Thread Beleswar Padhi
k3_get_loaded_rsc_table() and register this common function as .get_loaded_rsc_table ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-31-b-pa

[PATCH v12 27/36] remoteproc: k3: Refactor .start rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
this common function when releasing the reset on the remote processor. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-27-b-pa...@ti.com/ v11: Changelog: 1

[PATCH v12 28/36] remoteproc: k3: Refactor .stop rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
The .stop rproc ops implementations in TI K3 DSP and M4 remoteproc drivers put the remote processor into reset. Refactor the implementations into ti_k3_common.c driver as k3_rproc_stop() and register this common function as .stop ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by

[PATCH v12 26/36] remoteproc: k3: Refactor .unprepare rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Updated the check in k3_rproc_unprepare() to look for RPROC_DETACHED. 2. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-26-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B

[PATCH v12 25/36] remoteproc: k3: Refactor .prepare rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
as .prepare ops in the DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-25-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10

[PATCH v12 24/36] remoteproc: k3-dsp: Assert local reset during .prepare callback

2025-05-12 Thread Beleswar Padhi
it ensures local reset is asserted for subsequent core start operations from sysfs. This is done to align the .prepare callback of DSP with the M4 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12

[PATCH v12 22/36] remoteproc: k3: Refactor rproc_request_mbox() implementations into common driver

2025-05-12 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-22-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all

[PATCH v12 23/36] remoteproc: k3-dsp: Don't override rproc ops in IPC-only mode

2025-05-12 Thread Beleswar Padhi
-only mode or in remoteproc mode but not both. This is done to align the rproc ops implementations of DSP driver with M4 driver and can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link

[PATCH v12 17/36] remoteproc: k3: Refactor rproc_reset() implementation into common driver

2025-05-12 Thread Beleswar Padhi
The rproc_reset() implementations in TI K3 DSP and M4 remoteproc drivers assert reset in the same way. 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 Tested

[PATCH v12 19/36] remoteproc: k3-m4: Introduce central function to release rproc from reset

2025-05-12 Thread Beleswar Padhi
release implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-19-b-pa...@ti.com/ v11

[PATCH v12 15/36] remoteproc: k3-dsp: Correct Reset logic for devices without lresets

2025-05-12 Thread Beleswar Padhi
-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-15-b-pa...@ti.com/ v11: Changelog: 1. Don't deassert lreset back if asserting module reset fails. [Andrew] 2. Put if

[PATCH v12 14/36] remoteproc: k3: Refactor .kick rproc ops into common driver

2025-05-12 Thread Beleswar Padhi
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 Acked-by: An

[PATCH v12 16/36] remoteproc: k3-m4: Introduce central function to put rproc into reset

2025-05-12 Thread Beleswar Padhi
, k3_m4_rproc_reset() which handles both type of devices (with and without local resets), and use it throughout the driver to put the remote processor into reset. This is done to align the reset implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith

[PATCH v12 12/36] remoteproc: k3: Refactor shared data structures

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith Mendez

[PATCH v12 11/36] remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory info

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith

[PATCH v12 13/36] remoteproc: k3: Refactor mailbox rx_callback functions into common driver

2025-05-12 Thread Beleswar Padhi
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

[PATCH v12 09/36] remoteproc: k3-{m4/dsp}: Add a void ptr member in rproc internal struct

2025-05-12 Thread Beleswar Padhi
driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-9-b-pa...@ti.com/ v11: Changelog: 1. Carried T/B tag

[PATCH v12 10/36] remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rproc

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1

[PATCH v12 08/36] remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory info

2025-05-12 Thread Beleswar Padhi
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 Reviewed-by

[PATCH v12 07/36] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-05-12 Thread Beleswar Padhi
lly, introduce 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 Tested-by: Judith Mendez Reviewed

[PATCH v12 06/36] remoteproc: k3-r5: Re-order k3_r5_release_tsp() function

2025-05-12 Thread Beleswar Padhi
he 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 --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-6-b-pa...@ti.

[PATCH v12 05/36] remoteproc: k3-r5: Re-order internal memory initialization functions

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to

[PATCH v12 04/36] remoteproc: k3-m4: Don't assert reset in detach routine

2025-05-12 Thread Beleswar Padhi
ly mode; which leads to resetting the rproc in detach routine. Therefore, correct the IPC-only mode detection logic to look for "RPROC_DETACHED" in k3_m4_rproc_unprepare() function. Fixes: ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem") Signed-of

[PATCH v12 03/36] remoteproc: k3-r5: Refactor sequential core power up/down operations

2025-05-12 Thread Beleswar Padhi
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 Tested-by: Judith Mendez Revie

[PATCH v12 00/36] Refactor TI K3 R5, DSP and M4 Remoteproc Drivers

2025-05-12 Thread Beleswar Padhi
v1: https://lore.kernel.org/all/20220110040650.18186-1-hnaga...@ti.com/ Thanks, Beleswar Beleswar Padhi (34): remoteproc: k3-r5: Refactor sequential core power up/down operations remoteproc: k3-m4: Don't assert reset in detach routine remoteproc: k3-r5: Re-order internal memory initiali

[PATCH v12 02/36] remoteproc: k3-dsp: Drop check performed in k3_dsp_rproc_{mbox_callback/kick}

2025-05-12 Thread Beleswar Padhi
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

[PATCH v12 01/36] remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick}

2025-05-12 Thread Beleswar Padhi
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

[PATCH v11 21/35] remoteproc: k3: Refactor rproc_request_mbox() implementations into common driver

2025-04-25 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-20-b-pa...@ti.com/ v10: Changelog: 1. Split [v9 14/26] into [v10 18/33] and [v10 19/33] patches. Link to v9: https

[PATCH v11 25/35] remoteproc: k3: Refactor .unprepare rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-24-b-pa...@ti.com/ v10: Changelog: 1. Don't remove dsp func override. Already done by [v10 20/33] patch. Link to v9: https://lore.kernel.or

[PATCH v11 18/35] remoteproc: k3-m4: Introduce central function to release rproc from reset

2025-04-25 Thread Beleswar Padhi
release implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 0. New patch in this series. 1. Split [v10 17/33] into [v11 18/35] and [v11 19/35]. Link to v10: https://lore.kernel.org/all

[PATCH v11 05/35] remoteproc: k3-r5: Re-order k3_r5_release_tsp() function

2025-04-25 Thread Beleswar Padhi
he 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 --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-6-b-pa...@ti.com/ v10: Changelog:

[PATCH v11 09/35] remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rproc

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10

[PATCH v11 15/35] remoteproc: k3-m4: Introduce central function to put rproc into reset

2025-04-25 Thread Beleswar Padhi
, k3_m4_rproc_reset() which handles both type of devices (with and without local resets), and use it throughout the driver to put the remote processor into reset. This is done to align the reset implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith

[PATCH v11 35/35] remoteproc: k3: Refactor release_tsp() functions into common driver

2025-04-25 Thread Beleswar Padhi
in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-34-b-pa...@ti.com/ v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9

[PATCH v11 34/35] remoteproc: k3: Refactor reserved_mem_init() functions into common driver

2025-04-25 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-33-b-pa...@ti.com/ v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9: https

[PATCH v11 33/35] remoteproc: k3: Refactor mem_release() functions into common driver

2025-04-25 Thread Beleswar Padhi
. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-32-b-pa...@ti.com/ v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9: https://lore.kernel.org

[PATCH v11 32/35] remoteproc: k3: Refactor of_get_memories() functions into common driver

2025-04-25 Thread Beleswar Padhi
#x27; DT property in k3_r5_core_of_get_internal_memories(). Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-31-b-pa...@ti.com/ v10: Changelog: 1. Updated commit message to call out the changes better. Link to v9: htt

[PATCH v11 31/35] remoteproc: k3: Refactor .da_to_va rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
DDR and internal memory regions in R5, DSP and M4 drivers. Note: The R5 SRAM memory translations are still handled in the .da_to_va ops of the R5 remoteproc driver. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org

[PATCH v11 30/35] remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driver

2025-04-25 Thread Beleswar Padhi
k3_get_loaded_rsc_table() and register this common function as .get_loaded_rsc_table ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-29-b-pa...@ti.com/ v10: Changelog: 1

[PATCH v11 29/35] remoteproc: k3: Refactor .detach rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith

[PATCH v11 28/35] remoteproc: k3: Refactor .attach rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
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 register this common function as .attach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11

[PATCH v11 23/35] remoteproc: k3-dsp: Assert local reset during .prepare callback

2025-04-25 Thread Beleswar Padhi
it ensures local reset is asserted for subsequent core start operations from sysfs. This is done to align the .prepare callback of DSP with the M4 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag

[PATCH v11 27/35] remoteproc: k3: Refactor .stop rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
The .stop rproc ops implementations in TI K3 DSP and M4 remoteproc drivers put the remote processor into reset. Refactor the implementations into ti_k3_common.c driver as k3_rproc_stop() and register this common function as .stop ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by

[PATCH v11 26/35] remoteproc: k3: Refactor .start rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
this common function when releasing the reset on the remote processor. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-25-b-pa...@ti.com/ v10: Changelog: 1. Don't remove dsp func ove

[PATCH v11 24/35] remoteproc: k3: Refactor .prepare rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
as .prepare ops in the DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-23-b-pa...@ti.com/ v10: Changelog: 1. Split [v9 15/26] into [v10 21/33] and [v10 22/33

[PATCH v11 22/35] remoteproc: k3-dsp: Don't override rproc ops in IPC-only mode

2025-04-25 Thread Beleswar Padhi
-only mode or in remoteproc mode but not both. This is done to align the rproc ops implementations of DSP driver with M4 driver and can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https

[PATCH v11 20/35] remoteproc: k3-m4: Ping the mbox while acquiring the channel

2025-04-25 Thread Beleswar Padhi
is done to align the rproc_request_mbox() implementation with R5 and DSP drivers which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-19-b-pa...@ti

[PATCH v11 17/35] remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets

2025-04-25 Thread Beleswar Padhi
The k3_dsp_rproc_release() function erroneously deasserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly deassert only the global reset for devices that do not have a local reset. Signed-off-by: Beleswar Padhi

[PATCH v11 19/35] remoteproc: k3: Refactor rproc_release() implementation into common driver

2025-04-25 Thread Beleswar Padhi
: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Split [v10 17/33] into [v11 18/35] and [v11 19/35]. 2. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-18-b-pa...@ti.com/ v10: Changelog: 1. Split [v9 13/26] into [v10 16/33] and [v10 17/33] patches

[PATCH v11 16/35] remoteproc: k3: Refactor rproc_reset() implementation into common driver

2025-04-25 Thread Beleswar Padhi
The rproc_reset() implementations in TI K3 DSP and M4 remoteproc drivers assert reset in the same way. 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 Tested

[PATCH v11 13/35] remoteproc: k3: Refactor .kick rproc ops into common driver

2025-04-25 Thread Beleswar Padhi
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 Acked-by: An

[PATCH v11 14/35] remoteproc: k3-dsp: Correct Reset logic for devices without lresets

2025-04-25 Thread Beleswar Padhi
-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Don't deassert lreset back if asserting module reset fails. [Andrew] 2. Put if-else block for code path with lreset and w/o lreset. [Andrew] 3. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905

[PATCH v11 12/35] remoteproc: k3: Refactor mailbox rx_callback functions into common driver

2025-04-25 Thread Beleswar Padhi
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

[PATCH v11 11/35] remoteproc: k3: Refactor shared data structures

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith Mende

[PATCH v11 10/35] remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory info

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith

[PATCH v11 06/35] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-04-25 Thread Beleswar Padhi
lly, introduce 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 Tested-by: Judith Mendez ---

[PATCH v11 08/35] remoteproc: k3-{m4/dsp}: Add a void ptr member in rproc internal struct

2025-04-25 Thread Beleswar Padhi
driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-9-b-pa...@ti.com/ v10: Changelog: 1. Split [v9 04/26] into [v10 08/33] and [v10 09

[PATCH v11 07/35] remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory info

2025-04-25 Thread Beleswar Padhi
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 Reviewed-by

[PATCH v11 03/35] remoteproc: k3-r5: Refactor sequential core power up/down operations

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith Mendez --- v11

[PATCH v11 02/35] remoteproc: k3-dsp: Drop check performed in k3_dsp_rproc_{mbox_callback/kick}

2025-04-25 Thread Beleswar Padhi
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

[PATCH v11 04/35] remoteproc: k3-r5: Re-order internal memory initialization functions

2025-04-25 Thread Beleswar Padhi
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 Tested-by: Judith Mendez --- v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kern

[PATCH v11 00/35] Refactor TI K3 R5, DSP and M4 Remoteproc Drivers

2025-04-25 Thread Beleswar Padhi
https://lore.kernel.org/all/20230801141117.2559-1-hnaga...@ti.com/ v3: https://lore.kernel.org/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/ Than

[PATCH v11 01/35] remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick}

2025-04-25 Thread Beleswar Padhi
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

[PATCH v10 20/33] remoteproc: k3-dsp: Don't override rproc ops in IPC-only mode

2025-04-18 Thread Beleswar Padhi
-only mode or in remoteproc mode but not both. This is done to align the rproc ops implementations of DSP driver with M4 driver and can be factored out at a later stage. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. New patch. Gets rid of overriding function pointers. Makes further commits

[PATCH v10 16/33] remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets

2025-04-18 Thread Beleswar Padhi
-off-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 13/26] into [v10 16/33] and [v10 17/33] patches. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-14-b-pa...@ti.com/ drivers/remoteproc/ti_k3_dsp_remoteproc.c | 26 +++ 1 file changed, 12 insertions

[PATCH v10 27/33] remoteproc: k3: Refactor .detach rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
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

[PATCH v10 04/33] remoteproc: k3-r5: Re-order internal memory initialization functions

2025-04-17 Thread Beleswar Padhi
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

[PATCH v10 13/33] remoteproc: k3: Refactor .kick rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
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:

[PATCH v10 10/33] remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory info

2025-04-17 Thread Beleswar Padhi
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

[PATCH v10 30/33] remoteproc: k3: Refactor of_get_memories() functions into common driver

2025-04-17 Thread Beleswar Padhi
#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 ++

[PATCH v10 14/33] remoteproc: k3-dsp: Correct Reset logic for devices without lresets

2025-04-17 Thread Beleswar Padhi
-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 12/26] into [v10 14/33] and [v10 15/33] patches. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-13-b-pa...@ti.com/ drivers/remoteproc/ti_k3_dsp_remoteproc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff

[PATCH v10 29/33] remoteproc: k3: Refactor .da_to_va rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
DDR and internal memory regions in R5, DSP and M4 drivers. Note: The R5 SRAM memory translations are still handled in the .da_to_va ops of the R5 remoteproc driver. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Updated commit message to call out the changes better. 2. Don't remove dsp

[PATCH v10 18/33] remoteproc: k3-m4: Ping the mbox while acquiring the channel

2025-04-17 Thread Beleswar Padhi
is done to align the rproc_request_mbox() implementation with R5 and DSP drivers which can be factored out at a later stage. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 14/26] into [v10 18/33] and [v10 19/33] patches. Link to v9: https://lore.kernel.org/all/20250317120622.17464

[PATCH v10 31/33] remoteproc: k3: Refactor mem_release() functions into common driver

2025-04-17 Thread Beleswar Padhi
. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-25-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 8 drivers/remoteproc/ti_k3_common.h

[PATCH v10 25/33] remoteproc: k3: Refactor .stop rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
The .stop rproc ops implementations in TI K3 DSP and M4 remoteproc drivers put the remote processor into reset. Refactor the implementations into ti_k3_common.c driver as k3_rproc_stop() and register this common function as .stop ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi --- v10

[PATCH v10 33/33] remoteproc: k3: Refactor release_tsp() functions into common driver

2025-04-17 Thread Beleswar Padhi
in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-27-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 8 drivers

[PATCH v10 32/33] remoteproc: k3: Refactor reserved_mem_init() functions into common driver

2025-04-17 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Update commit message to call out changes in a better way. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-26-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 70 +++ drivers/remoteproc

[PATCH v10 26/33] remoteproc: k3: Refactor .attach rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
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 register this common function as .attach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Don&#

[PATCH v10 28/33] remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driver

2025-04-17 Thread Beleswar Padhi
k3_get_loaded_rsc_table() and register this common function as .get_loaded_rsc_table ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Don't remove dsp func override. Already done by [v10 20/33] patch. 2. Update commit message to call out changes in a better way. Link

[PATCH v10 24/33] remoteproc: k3: Refactor .start rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
this common function when releasing the reset on the remote processor. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Don't remove dsp func override. Already done by [v10 20/33] patch. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-18-b-pa...@ti.com/ drivers/remot

[PATCH v10 23/33] remoteproc: k3: Refactor .unprepare rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
: Beleswar Padhi --- v10: Changelog: 1. Don't remove dsp func override. Already done by [v10 20/33] patch. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-17-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 30 ++ drivers/remoteproc/ti_k3_com

[PATCH v10 22/33] remoteproc: k3: Refactor .prepare rproc ops into common driver

2025-04-17 Thread Beleswar Padhi
as .prepare ops in the DSP and M4 drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 15/26] into [v10 21/33] and [v10 22/33] patches. 2. Don't remove dsp func override. Already done by [v10 20/33] patch. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-16

[PATCH v10 19/33] remoteproc: k3: Refactor rproc_request_mbox() implementations into common driver

2025-04-17 Thread Beleswar Padhi
drivers. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 14/26] into [v10 18/33] and [v10 19/33] patches. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-15-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 36 ++ drivers/remoteproc

[PATCH v10 21/33] remoteproc: k3-dsp: Assert local reset during .prepare callback

2025-04-17 Thread Beleswar Padhi
it ensures local reset is asserted for subsequent core start operations from sysfs. This is done to align the .prepare callback of DSP with the M4 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi --- v10: Changelog: 1. Split [v9 15/26] into [v10 21/33] and [v10 22

[PATCH v10 17/33] remoteproc: k3: Refactor rproc_release() implementation into common driver

2025-04-17 Thread Beleswar Padhi
: Beleswar Padhi --- v10: Changelog: 1. Split [v9 13/26] into [v10 16/33] and [v10 17/33] patches. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-14-b-pa...@ti.com/ drivers/remoteproc/ti_k3_common.c | 27 ++ drivers/remoteproc/ti_k3_common.h | 1

[PATCH v10 15/33] remoteproc: k3: Refactor rproc_reset() implementation into common driver

2025-04-17 Thread Beleswar Padhi
The rproc_reset() implementations in TI K3 DSP and M4 remoteproc drivers assert reset in the same way. 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 --- v10

[PATCH v10 12/33] remoteproc: k3: Refactor mailbox rx_callback functions into common driver

2025-04-17 Thread Beleswar Padhi
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

[PATCH v10 11/33] remoteproc: k3: Refactor shared data structures

2025-04-17 Thread Beleswar Padhi
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 --- v10: Changelog: Non

[PATCH v10 09/33] remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rproc

2025-04-17 Thread Beleswar Padhi
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 --- v10: Changelog: 1. Split [v9 04/26] into [v10 08/33] and [v10 09/33

  1   2   3   >