Re: [PATCH 1/3] dt-bindings: hwlock: Adding brcmstb-hwspinlock support

2025-09-30 Thread Peng Fan
On Mon, Sep 29, 2025 at 04:06:24PM -0400, Kamal Dasu wrote: >Adding brcmstb-hwspinlock bindings. > >Signed-off-by: Kamal Dasu >--- > .../hwlock/brcm,brcmstb-hwspinlock.yaml | 36 +++ > 1 file changed, 36 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/h

Re: [PATCH 2/3] hwspinlock: brcmstb hardware semaphore support

2025-09-30 Thread Peng Fan
On Mon, Sep 29, 2025 at 04:06:26PM -0400, Kamal Dasu wrote: >Added support for brmstb_hwspinlock driver that makes use of >the hwspinlock framework. Driver uses SUN_TOP_CTRL_SEMAPHORE_[1:15] >registers to implement the hardware semaphore. With this change >other brcmstb drivers can use hwspin_trylo

Re: [PATCH v2 2/4] remoteproc: imx_rproc: Populate devices under "rpmsg" subnode

2025-09-28 Thread Peng Fan
Hi Shenwei, Most of the patch looks good to me. Only a few minor comments inline. On Mon, Sep 22, 2025 at 03:04:11PM -0500, Shenwei Wang wrote: >Register the RPMsg channel driver and populate remote devices defined >under the "rpmsg" subnode upon receiving their notification messages. > > > #inc

Re: [PATCH] mailbox: check mailbox queue is full or not

2025-09-27 Thread Peng Fan
Hi, On Fri, Sep 26, 2025 at 10:40:09AM -0500, Tanmay Shah wrote: >> > --- >> > drivers/mailbox/mailbox.c | 24 >> > drivers/remoteproc/xlnx_r5_remoteproc.c | 4 >> > include/linux/mailbox_client.h | 1 + >> >> The mailbox and remoteproc should b

