]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
remoteproc: imx_rproc: Add runtime ops copy to support dynamic behavior
authorPeng Fan <peng.fan@nxp.com>
Fri, 9 Jan 2026 12:08:02 +0000 (20:08 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 13 Jan 2026 16:46:53 +0000 (09:46 -0700)
commit454cb78611479bd5da4f191480456f42aca7f07b
tree4da0be65637f5c03bc375044c388d8dedaa687ba
parentac3ea0730a1380f00109e69149f3be1a058c4ba9
remoteproc: imx_rproc: Add runtime ops copy to support dynamic behavior

Structure imx_rproc_dcfg contains a const pointer to imx_rproc_plat_ops,
which defines the start/stop/detect_mode operations for a remote processor.
To preserve the const correctness of the static configuration while
allowing runtime modification of ops behavior, introduce a new
imx_rproc_plat_ops member in struct imx_rproc named `ops`.

During initialization, dcfg->ops is assigned to priv->ops.
Enable the driver to safely override ops at runtime without affecting the
original const configuration.

Improve flexibility for platforms that require dynamic operation switching
(e.g. i.MX95 Logical Machine ops and CPU ops).

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20260109-imx95-rproc-2026-1-8-v6-2-d2fefb36263d@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/imx_rproc.c