From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56403C433EF for ; Mon, 29 Nov 2021 07:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nSstN9uwNN5Bd/vj+i93ss3HeBEuYhoam32K9ttfxNQ=; b=UG00JwcWJnKkib mFFSXq0ZAHTct+9I+xLwYUHqwLE1ekiIjmNea/BVi8yMLICf9TlzDfK9sMqOY9a+mZBeZNeF4u5w2 eXJ6r/aSBqdMCROhNgEVjocbIq1sf7J1fZ6mLQLw/cgZeKb6d3uAS4BK2OscQiPQo08rwI/gn93Mq CG7Wvt9Ta7/ibhUL0f/I7dzo2oeE/XSBRmBSD4GQR/AJiMxmLRbXhlVrEf9k8cEsk6fT5MXRw6jUk 0h1JpZ5qUfck4o0vFSy9sV0adqcTyz293MekD6loA9V1TI6rgyoUXLT+eUMwQDgvanRkn/QN5By6u iyrz45qlyopRowI96pxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrapY-00HZug-V2; Mon, 29 Nov 2021 07:12:05 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrapU-00HZtD-5O for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 07:12:01 +0000 Received: by mail-pl1-x636.google.com with SMTP id m24so11438063pls.10 for ; Sun, 28 Nov 2021 23:11:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gqKVeAmtJ28Ij4ESFKCTCEHmSmtmFX8yHUJYwywb7ag=; b=byknp2pQnyhSxsju+3ZYpfkAC1hcQDQqoJqM760EFq6VNOQv8X+BnqYuiplE689ts2 mbKbxp+vvTN9i4N+Z16OHd7gaftw1X7rpCkl4Rr6TO3V4XICotc3njsV/SqwM3URK95c GZ8Bq/+u5/FGSuAg+IFHZD8ArKWluJyoXUoFFSqkXIoF9LrYjGuBe2adhZor6ZVeyAYF 5egiGwxvxHOPve0HLQFzORfNbY+kjK/vsEVgd9eZyy3RbAWfktUHUhJEDiZfIj0YGhH3 G7yND1SrWGgF3CDV7IxPqpIhPLKebVFGskbf2PIL0cgkXRx/65PdswFRiBMr5w+U7F31 T+Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gqKVeAmtJ28Ij4ESFKCTCEHmSmtmFX8yHUJYwywb7ag=; b=67rBDS5dfRZk16xn0wPBlpsH9mhkj+V6W2LSN6+32ERlakFaWXkpVzyofu0fFUKUQn gioegBlBDY9vMT0cQy2WXkchnY9QjqLpKllo9VaY0G7nRVWHCSelV8aOQHREfqUsYQol zWCos1k/BwONwH8Gahqbcl8Xf0fdTsvbaPYVbBMlihtCaK5XscVAketrj7PzM77WZndp LuBtbHCDtQMYC90GMsz78slZnnLPZHthmOtdHa8wV9TIT2S7Bweu24gLVdRhJDZELdVH 0jZ5B2pphSiGHOliL6DM0Ldan70gPOzL5AfTw2l9OA5hQMPoDZSOx+0a6evJCiARod4j nrfg== X-Gm-Message-State: AOAM532U3EBa+JVzIR/rGKiv1rPQoLo7BezCp7x+pnzUhuVhclKeVXcR D+SCnKNDHP7HEvZDlMoBlbk2fA== X-Google-Smtp-Source: ABdhPJxrgJOD/gmN8VFUGDa5VdyygIRYVYL060w2qQSdMuiLI7ClSzvocpOzoXnhLbFDwTtBCLNHLg== X-Received: by 2002:a17:90b:17c4:: with SMTP id me4mr36397983pjb.15.1638169919135; Sun, 28 Nov 2021 23:11:59 -0800 (PST) Received: from google.com ([2401:fa00:1:10:3807:fdf3:5573:47d6]) by smtp.gmail.com with ESMTPSA id g20sm17607742pfj.12.2021.11.28.23.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 23:11:58 -0800 (PST) Date: Mon, 29 Nov 2021 15:11:54 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Mark Brown , Rob Herring , Matthias Brugger , Jassi Brar , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , 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 Message-ID: References: <20211129063954.1616-1-allen-kh.cheng@mediatek.com> <20211129063954.1616-3-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211129063954.1616-3-allen-kh.cheng@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211128_231200_265576_61AFCB2D X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 29, 2021 at 02:39:53PM +0800, allen-kh.cheng wrote: > Reviewed-by: Tzung-Bi Shih > Reviewed-by: AngeloGioacchino Del Regno > Signed-off-by: Allen-KH Cheng 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 > 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