[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CA+Px+wV8opw7vzuvb5cPJtWFxBO0jdahOqK1jOQZnGLr7MKojA@mail.gmail.com>
Date: Mon, 29 Nov 2021 15:11:54 +0800
From: Tzung-Bi Shih <tzungbi@...gle.com>
To: "allen-kh.cheng" <allen-kh.cheng@...iatek.com>
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Jassi Brar <jassisinghbrar@...il.com>,
Linux-ALSA <alsa-devel@...a-project.org>,
cujomalainey@...gle.com,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Daniel Baluta <daniel.baluta@....com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Project_Global_Chrome_Upstream_Group@...iatek.com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
sound-open-firmware@...a-project.org
Subject: Re: [PATCH v7 2/3] firmware: mediatek: add adsp ipc protocol
interface
On Mon, Nov 29, 2021 at 02:39:53PM +0800, allen-kh.cheng wrote:
> Reviewed-by: Tzung-Bi Shih <tzungbi@...gle.com>
> Reviewed-by: AngeloGioacchino Del Regno<angelogioacchino.delregno@...labora.com>
> Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@...iatek.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@...gle.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.
Powered by blists - more mailing lists