From: Mark Brown <broonie@kernel.org>
To: Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com,
peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
daniel.baluta@nxp.com, perex@perex.cz, tiwai@suse.com,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
devicetree@vger.kernel.org, shengjiu.wang@gmail.com,
linux-kernel@vger.kernel.org,
sound-open-firmware@alsa-project.org,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ASoC: SOF: imx: Add i.MX8ULP HW support
Date: Tue, 19 Jul 2022 12:41:47 +0100 [thread overview]
Message-ID: <YtaYe58xS4ynZ+A4@sirena.org.uk> (raw)
In-Reply-To: <1658208367-24376-1-git-send-email-shengjiu.wang@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
On Tue, Jul 19, 2022 at 01:26:06PM +0800, Shengjiu Wang wrote:
Not a thorough review, just a few nitpicks:
> +#define MBOX_SIZE 0x1000
> +
> +struct arm_smccc_res smc_resource;
This should be static shouldn't it?
> +static void imx8ulp_dsp_handle_reply(struct imx_dsp_ipc *ipc)
> +{
> + struct imx8ulp_priv *priv = imx_dsp_get_data(ipc);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&priv->sdev->ipc_lock, flags);
> +
> + imx8ulp_get_reply(priv->sdev);
> + snd_sof_ipc_reply(priv->sdev, 0);
> + spin_unlock_irqrestore(&priv->sdev->ipc_lock, flags);
Minor nitpick but a blank line before the unlock to match the one after
the lock would be a bit easier to read.
> + regmap_update_bits(priv->regmap, SYSCTRL0, EXECUTE_BIT, EXECUTE_BIT);
> + usleep_range(1, 2);
> +
> + arm_smccc_smc(FSL_SIP_HIFI_XRDC, 0, 0, 0, 0, 0, 0, 0, &smc_resource);
You need linux/arm-smccc.h for this (as 0day said).
> + if (ret) {
> + dev_err(&pdev->dev, "failed to init reserved memory region %d\n", ret);
> + goto exit_pdev_unregister;
> + }
> +
> + priv->clks->dsp_clks = imx8ulp_dsp_clks;
> + priv->clks->num_dsp_clks = ARRAY_SIZE(imx8ulp_dsp_clks);
> +
> + ret = imx8_parse_clocks(sdev, priv->clks);
> + if (ret < 0)
> + goto exit_pdev_unregister;
> +
> + ret = imx8_enable_clocks(sdev, priv->clks);
> + if (ret < 0)
> + goto exit_pdev_unregister;
We're registering the platform device before we enable the clocks - is
that safe?
> +static int imx8ulp_remove(struct snd_sof_dev *sdev)
> +{
> + struct imx8ulp_priv *priv = sdev->pdata->hw_pdata;
> +
> + platform_device_unregister(priv->ipc_dev);
> +
> + return 0;
> +}
Could we just use devm? I'm not seeing an ordering issue but I might be
missing something.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-07-19 11:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 5:26 Shengjiu Wang
2022-07-19 5:26 ` [PATCH 2/2] dt-bindings: dsp: fsl: Add SOF compatile string for i.MX8ULP Shengjiu Wang
2022-07-20 22:49 ` Rob Herring
2022-07-19 9:27 ` [PATCH 1/2] ASoC: SOF: imx: Add i.MX8ULP HW support kernel test robot
2022-07-19 11:41 ` Mark Brown [this message]
2022-07-19 14:19 ` Pierre-Louis Bossart
[not found] ` <CAA+D8AM3xwacUg2C-W-TFB4AHbvqd-4bSqRqeFAsmFKseT0zVA@mail.gmail.com>
2022-07-20 13:24 ` Pierre-Louis Bossart
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=YtaYe58xS4ynZ+A4@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=daniel.baluta@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@gmail.com \
--cc=shengjiu.wang@nxp.com \
--cc=sound-open-firmware@alsa-project.org \
--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
all inboxes | Powered by JetHome®