[PATCH v3 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup

2025-09-26 Thread Peng Fan
. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

[PATCH v3 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path

2025-09-26 Thread Peng Fan
ned-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index bb25221a4a8987ff427d68e2a5535f0e156b0097..8424e6ea5569b9ba6b07525643ce795faaeb2898 100644 ---

[PATCH v3 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup

2025-09-26 Thread Peng Fan
eliminate redundant cleanup steps and use return-based error propagation where appropriate. Improve code clarity and reduce the chance of resource leaks or incorrect ordering in cleanup paths. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan

[PATCH v3 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper

2025-09-26 Thread Peng Fan
ed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 76feda868cb619b79922bcee4c6fdb3e16f

[PATCH v3 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup

2025-09-26 Thread Peng Fan
Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

[PATCH v3 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup

2025-09-26 Thread Peng Fan
by using dev_err_probe() for consistency and clarity. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH v3 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver

2025-09-26 Thread Peng Fan
the internal reviewing. Signed-off-by: Peng Fan Signed-off-by: Peng Fan --- Changes in v3: - Follow Ulf's suggestion to address the runtime PM in patch 1, and add Ulf's suggested-by tag. I dropped Frank and Daniel's tag in patch 1. - With the changes in patch 1, the remove() is k

Re: [PATCH v2 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver

2025-09-26 Thread Peng Fan
On Thu, Sep 25, 2025 at 09:25:28AM -0600, Mathieu Poirier wrote: >On Thu, Sep 25, 2025 at 04:31:15AM +0800, Peng Fan wrote: > >It is fortunate that time was taken to understand the problem and fix it >correctly. Otherwise we'd still have a problem and more patches, possibly >

Re: [PATCH] mailbox: check mailbox queue is full or not

2025-09-25 Thread Peng Fan
Hi Tanmay, On Thu, Sep 25, 2025 at 11:50:44AM -0700, Tanmay Shah wrote: >Sometimes clients need to know if mailbox queue is full or not before >posting new message via mailbox. If mailbox queue is full clients can >choose not to post new message. This doesn't mean current queue length >should be i

Re: [PATCH v2 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling

2025-09-25 Thread Peng Fan
Hi Ulf, Thanks for reviewing this patch. On Thu, Sep 25, 2025 at 12:18:39PM +0200, Ulf Hansson wrote: >On Tue, 23 Sept 2025 at 07:17, Peng Fan wrote: >> >> The order of runtime PM API calls in the remove path is wrong. >> pm_runtime_put() should be called before pm_runti

[PATCH v2 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver

2025-09-22 Thread Peng Fan
, and i.MX8ULP-EVK. There is still a 3rd patchset to do further cleanup. After this patchset get reviewed, the 3rd patchset will be posted out to list. Thanks to Daniel and Frank for the internal reviewing. Signed-off-by: Peng Fan --- Changes in v2: - Address a build warning in patch 4/6 - Add R-b

[PATCH v2 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup

2025-09-22 Thread Peng Fan
eliminate redundant cleanup steps and use return-based error propagation where appropriate. Improve code clarity and reduce the chance of resource leaks or incorrect ordering in cleanup paths. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan

[PATCH v2 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper

2025-09-22 Thread Peng Fan
ed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index a53ff186d218f54123e1ce740b0277a6fe9

[PATCH v2 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup

2025-09-22 Thread Peng Fan
Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 56 ++ 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

[PATCH v2 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling

2025-09-22 Thread Peng Fan
-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index bb25221a4a8987ff427d68e2a5535f

Re: [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling

2025-09-22 Thread Peng Fan
On Mon, Sep 22, 2025 at 10:07:08AM -0600, Mathieu Poirier wrote: >On Wed, Sep 17, 2025 at 09:19:13PM +0800, Peng Fan wrote: >> The order of runtime PM API calls in the remove path is wrong. >> pm_runtime_put() should be called before pm_runtime_disable(), per the >> runtime PM

Re: [PATCH 0/6] remoteproc: imx_proc: Simplify driver by removing the switch-case

2025-09-20 Thread Peng Fan
On Mon, Sep 08, 2025 at 09:07:33PM +0800, Peng Fan wrote: >This patchset serves as a preparing patchset for i.MX95 support. > >The current code logic is complicated, with mix the usage of switch-case >and if-else. > >To simplify the code logic: > Introduce struct imx_r

[PATCH v2 1/5] remoteproc: imx_rproc: Simplify clock enable logic using dcfg flags

2025-09-20 Thread Peng Fan
probe logic to conditionally enable clocks based on the new flag. Set the flag for applicable SoCs (e.g., i.MX7D, i.MX8MQ, i.MX93, etc.). No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 40

[PATCH v2 3/5] remoteproc: imx_rproc: Enable PM runtime support unconditionally

2025-09-20 Thread Peng Fan
-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index a621a934a7ba5fe454e420d8dd20256d3655d560..afdf7ba73783512016c3016cd1bef395a28847b9

Re: [PATCH v3 3/4] clk: mmp: pxa1908: Instantiate power driver through auxiliary bus

2025-09-20 Thread Peng Fan
On Fri, Aug 29, 2025 at 06:21:06PM +0200, Duje Mihanovi?? wrote: >The power domain driver shares the APMU clock controller's registers. >Instantiate the power domain driver through the APMU clock driver using >the auxiliary bus. > >Also create a separate Kconfig entry for the PXA1908 clock driver t

[PATCH 0/6] remoteproc: imx_proc: Simplify driver by removing the switch-case

2025-09-20 Thread Peng Fan
not have a setup at hand, I will give a setup and test later, but everything should be fine, no functional changes. Signed-off-by: Peng Fan --- Peng Fan (6): remoteproc: imx_rproc: Introduce start/stop/detect_mode ops for imx_rproc_dcfg remoteproc: imx_rproc: Move imx_rproc_dcfg

[PATCH v2 2/5] remoteproc: imx_rproc: Make detach operation platform-specific

2025-09-20 Thread Peng Fan
l changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 18 +- drivers/remoteproc/imx_rproc.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/im

[PATCH v2 5/5] MAINTAINERS: Add an entry for i.MX remoteproc driver

2025-09-20 Thread Peng Fan
Add an entry for the i.MX remoteproc driver Signed-off-by: Peng Fan --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index df319f9762b369a2746ee7f41334be9b57e7bf9b..c25aad1ad4386623065058d1a7cf92e1555ec7fe 100644 --- a/MAINTAINERS +++ b

[PATCH v2 4/5] remoteproc: imx_rproc: Remove the assignement to method

2025-09-20 Thread Peng Fan
'method' is no longer used in imx_rproc.c, so remove the assignment. But imx_dsp_rproc.c is still using 'method', so still keep the field in struct imx_rrpoc_dcfg. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan ---

[PATCH v2 0/5] remoteproc: imx_rproc: misc clean up

2025-09-20 Thread Peng Fan
Signed-off-by: Peng Fan --- Changes in v2: - Add R-b from Daniel and Frank - Update comment in patch 1 (from Daniel) - Update commit log in patch 4 (from Daniel) - Include Shengjiu as maintainer - Link to v1: https://lore.kernel.org/r/20250918-imx_rproc_c2-v1-0-deec81831...@nxp.com --- Peng Fan

[PATCH 6/6] remoteproc: imx_rproc: Clean up after ops introduction

2025-09-19 Thread Peng Fan
al changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5fa729f4286f6ac939357c32fef41d

[PATCH 3/6] remoteproc: imx_rproc: Simplify IMX_RPROC_MMIO switch case

2025-09-19 Thread Peng Fan
cleaner and more maintainable code. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 148 - 1 file changed, 86 insertions(+), 62 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

RE: [PATCH 1/5] remoteproc: imx_rproc: Simplify clock enable logic using dcfg flags

2025-09-18 Thread Peng Fan
Hi Daniel, > Subject: Re: [PATCH 1/5] remoteproc: imx_rproc: Simplify clock enable > logic using dcfg flags > > + /* Remote core is under control of Linux or clock is not > > + managed by firmware */ > > I see that you negate the comment from imx_rproc_clk_enable but > with the negation OR

[PATCH 5/5] MAINTAINERS: Add an entry for i.MX remoteproc driver

2025-09-18 Thread Peng Fan
Add an entry for the i.MX remoteproc driver Signed-off-by: Peng Fan --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index df319f9762b369a2746ee7f41334be9b57e7bf9b..0bf57317c6607d72020e1401540cdbc77b70c4ff 100644 --- a/MAINTAINERS +++ b

[PATCH 3/5] remoteproc: imx_rproc: Enable PM runtime support unconditionally

2025-09-18 Thread Peng Fan
PM runtime support is safe and applicable across all i.MX platforms, not just those using the SCU API. Remove the conditional check and enable PM runtime unconditionally to simplify the code and ensure consistent power management behavior. Signed-off-by: Peng Fan --- drivers/remoteproc

[PATCH 0/5] remoteproc: imx_rproc: misc clean up

2025-09-18 Thread Peng Fan
Signed-off-by: Peng Fan --- Peng Fan (5): remoteproc: imx_rproc: Simplify clock enable logic using dcfg flags remoteproc: imx_rproc: Make detach operation platform-specific remoteproc: imx_rproc: Enable PM runtime support unconditionally remoteproc: imx_rproc: Remove the

[PATCH 2/5] remoteproc: imx_rproc: Make detach operation platform-specific

2025-09-18 Thread Peng Fan
l changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 18 +- drivers/remoteproc/imx_rproc.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 71617b20f9d0ae698e7f655aae22e88

[PATCH 4/5] remoteproc: imx_rproc: Remove the assignement to method

2025-09-18 Thread Peng Fan
There is no referring to the field method, it could be removed now. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

[PATCH 1/5] remoteproc: imx_rproc: Simplify clock enable logic using dcfg flags

2025-09-18 Thread Peng Fan
probe logic to conditionally enable clocks based on the new flag. Set the flag for applicable SoCs (e.g., i.MX7D, i.MX8MQ, i.MX93, etc.). No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 37 - drivers/remoteproc/imx_rproc.h

[PATCH v2 0/6] remoteproc: imx_proc: Simplify driver by removing the switch-case

2025-09-17 Thread Peng Fan
. Signed-off-by: Peng Fan --- Changes in v2: - Simplify the if/else in patch 6 per Frank and Mathieu - Add R-b from Daniel and Frank. - Link to v1: https://lore.kernel.org/r/20250908-imx-rproc-cleanup-v1-0-e838cb144...@nxp.com --- Peng Fan (6): remoteproc: imx_rproc: Introduce start/stop

[PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup

2025-09-17 Thread Peng Fan
. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 12305f36552fb5265b0953a099ea0d561880e3ff..cc776f5d75f1f614943c05250877f17537837068

[PATCH v2 2/6] remoteproc: imx_rproc: Move imx_rproc_dcfg closer to imx_rproc_of_match

2025-09-17 Thread Peng Fan
27; at the beginning of the file, improving code organization and readability. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 158 - 1 file changed, 79 inserti

[PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup

2025-09-17 Thread Peng Fan
devm_add_action_or_reset() now exclusively handles SCU cleanup. - Improve error reporting by using dev_err_probe() for consistency and clarity. - Drop the err_put_scu label, as it is now redundant due to the updated error handling approach. No functional changes. Signed-off-by: Peng Fan

[PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup

2025-09-17 Thread Peng Fan
by using dev_err_probe() for consistency and clarity. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c

[PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper

2025-09-17 Thread Peng Fan
d-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index a53ff186d218f54123e1ce740b0277a6fe95a902..694fbbb2f34061de22a3a815f8a6114159585f9e 100644

[PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling

2025-09-17 Thread Peng Fan
ned-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index bb25221a4a8987ff427d68e2a5535f0e156b0097..12305f36552fb5265b0953a099ea0d561880e3

[PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver

2025-09-17 Thread Peng Fan
, and i.MX8ULP-EVK. There is still a 3rd patchset to do further cleanup. After this patchset get reviewed, the 3rd patchset will be posted out to list. Thanks to Daniel and Frank for the internal reviewing. Signed-off-by: Peng Fan --- Peng Fan (6): remoteproc: imx_rproc: Fix runtime PM

[PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup

2025-09-17 Thread Peng Fan
eliminate redundant cleanup steps and use return-based error propagation where appropriate. Improve code clarity and reduce the chance of resource leaks or incorrect ordering in cleanup paths. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 28

Re: [PATCH v2 6/6] remoteproc: imx_rproc: Clean up after ops introduction

2025-09-11 Thread Peng Fan
On Thu, Sep 11, 2025 at 01:13:59AM +, Peng Fan wrote: >Hi Frank, >> >> Can you remove 'method' in data struct also? > >The method is used in other places and other purpose, imx_rproc_detach >imx_rproc_put_scu, imx_rproc_remove, it is also referred >imx

[PATCH v2 5/6] remoteproc: imx_rproc: Simplify IMX_RPROC_SMC switch case

2025-09-10 Thread Peng Fan
cleaner and more maintainable code. Since this is the last switch in imx_rproc_{start,stop}{}, remove the switch-case. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 69

RE: [PATCH v2 6/6] remoteproc: imx_rproc: Clean up after ops introduction

2025-09-10 Thread Peng Fan
Hi Frank, > Subject: Re: [PATCH v2 6/6] remoteproc: imx_rproc: Clean up after ops > introduction > > > > - if (dcfg->ops && dcfg->ops->detect_mode) > > - return dcfg->ops->detect_mode(priv->rproc); > > - > > - switch (dcfg->method) { > > Can you remove 'method' in data struct also?

[PATCH v2 6/6] remoteproc: imx_rproc: Clean up after ops introduction

2025-09-10 Thread Peng Fan
al changes. Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rpr

[PATCH v2 4/6] remoteproc: imx_rproc: Simplify IMX_RPROC_SCU_API switch case

2025-09-10 Thread Peng Fan
in cleaner and more maintainable code. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 149 +++-- 1 file changed, 85 insertions(+), 64 deletions(-) diff --git a/drivers

[PATCH v2 3/6] remoteproc: imx_rproc: Simplify IMX_RPROC_MMIO switch case

2025-09-10 Thread Peng Fan
cleaner and more maintainable code. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 148 - 1 file changed, 86 insertions(+), 62 deletions(-) diff --git a/drivers/remoteproc

[PATCH v2 1/6] remoteproc: imx_rproc: Introduce start/stop/detect_mode ops for imx_rproc_dcfg

2025-09-10 Thread Peng Fan
multiple switch-case statements. Improve code readability and maintainability by encapsulating platform-specific behavior. No functional changes. Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 15 +++ drivers/remoteproc

[PATCH 1/6] remoteproc: imx_rproc: Introduce start/stop/detect_mode ops for imx_rproc_dcfg

2025-09-09 Thread Peng Fan
multiple switch-case statements. Improves code readability and maintainability by encapsulating platform-specific behavior. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 15 +++ drivers/remoteproc/imx_rproc.h | 7 +++ 2 files changed, 22

Re: [PATCH 6/6] remoteproc: imx_rproc: Clean up after ops introduction

2025-09-08 Thread Peng Fan
On Mon, Sep 08, 2025 at 11:03:46AM -0400, Frank Li wrote: >On Mon, Sep 08, 2025 at 09:07:39PM +0800, Peng Fan wrote: [...] >> if (dcfg->ops && dcfg->ops->detect_mode) >> return dcfg->ops->detect_mode(priv->rproc); >> >> -

[PATCH 5/6] remoteproc: imx_rproc: Simplify IMX_RPROC_SMC switch case

2025-09-08 Thread Peng Fan
cleaner and more maintainable code. Since this is the last switch in imx_rproc_{start,stop}{}, remove the switch-case. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 69 ++ 1 file changed, 43 insertions(+), 26 deletions

[PATCH 4/6] remoteproc: imx_rproc: Simplify IMX_RPROC_SCU_API switch case

2025-09-08 Thread Peng Fan
in cleaner and more maintainable code. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 149 +++-- 1 file changed, 85 insertions(+), 64 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc

[PATCH 2/6] remoteproc: imx_rproc: Move imx_rproc_dcfg closer to imx_rproc_of_match

2025-09-08 Thread Peng Fan
27; at the beginning of the file, improving code organization and readability. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 158 - 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/drivers/remoteproc/imx

Re: [PATCH v5 2/3] remoteproc: imx_rproc: Add support for System Manager API

2025-09-02 Thread Peng Fan
On Wed, Sep 03, 2025 at 12:56:11PM +0800, Peng Fan wrote: >On Tue, Sep 02, 2025 at 10:38:49AM -0600, Mathieu Poirier wrote: >>On Sat, Aug 30, 2025 at 08:52:09PM +0800, Peng Fan wrote: >>> On Fri, Aug 29, 2025 at 10:00:04AM -0600, Mathieu Poirier wrote: >>> >Good

Re: [PATCH v5 2/3] remoteproc: imx_rproc: Add support for System Manager API

2025-09-02 Thread Peng Fan
On Tue, Sep 02, 2025 at 10:38:49AM -0600, Mathieu Poirier wrote: >On Sat, Aug 30, 2025 at 08:52:09PM +0800, Peng Fan wrote: >> On Fri, Aug 29, 2025 at 10:00:04AM -0600, Mathieu Poirier wrote: >> >Good day, >> > >> >On Thu, Aug 21, 2025 at 05:05:05PM +0800, Pen

Re: [PATCH v5 2/3] remoteproc: imx_rproc: Add support for System Manager API

2025-08-30 Thread Peng Fan
On Fri, Aug 29, 2025 at 10:00:04AM -0600, Mathieu Poirier wrote: >Good day, > >On Thu, Aug 21, 2025 at 05:05:05PM +0800, Peng Fan wrote: >> i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and >> one Cortex-M7 core. The System Control Management Interface(SCMI) >&g

Re: [PATCH 2/4] remoteproc: imx_rproc: Populate devices under "rpmsg" subnode

2025-08-21 Thread Peng Fan
Hi Shenwei, On Mon, Aug 18, 2025 at 03:44:18PM -0500, Shenwei Wang wrote: >Register the RPMsg channel driver and populate remote devices defined >under the "rpmsg" subnode upon receiving their notification messages. > >The following illustrates the expected DTS layout structure: > > cm33: re

[PATCH v5 0/3] remoteproc: imx_rproc: Support i.MX95

2025-08-21 Thread Peng Fan
ut to list. Signed-off-by: Peng Fan --- Changes in v5: - Rebased to next-20250820 to resolve minor conflict in patch 2, as below if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_SCU_API) => if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_S

[PATCH v5 2/3] remoteproc: imx_rproc: Add support for System Manager API

2025-08-21 Thread Peng Fan
ouple U-Boot and Linux. Reviewed-by: Daniel Baluta Reviewed-by: Frank Li Signed-off-by: Peng Fan --- drivers/remoteproc/Kconfig | 2 + drivers/remoteproc/imx_rproc.c | 123 - drivers/remoteproc/imx_rproc.h | 5 ++ 3 files changed, 127 insertions(

[PATCH v5 1/3] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-08-21 Thread Peng Fan
Add compatible string for the Cortex-M7 core in i.MX95 Reviewed-by: Frank Li Acked-by: Krzysztof Kozlowski Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH v5 3/3] remoteproc: imx_rproc: Add support for i.MX95

2025-08-21 Thread Peng Fan
Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping. Add i.MX95 of_device_id entry. Reviewed-by: Daniel Baluta Reviewed-by: Frank Li Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers

Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-21 Thread Peng Fan
On Mon, Jul 21, 2025 at 08:23:42AM -0600, Mathieu Poirier wrote: >On Sun, 20 Jul 2025 at 21:08, Peng Fan wrote: >> >> On Fri, Jul 18, 2025 at 11:06:04AM -0600, Mathieu Poirier wrote: >> >On Fri, Jul 18, 2025 at 04:20:34PM +0800, Peng Fan wrote: >> >> On T

Re: [PATCH v3 1/2] dt-bindings: remoteproc: qcom,milos-pas: Document remoteprocs

2025-07-21 Thread Peng Fan
On Mon, Jul 21, 2025 at 01:38:59PM +0200, Krzysztof Kozlowski wrote: >On 21/07/2025 08:42, Peng Fan wrote: >>> + >>> + interrupt-names: >>> +minItems: 6 >>> +maxItems: 6 >> >> Ditto. >> >> Do you need to define the li

Re: [PATCH 1/2] remoteproc: xlnx: disable unsupported features

2025-07-20 Thread Peng Fan
On Wed, Jul 16, 2025 at 02:30:47PM -0700, Tanmay Shah wrote: >AMD-Xilinx platform driver does not support iommu or recovery mechanism >yet. Disable both features in platform driver. > >Signed-off-by: Tanmay Shah >--- > drivers/remoteproc/xlnx_r5_remoteproc.c | 2 ++ > 1 file changed, 2 insertions(+

Re: [PATCH v3 1/2] dt-bindings: remoteproc: qcom,milos-pas: Document remoteprocs

2025-07-20 Thread Peng Fan
On Wed, Jul 09, 2025 at 01:13:07PM +0200, Luca Weiss wrote: >Document the bindings for the ADSP, CDSP, MPSS and WPSS PAS on the Milos >(e.g. SM7635) SoC. > >Signed-off-by: Luca Weiss >--- > .../bindings/remoteproc/qcom,milos-pas.yaml| 201 + > 1 file changed, 201 inserti

Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-20 Thread Peng Fan
On Fri, Jul 18, 2025 at 11:06:04AM -0600, Mathieu Poirier wrote: >On Fri, Jul 18, 2025 at 04:20:34PM +0800, Peng Fan wrote: >> On Thu, Jul 17, 2025 at 08:48:43AM -0600, Mathieu Poirier wrote: >> >On Mon, Jul 14, 2025 at 11:52:05AM +, Peng Fan wrote: >> >>

RE: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-18 Thread Peng Fan
> Subject: Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95 > > On 18/07/2025 10:20, Peng Fan wrote: > > On Thu, Jul 17, 2025 at 08:48:43AM -0600, Mathieu Poirier wrote: > >> On Mon, Jul 14, 2025 at 11:52:05AM +, Peng Fan wrote: > >>>> Subject: R

Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-18 Thread Peng Fan
On Thu, Jul 17, 2025 at 08:48:43AM -0600, Mathieu Poirier wrote: >On Mon, Jul 14, 2025 at 11:52:05AM +0000, Peng Fan wrote: >> > Subject: Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95 >> > >> [...] >> > New warnings running 'make CHECK_DTBS

RE: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-14 Thread Peng Fan
> Subject: Re: [PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95 > [...] > New warnings running 'make CHECK_DTBS=y for > arch/arm64/boot/dts/freescale/' for 20250710-imx95-rproc-1-v4-0- > a7123e857...@nxp.com: > > arch/arm64/boot/dts/freescale/imx95-tqma9596sa-mb-smarc-2.dtb: > scmi (arm,scmi

[PATCH v4 5/5] arm64: dts: imx95-19x19-evk: Add CM7 nodes and vdev related memory regions

2025-07-10 Thread Peng Fan
Add CM7 nodes, vdev related memory regions for remoteproc. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 41 +++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts b/arch/arm64/boot/dts

[PATCH v4 4/5] arm64: dts: imx95: Add SCMI LMM/CPU nodes

2025-07-10 Thread Peng Fan
Add SCMI LMM/CPU nodes which is for remoteproc to handle remote cores. Reviewed-by: Frank Li Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx95.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts

[PATCH v4 2/5] remoteproc: imx_rproc: Add support for System Manager API

2025-07-10 Thread Peng Fan
ouple U-Boot and Linux. Reviewed-by: Daniel Baluta Reviewed-by: Frank Li Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 122 - drivers/remoteproc/imx_rproc.h | 5 ++ 2 files changed, 124 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH v4 3/5] remoteproc: imx_rproc: Add support for i.MX95

2025-07-10 Thread Peng Fan
Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping. Add i.MX95 of_device_id entry. Reviewed-by: Daniel Baluta Reviewed-by: Frank Li Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers

[PATCH v4 1/5] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-07-10 Thread Peng Fan
Add compatible string for the Cortex-M7 core in i.MX95 Reviewed-by: Frank Li Acked-by: Krzysztof Kozlowski Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH v4 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-10 Thread Peng Fan
ut to list. Signed-off-by: Peng Fan --- Changes in v4: - Move the lmm permission check code to a separate function(imx_rproc_sm_lmm_prepare) in patch 3. - Check return value of scmi_imx_cpu_started in patch 3 - Rebased to next-20250710 and tested on i.MX95-19x19-EVK - Add R-b from Frank for patc

RE: [PATCH v3 2/5] remoteproc: imx_rproc: Add support for System Manager API

2025-07-09 Thread Peng Fan
> Subject: Re: [PATCH v3 2/5] remoteproc: imx_rproc: Add support for > System Manager API > ... > > > > > >This is set all the time imx_rproc_prepare() is called - isn't there > > >a way to set it once at initialisation time? > > > > Yeah. Moving this to probe path should be ok, such as in > imx_r

Re: [PATCH v3 2/5] remoteproc: imx_rproc: Add support for System Manager API

2025-07-09 Thread Peng Fan
Hi Mathieu, On Tue, Jul 08, 2025 at 10:32:34AM -0600, Mathieu Poirier wrote: >Good day, Thanks, good day. > >On Wed, Jun 25, 2025 at 10:23:28AM +0800, Peng Fan (OSS) wrote: >> From: Peng Fan >> >> i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and >&g

Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-09 Thread Peng Fan
On Tue, Jul 08, 2025 at 02:29:53PM -0300, Hiago De Franco wrote: >Hi Peng, Mathieu, > >On Mon, Jul 07, 2025 at 10:13:02AM -0600, Mathieu Poirier wrote: >> On Fri, Jul 04, 2025 at 04:08:16PM -0300, Hiago De Franco wrote: >> > Hi Mathieu, >> > >> > On Fri, Jul 04, 2025 at 10:25:19AM -0600, Mathieu P

Re: [PATCH v3 3/5] remoteproc: imx_rproc: Add support for i.MX95

2025-07-08 Thread Peng Fan
Hi Mathieu, On Tue, Jul 08, 2025 at 10:39:55AM -0600, Mathieu Poirier wrote: >On Wed, Jun 25, 2025 at 10:23:29AM +0800, Peng Fan (OSS) wrote: >> From: Peng Fan >> >> Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping. >> Add i.MX95 of_device_id entry. >&g

RE: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-05 Thread Peng Fan
> Subject: RE: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM > regions > > > Subject: Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM > > regions > > > > Hi Mathieu, > > > > On Fri, Jul 04, 2025 at 10:25:19AM -0600, Mathieu Poirier wrote: > > > Good morning, > > > > > > On Thu, Jul 03,

RE: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-05 Thread Peng Fan
> Subject: Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM > regions > > Hi Mathieu, > > On Fri, Jul 04, 2025 at 10:25:19AM -0600, Mathieu Poirier wrote: > > Good morning, > > > > On Thu, Jul 03, 2025 at 10:08:31AM -0300, Hiago De Franco wrote: > > > From: Hiago De Franco > > > > > > Merg

Re: [PATCH v3 0/5] remoteproc: imx_rproc: Support i.MX95

2025-07-02 Thread Peng Fan
Hi Mathieu, On Wed, Jun 25, 2025 at 10:23:26AM +0800, Peng Fan (OSS) wrote: >i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and >--- >Peng Fan (5): > dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95 > remoteproc: imx_rproc: Add support for Sys

RE: [PATCH v3 5/5] arm64: dts: imx95-19x19-evk: Add CM7 nodes and vdev related memory regions

2025-06-26 Thread Peng Fan
> Subject: Re: [PATCH v3 5/5] arm64: dts: imx95-19x19-evk: Add CM7 > nodes and vdev related memory regions > > On Wed, Jun 25, 2025 at 10:23:31AM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Add CM7 nodes, vdev related memory regions for remoteproc. >

Re: [PATCH v3 0/5] remoteproc: imx_rproc: Support i.MX95

2025-06-25 Thread Peng Fan
Hi Rob, On Wed, Jun 25, 2025 at 03:25:18PM -0500, Rob Herring (Arm) wrote: > >On Wed, 25 Jun 2025 10:23:26 +0800, Peng Fan (OSS) wrote: >> i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and >> one Cortex-M7 core. The System Control Management Interface(SCMI) >>

[PATCH v3 5/5] arm64: dts: imx95-19x19-evk: Add CM7 nodes and vdev related memory regions

2025-06-25 Thread Peng Fan (OSS)
From: Peng Fan Add CM7 nodes, vdev related memory regions for remoteproc. Enable MU7. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 45 +++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts b

[PATCH v3 3/5] remoteproc: imx_rproc: Add support for i.MX95

2025-06-25 Thread Peng Fan (OSS)
From: Peng Fan Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping. Add i.MX95 of_device_id entry. Reviewed-by: Daniel Baluta Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/remoteproc

[PATCH v3 4/5] arm64: dts: imx95: Add SCMI LMM/CPU nodes

2025-06-24 Thread Peng Fan (OSS)
From: Peng Fan Add SCMI LMM/CPU nodes which is for remoteproc to handle remote cores. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx95.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale

[PATCH v3 2/5] remoteproc: imx_rproc: Add support for System Manager API

2025-06-24 Thread Peng Fan (OSS)
From: Peng Fan i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and one Cortex-M7 core. The System Control Management Interface(SCMI) firmware runs on the M33 core. The i.MX95 SCMI firmware named System Manager(SM) includes vendor extension protocols, Logical Machine Management(LMM

[PATCH v3 1/5] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-06-24 Thread Peng Fan (OSS)
From: Peng Fan Add compatible string for the Cortex-M7 core in i.MX95 Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b

[PATCH v3 0/5] remoteproc: imx_rproc: Support i.MX95

2025-06-24 Thread Peng Fan (OSS)
) imx-boot-imx95-19x19-lpddr5-evk-sd.bin-flash_all (M7 not under A55 control) Patchset was tested again with rebase on next-20250623 Patchset is re-based on next-20250603. Thanks for Daniel/Frank helping review the patchset before posting out to list. Signed-off-by: Peng Fan --- Changes in v3: -

RE: [PATCH v2 1/3] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-06-24 Thread Peng Fan
> Subject: Re: [PATCH v2 1/3] dt-bindings: remoteproc: fsl,imx-rproc: > Add support for i.MX95 > > On 06/06/2025 03:55, Peng Fan (OSS) wrote: > >fsl,entry-address: > > $ref: /schemas/types.yaml#/definitions/uint32 > > description: >

Re: [PATCH v2 0/3] remoteproc: imx_rproc: Support i.MX95

2025-06-19 Thread Peng Fan
On Fri, Jun 06, 2025 at 09:55:11AM +0800, Peng Fan (OSS) wrote: >i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and >one Cortex-M7 core. The System Control Management Interface(SCMI) >firmware runs on the M33 core. The i.MX95 SCMI firmware named System >Manager(SM) inc

Re: [PATCH v5 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-19 Thread Peng Fan
domain: core: introduce dev_pm_genpd_is_on() > remoteproc: imx_rproc: skip clock enable when M-core is managed by the >SCU > remoteproc: imx_rproc: detect and attach to pre-booted remote cores Reviewed-by: Peng Fan > > drivers/pmdomain/core.c| 33 +++ > drivers/remoteproc/imx_rproc.c | 41 -- > include/linux/pm_domain.h | 6 + > 3 files changed, 73 insertions(+), 7 deletions(-) > >-- >2.39.5 >

Re: [PATCH v2 1/3] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-06-16 Thread Peng Fan
Hi Daniel, On Mon, Jun 16, 2025 at 04:07:02PM +0300, Daniel Baluta wrote: >On Fri, Jun 6, 2025 at 4:57???AM Peng Fan (OSS) wrote: >> >> From: Peng Fan >> >> i.MX95 has a System Manager(SM) core runs the System Control Management >> Interface(SCMI) firmware. Ve

  1   2   3   4   5   6   7   8   9   10   >