linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@google.com>
To: "allen-kh.cheng" <allen-kh.cheng@mediatek.com>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	cujomalainey@google.com,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	sound-open-firmware@alsa-project.org
Subject: Re: [PATCH v7 2/3] firmware: mediatek: add adsp ipc protocol interface
Date: Mon, 29 Nov 2021 15:11:54 +0800	[thread overview]
Message-ID: <CA+Px+wV8opw7vzuvb5cPJtWFxBO0jdahOqK1jOQZnGLr7MKojA@mail.gmail.com> (raw)
In-Reply-To: <20211129063954.1616-3-allen-kh.cheng@mediatek.com>

On Mon, Nov 29, 2021 at 02:39:53PM +0800, allen-kh.cheng wrote:
> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
> Reviewed-by: AngeloGioacchino Del Regno<angelogioacchino.delregno@collabora.com>
> Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>

Please double check again if you use the R-b tags correctly.  I have provided my R-b tag before but have some more minor comments below.

With the minor comments:
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>

> diff --git a/drivers/firmware/mediatek/mtk-adsp-ipc.c b/drivers/firmware/mediatek/mtk-adsp-ipc.c
[...]
> +int adsp_ipc_send(struct mtk_adsp_ipc *ipc, unsigned int idx, uint32_t op)
> +{
> +     struct mtk_adsp_chan *dsp_chan;
> +     struct adsp_mbox_ch_info *ch_info;
> +     int ret;
> +
> +     if (idx >= MTK_ADSP_MBOX_NUM)
> +             return -EINVAL;
> +
> +     dsp_chan = &ipc->chans[idx];
> +     ch_info = dsp_chan->ch->con_priv;
> +     ch_info->ipc_op_val = op;
> +     ret = mbox_send_message(dsp_chan->ch, NULL);
> +     if (ret < 0)
> +             return ret;
> +
> +     return 0;
> +}
> +EXPORT_SYMBOL(adsp_ipc_send);

To be neat, I think use mtk_adsp for all names looks better.  I.e. s/adsp_ipc_send/mtk_adsp_ipc_send/.

> +static void adsp_ipc_recv(struct mbox_client *c, void *msg)
> +{

Ditto, mtk_adsp_ipc_recv looks better to me.

> diff --git a/include/linux/firmware/mediatek/mtk-adsp-ipc.h b/include/linux/firmware/mediatek/mtk-adsp-ipc.h
[...]
> +struct adsp_mbox_ch_info {
> +     u32 ipc_op_val;
> +     void __iomem *va_reg;
> +};

Ditto, mtk_adsp_mbox_ch_info.

> +static inline void adsp_ipc_set_data(struct mtk_adsp_ipc *ipc, void *data)
> +{

mtk_adsp_ipc_set_data, although there is no use case yet.

> +static inline void *adsp_ipc_get_data(struct mtk_adsp_ipc *ipc)
> +{

mtk_adsp_ipc_get_data, although there is no use case yet.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-11-29  7:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29  6:39 [PATCH v7 0/3] This patches provide ADSP IPC support for MT8195 allen-kh.cheng
2021-11-29  6:39 ` [PATCH v7 1/3] dt-bindings: mediatek: add adsp-mbox document allen-kh.cheng
2021-11-29  7:10   ` Tzung-Bi Shih
2021-11-29  6:39 ` [PATCH v7 2/3] firmware: mediatek: add adsp ipc protocol interface allen-kh.cheng
2021-11-29  7:11   ` Tzung-Bi Shih [this message]
2021-11-29  6:39 ` [PATCH v7 3/3] mailbox: mediatek: add support for adsp mailbox controller allen-kh.cheng
2021-11-29  7:12   ` Tzung-Bi Shih

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=CA+Px+wV8opw7vzuvb5cPJtWFxBO0jdahOqK1jOQZnGLr7MKojA@mail.gmail.com \
    --to=tzungbi@google.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=allen-kh.cheng@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@google.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).