[PATCH v2 4/4] hwspinlock: omap: Use index to get hwspinlock pointer

2024-02-08 Thread Andrew Davis
For loops with multiple initializers and increments are hard to read and reason about, simplify this by using the looping index to index into the hwspinlock array. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH v2 1/4] hwspinlock: omap: Remove unneeded check for OF node

2024-02-08 Thread Andrew Davis
We do not use the OF node anymore, nor does it matter how we got to probe, so remove the check for of_node. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock

[PATCH v2 2/4] hwspinlock: omap: Use devm_pm_runtime_enable() helper

2024-02-08 Thread Andrew Davis
now return right after registering our hwspinlock, simply return directly and remove the extra debug message. Signed-off-by: Andrew Davis --- Changes for v2: - Return directly from register as suggested on v1 - Clarify commit message drivers/hwspinlock/omap_hwspinlock.c | 33

[PATCH v2 3/4] hwspinlock: omap: Use devm_hwspin_lock_register() helper

2024-02-08 Thread Andrew Davis
This will unregister the HW spinlock on module exit automatically for us, currently we manually unregister which can be error-prone if not done in the right order. This also allows us to remove the remove callback. Do that here. Signed-off-by: Andrew Davis --- Changes for v2: - Clarify commit

Re: [PATCH 2/4] hwspinlock: omap: Use devm_pm_runtime_enable() helper

2024-02-06 Thread Andrew Davis
On 2/6/24 1:06 PM, Bjorn Andersson wrote: On Tue, Jan 23, 2024 at 10:04:03AM -0600, Andrew Davis wrote: This disables runtime PM on module exit, allowing us to simplify the probe exit path and remove callbacks. Do that here. As with the later patch, unless I'm misreading the code, you already

Re: [PATCH 6/9] remoteproc: qcom_q6v5_wcss: Use devm_rproc_alloc() helper

2024-02-02 Thread Andrew Davis
On 2/2/24 2:51 PM, Unnathi Chalicheemala wrote: On 1/23/2024 10:46 AM, Andrew Davis wrote: 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: Andrew Davis

[PATCH 4/4] hwspinlock: omap: Use index to get hwspinlock pointer

2024-01-23 Thread Andrew Davis
For loops with multiple initializers and increments are hard to read and reason about, simplify this by using the looping index to index into the hwspinlock array. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH 3/4] hwspinlock: omap: Use devm_hwspin_lock_register() helper

2024-01-23 Thread Andrew Davis
This unregister the HW spinlock on module exit, allowing us to remove the remove callback. Do this here. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/hwspinlock

[PATCH 2/4] hwspinlock: omap: Use devm_pm_runtime_enable() helper

2024-01-23 Thread Andrew Davis
This disables runtime PM on module exit, allowing us to simplify the probe exit path and remove callbacks. Do that here. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH 1/4] hwspinlock: omap: Remove unneeded check for OF node

2024-01-23 Thread Andrew Davis
We do not use the OF node anymore, nor does it matter how we got to probe, so remove the check for of_node. Signed-off-by: Andrew Davis --- drivers/hwspinlock/omap_hwspinlock.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock

[PATCH 7/8] remoteproc: k3-dsp: Use devm_ioremap_wc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 48 +-- 1 file changed

[PATCH 3/8] remoteproc: k3-dsp: Use devm_kcalloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 4/8] remoteproc: k3-dsp: Use devm_ti_sci_get_by_phandle() helper

2024-01-23 Thread Andrew Davis
Use the device lifecycle managed TI-SCI get() function. This helps prevent mistakes like not put()'ing in the wrong order in cleanup functions and forgetting to put() on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 33 +++ 1 file

[PATCH 1/8] remoteproc: k3-dsp: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 16 +--- 1 file changed, 5 insertions

[PATCH 2/8] remoteproc: k3-dsp: Add devm action to release reserved memory

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 20 1 file

[PATCH 6/8] remoteproc: k3-dsp: Add devm action to release tsp

2024-01-23 Thread Andrew Davis
Use a device lifecycle managed action to release tps 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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 26

[PATCH 8/8] remoteproc: k3-dsp: Use devm_rproc_add() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 ++--- 1 file changed, 2

[PATCH 5/8] remoteproc: k3-dsp: Use devm_kzalloc() helper

2024-01-23 Thread Andrew Davis
Use device lifecycle managed devm_kzalloc() helper function. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on all error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 8 ++-- 1 file changed, 2 insertions

