Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Iuliana Prodan <iuliana.prodan@nxp.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	imx@lists.linux.dev
Subject: Re: [PATCH v2 4/8] ASoC: SOF: imx8: shuffle structure and function definitions
Date: Thu, 6 Feb 2025 11:18:00 -0500	[thread overview]
Message-ID: <Z6TguAqGRS3eDhqa@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250205203022.2754-5-laurentiumihalcea111@gmail.com>

On Wed, Feb 05, 2025 at 03:30:18PM -0500, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Shuffle the definitions of some structures and functions such that
> they are better grouped. This is purely a cosmetic change.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>

I don't think this patch is neccessary. It have not look better after
change position.

Frank

> ---
>  sound/soc/sof/imx/imx8.c | 86 ++++++++++++++++++++--------------------
>  1 file changed, 43 insertions(+), 43 deletions(-)
>
> diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
> index 52dff369d9cf..5d6524d695e2 100644
> --- a/sound/soc/sof/imx/imx8.c
> +++ b/sound/soc/sof/imx/imx8.c
> @@ -41,6 +41,49 @@
>  #define MBOX_OFFSET	0x800000
>  #define MBOX_SIZE	0x1000
>
> +static struct snd_soc_dai_driver imx8_dai[] = {
> +	IMX_SOF_DAI_DRV_ENTRY_BIDIR("esai0", 1, 8),
> +	IMX_SOF_DAI_DRV_ENTRY_BIDIR("sai1", 1, 32),
> +};
> +
> +static struct snd_sof_dsp_ops sof_imx8_ops;
> +
> +static int imx8_ops_init(struct snd_sof_dev *sdev)
> +{
> +	/* first copy from template */
> +	memcpy(&sof_imx8_ops, &sof_imx_ops, sizeof(sof_imx_ops));
> +
> +	/* then set common imx8 ops */
> +	sof_imx8_ops.dbg_dump = imx8_dump;
> +	sof_imx8_ops.dsp_arch_ops = &sof_xtensa_arch_ops;
> +	sof_imx8_ops.debugfs_add_region_item =
> +		snd_sof_debugfs_add_region_item_iomem;
> +
> +	/* ... and finally set DAI driver */
> +	sof_imx8_ops.drv = get_chip_info(sdev)->drv;
> +	sof_imx8_ops.num_drv = get_chip_info(sdev)->num_drv;
> +
> +	return 0;
> +}
> +
> +static int imx8_probe(struct snd_sof_dev *sdev)
> +{
> +	struct imx_sc_ipc *sc_ipc_handle;
> +	struct imx_common_data *common;
> +	int ret;
> +
> +	common = sdev->pdata->hw_pdata;
> +
> +	ret = imx_scu_get_handle(&sc_ipc_handle);
> +	if (ret < 0)
> +		return dev_err_probe(sdev->dev, ret,
> +				     "failed to fetch SC IPC handle\n");
> +
> +	common->chip_pdata = sc_ipc_handle;
> +
> +	return 0;
> +}
> +
>  /*
>   * DSP control.
>   */
> @@ -100,49 +143,6 @@ static int imx8_run(struct snd_sof_dev *sdev)
>  	return 0;
>  }
>
> -static int imx8_probe(struct snd_sof_dev *sdev)
> -{
> -	struct imx_sc_ipc *sc_ipc_handle;
> -	struct imx_common_data *common;
> -	int ret;
> -
> -	common = sdev->pdata->hw_pdata;
> -
> -	ret = imx_scu_get_handle(&sc_ipc_handle);
> -	if (ret < 0)
> -		return dev_err_probe(sdev->dev, ret,
> -				     "failed to fetch SC IPC handle\n");
> -
> -	common->chip_pdata = sc_ipc_handle;
> -
> -	return 0;
> -}
> -
> -static struct snd_soc_dai_driver imx8_dai[] = {
> -	IMX_SOF_DAI_DRV_ENTRY_BIDIR("esai0", 1, 8),
> -	IMX_SOF_DAI_DRV_ENTRY_BIDIR("sai1", 1, 32),
> -};
> -
> -static struct snd_sof_dsp_ops sof_imx8_ops;
> -
> -static int imx8_ops_init(struct snd_sof_dev *sdev)
> -{
> -	/* first copy from template */
> -	memcpy(&sof_imx8_ops, &sof_imx_ops, sizeof(sof_imx_ops));
> -
> -	/* then set common imx8 ops */
> -	sof_imx8_ops.dbg_dump = imx8_dump;
> -	sof_imx8_ops.dsp_arch_ops = &sof_xtensa_arch_ops;
> -	sof_imx8_ops.debugfs_add_region_item =
> -		snd_sof_debugfs_add_region_item_iomem;
> -
> -	/* ... and finally set DAI driver */
> -	sof_imx8_ops.drv = get_chip_info(sdev)->drv;
> -	sof_imx8_ops.num_drv = get_chip_info(sdev)->num_drv;
> -
> -	return 0;
> -}
> -
>  static const struct imx_chip_ops imx8_chip_ops = {
>  	.probe = imx8_probe,
>  	.core_kick = imx8_run,
> --
> 2.34.1
>

  reply	other threads:[~2025-02-06 16:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 20:30 [PATCH v2 0/8] Refactor imx drivers and introduce support for imx95 Laurentiu Mihalcea
2025-02-05 20:30 ` [PATCH v2 1/8] ASoC: SOF: imx: introduce more common structures and functions Laurentiu Mihalcea
2025-02-06 16:05   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 2/8] ASoC: SOF: imx8: use common imx chip interface Laurentiu Mihalcea
2025-02-06 16:11   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 3/8] ASoC: SOF: imx8: use IMX_SOF_* macros Laurentiu Mihalcea
2025-02-06 16:13   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 4/8] ASoC: SOF: imx8: shuffle structure and function definitions Laurentiu Mihalcea
2025-02-06 16:18   ` Frank Li [this message]
2025-02-06 17:28     ` Mark Brown
2025-02-05 20:30 ` [PATCH v2 5/8] ASoC: SOF: imx8: drop unneeded/unused macros/header includes Laurentiu Mihalcea
2025-02-06 16:18   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 6/8] ASoC: SOF: imx: merge imx8 and imx8m drivers Laurentiu Mihalcea
2025-02-06 16:26   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 7/8] ASoC: SOF: imx: merge imx8 and imx8ulp drivers Laurentiu Mihalcea
2025-02-06 16:28   ` Frank Li
2025-02-05 20:30 ` [PATCH v2 8/8] ASoC: SOF: imx: add driver for the imx95 chip Laurentiu Mihalcea
2025-02-06 16:29   ` Frank Li
2025-02-10 16:30 ` (subset) [PATCH v2 0/8] Refactor imx drivers and introduce support for imx95 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z6TguAqGRS3eDhqa@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=iuliana.prodan@nxp.com \
    --cc=laurentiumihalcea111@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox