[PATCH 00/11] remoteproc: imx_dsp_rproc: Refactor to use new ops and remove switch-case logic

Peng Fan posted 11 patches 3 months, 1 week ago
There is a newer version of this series
drivers/remoteproc/imx_dsp_rproc.c | 344 ++++++++++++++++++++-----------------
drivers/remoteproc/imx_rproc.h     |  14 --
2 files changed, 184 insertions(+), 174 deletions(-)
[PATCH 00/11] remoteproc: imx_dsp_rproc: Refactor to use new ops and remove switch-case logic
Posted by Peng Fan 3 months, 1 week ago
This patchset aligns imx_dsp_rproc with the cleanup and modernization
previously applied to imx_rproc.c. The goal is to simplify the driver by
transitioning to the new ops-based method, eliminating the legacy
switch-case logic for a cleaner and more maintainable design.

Patches 1–5: General cleanup, including code simplification and adoption
             of the devres API.
Patches 6–10: Transition to the new ops-based approach, removing the
              switch-case structure.
Patch 11: Remove the obsolete enum imx_rproc_method.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (11):
      remoteproc: imx_dsp_rproc: simplify power domain attach and error handling
      remoteproc: imx_dsp_rproc: Use devm_rproc_add() helper
      remoteproc: imx_dsp_rproc: Use devm_pm_runtime_enable() helper
      remoteproc: imx_dsp_rproc: Use dev_err_probe() for firmware and mode errors
      remoteproc: imx_dsp_rproc: Drop extra space
      remoteproc: imx_dsp_rproc: Use start/stop/detect_mode ops from imx_rproc_dcfg
      remoteproc: imx_dsp_rproc: Move imx_dsp_rproc_dcfg closer to imx_dsp_rproc_of_match
      remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_MMIO switch case
      remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_SCU_API switch case
      remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_RESET_CONTROLLER switch case
      remoteproc: imx_rproc: Remove enum imx_rproc_method

 drivers/remoteproc/imx_dsp_rproc.c | 344 ++++++++++++++++++++-----------------
 drivers/remoteproc/imx_rproc.h     |  14 --
 2 files changed, 184 insertions(+), 174 deletions(-)
---
base-commit: 131f3d9446a6075192cdd91f197989d98302faa6
change-id: 20251031-imx-dsp-2025-10-31-260b2b979258

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>

Re: [PATCH 00/11] remoteproc: imx_dsp_rproc: Refactor to use new ops and remove switch-case logic
Posted by Shengjiu Wang 3 months ago
On Fri, Oct 31, 2025 at 5:14 PM Peng Fan <peng.fan@nxp.com> wrote:
>
> This patchset aligns imx_dsp_rproc with the cleanup and modernization
> previously applied to imx_rproc.c. The goal is to simplify the driver by
> transitioning to the new ops-based method, eliminating the legacy
> switch-case logic for a cleaner and more maintainable design.
>
> Patches 1–5: General cleanup, including code simplification and adoption
>              of the devres API.
> Patches 6–10: Transition to the new ops-based approach, removing the
>               switch-case structure.
> Patch 11: Remove the obsolete enum imx_rproc_method.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Best regards
Shengjiu wang
> ---
> Peng Fan (11):
>       remoteproc: imx_dsp_rproc: simplify power domain attach and error handling
>       remoteproc: imx_dsp_rproc: Use devm_rproc_add() helper
>       remoteproc: imx_dsp_rproc: Use devm_pm_runtime_enable() helper
>       remoteproc: imx_dsp_rproc: Use dev_err_probe() for firmware and mode errors
>       remoteproc: imx_dsp_rproc: Drop extra space
>       remoteproc: imx_dsp_rproc: Use start/stop/detect_mode ops from imx_rproc_dcfg
>       remoteproc: imx_dsp_rproc: Move imx_dsp_rproc_dcfg closer to imx_dsp_rproc_of_match
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_MMIO switch case
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_SCU_API switch case
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_RESET_CONTROLLER switch case
>       remoteproc: imx_rproc: Remove enum imx_rproc_method
>
>  drivers/remoteproc/imx_dsp_rproc.c | 344 ++++++++++++++++++++-----------------
>  drivers/remoteproc/imx_rproc.h     |  14 --
>  2 files changed, 184 insertions(+), 174 deletions(-)
> ---
> base-commit: 131f3d9446a6075192cdd91f197989d98302faa6
> change-id: 20251031-imx-dsp-2025-10-31-260b2b979258
>
> Best regards,
> --
> Peng Fan <peng.fan@nxp.com>
>
>
Re: [PATCH 00/11] remoteproc: imx_dsp_rproc: Refactor to use new ops and remove switch-case logic
Posted by Daniel Baluta 3 months ago
On Fri, Oct 31, 2025 at 11:20 AM Peng Fan <peng.fan@nxp.com> wrote:
>
> This patchset aligns imx_dsp_rproc with the cleanup and modernization
> previously applied to imx_rproc.c. The goal is to simplify the driver by
> transitioning to the new ops-based method, eliminating the legacy
> switch-case logic for a cleaner and more maintainable design.
>
> Patches 1–5: General cleanup, including code simplification and adoption
>              of the devres API.
> Patches 6–10: Transition to the new ops-based approach, removing the
>               switch-case structure.
> Patch 11: Remove the obsolete enum imx_rproc_method.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> Peng Fan (11):
>       remoteproc: imx_dsp_rproc: simplify power domain attach and error handling
>       remoteproc: imx_dsp_rproc: Use devm_rproc_add() helper
>       remoteproc: imx_dsp_rproc: Use devm_pm_runtime_enable() helper
>       remoteproc: imx_dsp_rproc: Use dev_err_probe() for firmware and mode errors
>       remoteproc: imx_dsp_rproc: Drop extra space
>       remoteproc: imx_dsp_rproc: Use start/stop/detect_mode ops from imx_rproc_dcfg
>       remoteproc: imx_dsp_rproc: Move imx_dsp_rproc_dcfg closer to imx_dsp_rproc_of_match
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_MMIO switch case
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_SCU_API switch case
>       remoteproc: imx_dsp_rproc: Simplify IMX_RPROC_RESET_CONTROLLER switch case
>       remoteproc: imx_rproc: Remove enum imx_rproc_method

Thanks Peng patchseries looks good to me.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>