lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQUIeks23Dq8e4wF@lizhi-Precision-Tower-5810>
Date: Fri, 31 Oct 2025 15:05:30 -0400
From: Frank Li <Frank.li@....com>
To: Peng Fan <peng.fan@....com>
Cc: Bjorn Andersson <andersson@...nel.org>,
	Mathieu Poirier <mathieu.poirier@...aro.org>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	Shengjiu Wang <shengjiu.wang@....com>,
	Daniel Baluta <daniel.baluta@....com>,
	Iuliana Prodan <iuliana.prodan@....com>,
	linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/11] remoteproc: imx_dsp_rproc: Move imx_dsp_rproc_dcfg
 closer to imx_dsp_rproc_of_match

On Fri, Oct 31, 2025 at 05:08:36PM +0800, Peng Fan wrote:
> Move the imx_dsp_rproc_dcfg structure definitions closer to
> imx_dsp_rproc_of_match to prepare for adding start/stop/detect_mode ops for
> each i.MX variant.
>
> Avoids the need to declare function prototypes such as
> 'static int imx_dsp_rproc_mbox_init(struct imx_dsp_rproc *priv)' at the
> beginning of the file, improving code organization and readability.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@....com>

Reviewed-by: Frank Li <Frank.Li@....com>

> ---
>  drivers/remoteproc/imx_dsp_rproc.c | 100 ++++++++++++++++++-------------------
>  1 file changed, 50 insertions(+), 50 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index 833b1bd4019614157f0bedf09bd348caab802eef..f28d25cab3f1d89e5cde37a04b528870a59abeed 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -261,56 +261,6 @@ static int imx8ulp_dsp_reset(struct imx_dsp_rproc *priv)
>  	return 0;
>  }
>
> -/* Specific configuration for i.MX8MP */
> -static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8mp = {
> -	.att		= imx_dsp_rproc_att_imx8mp,
> -	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8mp),
> -	.method		= IMX_RPROC_RESET_CONTROLLER,
> -};
> -
> -static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8mp = {
> -	.dcfg		= &dsp_rproc_cfg_imx8mp,
> -	.reset          = imx8mp_dsp_reset,
> -};
> -
> -/* Specific configuration for i.MX8ULP */
> -static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8ulp = {
> -	.src_reg	= IMX8ULP_SIM_LPAV_REG_SYSCTRL0,
> -	.src_mask	= IMX8ULP_SYSCTRL0_DSP_STALL,
> -	.src_start	= 0,
> -	.src_stop	= IMX8ULP_SYSCTRL0_DSP_STALL,
> -	.att		= imx_dsp_rproc_att_imx8ulp,
> -	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8ulp),
> -	.method		= IMX_RPROC_MMIO,
> -};
> -
> -static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8ulp = {
> -	.dcfg		= &dsp_rproc_cfg_imx8ulp,
> -	.reset          = imx8ulp_dsp_reset,
> -};
> -
> -/* Specific configuration for i.MX8QXP */
> -static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8qxp = {
> -	.att		= imx_dsp_rproc_att_imx8qxp,
> -	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8qxp),
> -	.method		= IMX_RPROC_SCU_API,
> -};
> -
> -static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8qxp = {
> -	.dcfg		= &dsp_rproc_cfg_imx8qxp,
> -};
> -
> -/* Specific configuration for i.MX8QM */
> -static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8qm = {
> -	.att		= imx_dsp_rproc_att_imx8qm,
> -	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8qm),
> -	.method		= IMX_RPROC_SCU_API,
> -};
> -
> -static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8qm = {
> -	.dcfg		= &dsp_rproc_cfg_imx8qm,
> -};
> -
>  static int imx_dsp_rproc_ready(struct rproc *rproc)
>  {
>  	struct imx_dsp_rproc *priv = rproc->priv;
> @@ -1351,6 +1301,56 @@ static const struct dev_pm_ops imx_dsp_rproc_pm_ops = {
>  	RUNTIME_PM_OPS(imx_dsp_runtime_suspend, imx_dsp_runtime_resume, NULL)
>  };
>
> +/* Specific configuration for i.MX8MP */
> +static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8mp = {
> +	.att		= imx_dsp_rproc_att_imx8mp,
> +	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8mp),
> +	.method		= IMX_RPROC_RESET_CONTROLLER,
> +};
> +
> +static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8mp = {
> +	.dcfg		= &dsp_rproc_cfg_imx8mp,
> +	.reset          = imx8mp_dsp_reset,
> +};
> +
> +/* Specific configuration for i.MX8ULP */
> +static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8ulp = {
> +	.src_reg	= IMX8ULP_SIM_LPAV_REG_SYSCTRL0,
> +	.src_mask	= IMX8ULP_SYSCTRL0_DSP_STALL,
> +	.src_start	= 0,
> +	.src_stop	= IMX8ULP_SYSCTRL0_DSP_STALL,
> +	.att		= imx_dsp_rproc_att_imx8ulp,
> +	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8ulp),
> +	.method		= IMX_RPROC_MMIO,
> +};
> +
> +static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8ulp = {
> +	.dcfg		= &dsp_rproc_cfg_imx8ulp,
> +	.reset          = imx8ulp_dsp_reset,
> +};
> +
> +/* Specific configuration for i.MX8QXP */
> +static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8qxp = {
> +	.att		= imx_dsp_rproc_att_imx8qxp,
> +	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8qxp),
> +	.method		= IMX_RPROC_SCU_API,
> +};
> +
> +static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8qxp = {
> +	.dcfg		= &dsp_rproc_cfg_imx8qxp,
> +};
> +
> +/* Specific configuration for i.MX8QM */
> +static const struct imx_rproc_dcfg dsp_rproc_cfg_imx8qm = {
> +	.att		= imx_dsp_rproc_att_imx8qm,
> +	.att_size	= ARRAY_SIZE(imx_dsp_rproc_att_imx8qm),
> +	.method		= IMX_RPROC_SCU_API,
> +};
> +
> +static const struct imx_dsp_rproc_dcfg imx_dsp_rproc_cfg_imx8qm = {
> +	.dcfg		= &dsp_rproc_cfg_imx8qm,
> +};
> +
>  static const struct of_device_id imx_dsp_rproc_of_match[] = {
>  	{ .compatible = "fsl,imx8qxp-hifi4", .data = &imx_dsp_rproc_cfg_imx8qxp },
>  	{ .compatible = "fsl,imx8qm-hifi4",  .data = &imx_dsp_rproc_cfg_imx8qm },
>
> --
> 2.37.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