Re: [PATCH v7 2/3] firmware: mediatek: add adsp ipc protocol interface
From: Tzung-Bi Shih <hidden>
Date: 2021-11-29 07:14:02
Also in:
alsa-devel, linux-devicetree, linux-mediatek, lkml
On Mon, Nov 29, 2021 at 02:39:53PM +0800, allen-kh.cheng wrote:
Reviewed-by: Tzung-Bi Shih <redacted> Reviewed-by: AngeloGioacchino Del Regno<angelogioacchino.delregno@collabora.com> Signed-off-by: Allen-KH Cheng <redacted>
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 <redacted>
quoted hunk ↗ jump to hunk
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.
quoted hunk ↗ jump to hunk
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