[PATCH 2/9] remoteproc: imx_rproc: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/imx_rproc.c | 16 +--- 1 file changed, 5 insertions(+), 11

[PATCH 9/9] remoteproc: stm32: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/stm32_rproc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 8/9] remoteproc: st: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/st_remoteproc.c | 15 +-- 1 file changed, 5 insertions(+), 10

[PATCH 4/9] remoteproc: qcom_q6v5_mss: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/qcom_q6v5_mss.c | 28 1 file changed, 12

[PATCH 6/9] remoteproc: qcom_q6v5_wcss: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/qcom_q6v5_wcss.c | 24 +--- 1 file changed, 9 insertions

[PATCH 3/9] remoteproc: qcom_q6v5_adsp: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/qcom_q6v5_adsp.c | 14 +- 1 file changed, 5 insertions(+), 9

[PATCH 7/9] remoteproc: qcom_wcnss: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/qcom_wcnss.c | 17 ++--- 1 file changed, 6 insertions(+), 11

[PATCH 1/9] remoteproc: imx_dsp_rproc: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/imx_dsp_rproc.c | 11 --- 1 file changed, 4 insertions(+), 7

[PATCH 5/9] remoteproc: qcom_q6v5_pas: Use devm_rproc_alloc() helper

2024-01-23 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/qcom_q6v5_pas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH v2 0/5] K3 DSP Remoteproc remove cleanup

2024-02-05 Thread Andrew Davis
of the v1 series[0]. Thanks, Andrew [0] https://lore.kernel.org/lkml/20240123184913.725435-4-...@ti.com/T/ Andrew Davis (5): remoteproc: k3-dsp: Use devm_ti_sci_get_by_phandle() helper remoteproc: k3-dsp: Use devm_kzalloc() helper remoteproc: k3-dsp: Add devm action to release tsp remotepr

[PATCH v2 1/5] remoteproc: k3-dsp: Use devm_ti_sci_get_by_phandle() helper

2024-02-05 Thread Andrew Davis
Use the device lifecycle managed TI-SCI get() function. This helps prevent mistakes like not put()'ing in the wrong order in cleanup functions and forgetting to put() on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 32 +++ 1 file

[PATCH v2 3/5] remoteproc: k3-dsp: Add devm action to release tsp

2024-02-05 Thread Andrew Davis
Use a device lifecycle managed action to release tps 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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 27

[PATCH v2 2/5] remoteproc: k3-dsp: Use devm_kzalloc() helper

2024-02-05 Thread Andrew Davis
Use device lifecycle managed devm_kzalloc() helper function. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on all error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 8 ++-- 1 file changed, 2 insertions

[PATCH v2 5/5] remoteproc: k3-dsp: Use devm_rproc_add() helper

2024-02-05 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 9 ++--- 1 file changed, 2

[PATCH v2 4/5] remoteproc: k3-dsp: Use devm_ioremap_wc() helper

2024-02-05 Thread Andrew Davis
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: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 48 +-- 1 file changed

Re: [PATCH v7 2/5] remoteproc: k3: Move out data structures common with M4 driver

2024-02-05 Thread Andrew Davis
On 2/2/24 11:55 AM, Hari Nagalla wrote: From: Martyn Welch We will be adding the M4F driver which shares a lot of commonality with the DSP driver. Common data structures are introduced here. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v5: - Created a separate

Re: [PATCH v7 3/5] remoteproc: k3: Move out functions common with M4 driver

2024-02-05 Thread Andrew Davis
On 2/2/24 11:55 AM, Hari Nagalla wrote: From: Martyn Welch In the next commit we will be adding the M4F driver which shares a lot of commonality with the DSP driver. Move this shared functionality out so that it can be used by both drivers. Signed-off-by: Martyn Welch Signed-off-by: Hari

[PATCH 10/13] mailbox: omap: Use mbox_controller channel list directly

2024-03-25 Thread Andrew Davis
-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 42 +- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 97f59d9f9f319..8e42266cb31a5 100644 --- a/drivers/mailbox/omap

[PATCH 09/13] mailbox: omap: Use function local struct mbox_controller

2024-03-25 Thread Andrew Davis
The mbox_controller struct is only needed in the probe function. Make it a local variable instead of storing a copy in omap_mbox_device to simplify that struct. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 21 - 1 file changed, 12 insertions(+), 9

[PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-03-25 Thread Andrew Davis
-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 8e2760d2c5b0c..c5d4083125856 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b

[PATCH 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper

2024-03-25 Thread Andrew Davis
Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap

[PATCH 04/13] mailbox: omap: Move fifo size check to point of use

2024-03-25 Thread Andrew Davis
The mbox_kfifo_size can be changed at runtime, the sanity check on it's value should be done when it is used, not only once at init time. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox

[PATCH 08/13] mailbox: omap: Merge mailbox child node setup loops

2024-03-25 Thread Andrew Davis
in probe. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 119 + 1 file changed, 46 insertions(+), 73 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 4f956c7b4072c..17c9b9df78b1d 100644 --- a/drivers

[PATCH 02/13] mailbox: omap: Remove unused omap_mbox_request_channel() function

2024-03-25 Thread Andrew Davis
This function is not used, remove this function. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 36 -- include/linux/omap-mailbox.h | 6 -- 2 files changed, 42 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox

[PATCH 06/13] mailbox: omap: Remove device class

2024-03-25 Thread Andrew Davis
some point, but that is not the case anymore, nor does it matter for the upstream tree. Remove this device class and related functions and variables. This also allows us to switch to module_platform_driver() as there is nothing left to do in module_init(). Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mail

[PATCH 01/13] mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions

2024-03-25 Thread Andrew Davis
These function are not used, remove these here. While here, remove the leading _ from the driver internal functions that do the same thing as the functions removed. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 42 -- include/linux/omap

[PATCH 1/3] remoteproc: k3-dsp: Fix usage of omap_mbox_message and mbox_msg_t

2024-03-25 Thread Andrew Davis
The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). Use u32 unconditionally and remove the now unneeded omap-mailbox.h include. Signed-off-by: Andrew Davis

[PATCH 3/3] remoteproc: omap: Remove unused header omap-mailbox.h

2024-03-25 Thread Andrew Davis
This header no longer used, remove this include. Signed-off-by: Andrew Davis --- drivers/remoteproc/omap_remoteproc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 8f50ab80e56f4..bde04e3e6d966 100644

[PATCH 2/3] remoteproc: k3-r5: Fix usage of omap_mbox_message and mbox_msg_t

2024-03-25 Thread Andrew Davis
The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). Use u32 unconditionally and remove the now unneeded omap-mailbox.h include. Signed-off-by: Andrew Davis

[PATCH 11/13] mailbox: omap: Remove mbox_chan_to_omap_mbox()

2024-03-25 Thread Andrew Davis
ply dereference con_priv directly and remove this function. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 8e42266cb31a5..8e2760d2c5

[PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing

2024-03-25 Thread Andrew Davis
. The current mailbox framework expects mbox_chan_received_data() to be called with data immediately as it arrives. Remove the FIFO and pass the messages to the mailbox framework directly. Signed-off-by: Andrew Davis --- drivers/mailbox/Kconfig| 9 --- drivers/mailbox/omap-mailbox.c | 103

[PATCH 00/13] OMAP mailbox FIFO removal

2024-03-25 Thread Andrew Davis
Hello all, Core of this series is the last patch removing the message FIFO from OMAP mailbox. This hurts our real-time performance. It was a legacy leftover from before the common mailbox framework anyway. The rest of the patches are cleanups found along the way. Thanks, Andrew Andrew Davis

[PATCH 03/13] mailbox: omap: Move omap_mbox_irq_t into driver

2024-03-25 Thread Andrew Davis
This is only used internal to the driver, move it out of the public header and into the driver file. While we are here, this is not used as a bitwise, so drop that and make it a simple enum type. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 5 + include/linux/omap

[PATCH 05/13] mailbox: omap: Remove unneeded header omap-mailbox.h

2024-03-25 Thread Andrew Davis
the last couple users of the same in this driver. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 167348fb1b33b..4c673cb732ed1 100644

Re: [PATCH 1/3] remoteproc: k3-dsp: Fix usage of omap_mbox_message and mbox_msg_t

2024-03-28 Thread Andrew Davis
On 3/28/24 10:28 AM, Mathieu Poirier wrote: Hi Andrew, On Mon, Mar 25, 2024 at 11:58:06AM -0500, Andrew Davis wrote: The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs

Re: [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-01 Thread Andrew Davis
On 4/1/24 6:31 PM, Hari Nagalla wrote: On 3/25/24 12:20, Andrew Davis wrote:   static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)   { -    int ret = -EBUSY; +    if (mbox_fifo_full(mbox)) +    return -EBUSY; -    if (!mbox_fifo_full(mbox)) { -    omap_mbox_enable_irq

Re: [PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing

2024-04-01 Thread Andrew Davis
On 4/1/24 6:39 PM, Hari Nagalla wrote: On 3/25/24 12:20, Andrew Davis wrote: The kernel FIFO queue has a couple issues. The biggest issue is that it causes extra latency in a path that can be used in real-time tasks, such as communication with real-time remote processors. The whole FIFO idea

[PATCH v2 09/13] mailbox: omap: Use function local struct mbox_controller

2024-04-10 Thread Andrew Davis
The mbox_controller struct is only needed in the probe function. Make it a local variable instead of storing a copy in omap_mbox_device to simplify that struct. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 21 - 1 file changed, 12 insertions(+), 9

[PATCH v2 01/13] mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions

2024-04-10 Thread Andrew Davis
These function are not used, remove these here. While here, remove the leading _ from the driver internal functions that do the same thing as the functions removed. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 42 -- include/linux/omap

[PATCH v2 04/13] mailbox: omap: Move fifo size check to point of use

2024-04-10 Thread Andrew Davis
The mbox_kfifo_size can be changed at runtime, the sanity check on it's value should be done when it is used, not only once at init time. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox

[PATCH v2 00/13] OMAP mailbox FIFO removal

2024-04-10 Thread Andrew Davis
: - Use threaded irq as suggested by Hari and to fix possible "scheduling while atomic" issue - Use oneshot irq as we do not want to enable the irq again until we clear our the messages - Rebase on v6.9-rc3 Andrew Davis (13): mailbox: omap: Remove unused omap_mbox_{enable,di

[PATCH v2 02/13] mailbox: omap: Remove unused omap_mbox_request_channel() function

2024-04-10 Thread Andrew Davis
This function is not used, remove this function. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 36 -- include/linux/omap-mailbox.h | 6 -- 2 files changed, 42 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox

[PATCH v2 06/13] mailbox: omap: Remove device class

2024-04-10 Thread Andrew Davis
some point, but that is not the case anymore, nor does it matter for the upstream tree. Remove this device class and related functions and variables. This also allows us to switch to module_platform_driver() as there is nothing left to do in module_init(). Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mail

[PATCH v2 08/13] mailbox: omap: Merge mailbox child node setup loops

2024-04-10 Thread Andrew Davis
in probe. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 119 + 1 file changed, 46 insertions(+), 73 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 4f956c7b4072c..17c9b9df78b1d 100644 --- a/drivers

[PATCH v2 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-10 Thread Andrew Davis
-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 8e2760d2c5b0c..c5d4083125856 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b

[PATCH v2 10/13] mailbox: omap: Use mbox_controller channel list directly

2024-04-10 Thread Andrew Davis
-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 42 +- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 97f59d9f9f319..8e42266cb31a5 100644 --- a/drivers/mailbox/omap

[PATCH v2 13/13] mailbox: omap: Remove kernel FIFO message queuing

2024-04-10 Thread Andrew Davis
. The current mailbox framework expects mbox_chan_received_data() to be called with data immediately as it arrives. Remove the FIFO and pass the messages to the mailbox framework directly as part of a threaded IRQ handler. Signed-off-by: Andrew Davis --- drivers/mailbox/Kconfig| 9 --- drivers

[PATCH v2 11/13] mailbox: omap: Remove mbox_chan_to_omap_mbox()

2024-04-10 Thread Andrew Davis
ply dereference con_priv directly and remove this function. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 8e42266cb31a5..8e2760d2c5

[PATCH v2 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper

2024-04-10 Thread Andrew Davis
Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap

[PATCH v2 03/13] mailbox: omap: Move omap_mbox_irq_t into driver

2024-04-10 Thread Andrew Davis
This is only used internal to the driver, move it out of the public header and into the driver file. While we are here, this is not used as a bitwise, so drop that and make it a simple enum type. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 5 + include/linux/omap

[PATCH v2 05/13] mailbox: omap: Remove unneeded header omap-mailbox.h

2024-04-10 Thread Andrew Davis
the last couple users of the same in this driver. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 167348fb1b33b..4c673cb732ed1 100644

[PATCH v9 4/5] arm64: dts: ti: k3-am625-sk: Add M4F remoteproc node

2024-04-26 Thread Andrew Davis
by the firmware to be set-aside. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk

[PATCH v9 1/5] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2024-04-26 Thread Andrew Davis
and starting the M4F subsystems. The YAML binding document provides the various node properties to be configured by the consumers of the M4F subsystem. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis Reviewed-by: Conor Dooley --- .../bindings/remoteproc/ti,k3-m4f

[PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-04-26 Thread Andrew Davis
-off-by: Andrew Davis --- drivers/remoteproc/Kconfig | 13 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/ti_k3_m4_remoteproc.c | 785 +++ 3 files changed, 799 insertions(+) create mode 100644 drivers/remoteproc/ti_k3_m4_remoteproc.c diff

[PATCH v9 3/5] arm64: dts: ti: k3-am62: Add M4F remoteproc node

2024-04-26 Thread Andrew Davis
as this node is not complete until mailbox data is provided in the board level DT. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi b/arch

[PATCH v9 0/5] TI K3 M4F support on AM62 SoCs

2024-04-26 Thread Andrew Davis
Hello all, This is the continuation of the M4F RProc support series from here[0]. I'm helping out with the upstream task for Hari and so this version(v8) is a little different than the previous(v7) postings[0]. Most notable change I've introduced being the patches factoring out common support

[PATCH v9 5/5] arm64: defconfig: Enable TI K3 M4 remoteproc driver

2024-04-26 Thread Andrew Davis
From: Hari Nagalla Some K3 platform devices (AM64x, AM62x) have a Cortex M4 core. Build the M4 remote proc driver as a module for these platforms. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH v8 2/4] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-04-24 Thread Andrew Davis
-off-by: Andrew Davis --- drivers/remoteproc/Kconfig | 13 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/ti_k3_m4_remoteproc.c | 785 +++ 3 files changed, 799 insertions(+) create mode 100644 drivers/remoteproc/ti_k3_m4_remoteproc.c diff

[PATCH v8 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2024-04-24 Thread Andrew Davis
and starting the M4F subsystems. The YAML binding document provides the various node properties to be configured by the consumers of the M4F subsystem. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- .../bindings/remoteproc/ti,k3-m4f-rproc.yaml | 126

[PATCH v8 3/4] arm64: defconfig: Enable TI K3 M4 remoteproc driver

2024-04-24 Thread Andrew Davis
From: Hari Nagalla Some K3 platform devices (AM64x, AM62x) have a Cortex M4 core. Build the M4 remote proc driver as a module for these platforms. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH v8 4/4] arm64: dts: ti: k3-am62: Add M4F remoteproc node

2024-04-24 Thread Andrew Davis
by the firmware to be set-aside. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi| 12 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 18 ++ 2 files changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/ti

[PATCH v8 0/4] TI K3 M4F support on AM62 SoCs

2024-04-24 Thread Andrew Davis
Hello all, This is the continuation of the M4F RProc support series from here[0]. I'm helping out with the upstream task for Hari and so this version(v8) is a little different than the previous(v7) postings[0]. Most notable change I've introduced being the patches factoring out common support

Re: [PATCH v8 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2024-04-25 Thread Andrew Davis
On 4/25/24 12:15 PM, Conor Dooley wrote: On Wed, Apr 24, 2024 at 03:36:39PM -0500, Rob Herring wrote: On Wed, 24 Apr 2024 14:06:09 -0500, Andrew Davis wrote: From: Hari Nagalla K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. The remote processor's life cycle management

Re: [PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-05-08 Thread Andrew Davis
On 5/7/24 3:36 PM, Mathieu Poirier wrote: On Fri, Apr 26, 2024 at 02:18:08PM -0500, Andrew Davis wrote: From: Martyn Welch The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in the MCU domain. This core is typically used for safety applications in a stand alone mode. However

Re: [PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-05-08 Thread Andrew Davis
On 5/6/24 3:46 PM, Mathieu Poirier wrote: Good day, I have started reviewing this patchset. Comments will be scattered over multiple days and as such, I will explicitly inform you when am done with the review. On Fri, Apr 26, 2024 at 02:18:08PM -0500, Andrew Davis wrote: From: Martyn Welch

Re: [PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-05-09 Thread Andrew Davis
On 5/9/24 10:22 AM, Mathieu Poirier wrote: On Wed, 8 May 2024 at 09:36, Andrew Davis wrote: On 5/6/24 3:46 PM, Mathieu Poirier wrote: Good day, I have started reviewing this patchset. Comments will be scattered over multiple days and as such, I will explicitly inform you when am done

Re: [PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-05-09 Thread Andrew Davis
On 5/9/24 10:32 AM, Mathieu Poirier wrote: On Wed, 8 May 2024 at 10:54, Andrew Davis wrote: On 5/7/24 3:36 PM, Mathieu Poirier wrote: On Fri, Apr 26, 2024 at 02:18:08PM -0500, Andrew Davis wrote: From: Martyn Welch The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core