From patchwork Thu Jan 13 08:22:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen-KH Cheng X-Patchwork-Id: 12712389 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 3D165C433F5 for ; Thu, 13 Jan 2022 08:23:49 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XNwRklKvISQKtlc6xjofUKA0y+9ZMFJRm8L1gKj65R8=; b=grXe0nGvG5oC2x FBw5m+wisFUg/lnSW+E6oiHrv0TyfWgB5ii3ER7NhFNzDTjHlM2B1gLchCoK5Q4u/4B9WxHe1SXt9 M5KaO8JwoxMG35m92/7y4T7ZBd0lvcQ5e4cPZXQoutZImbIETjp0O63OcVH19ruof0lWZzwbT0hlw yoO+tAnZkNj6OlGoitOG7EWehPFv18l7HklCvlsgnwFlanpipXBJdLXrS55/sR93tCh2iq8MeNayF YLYNVliULlWZQKw/EK+RwhaQDS2IbrwGg+a6DY6S93cFYlOoXF6hU0TGrhXv41Me0YlDA3vJhhAN8 lSSFw6y5U/yLS1L9JPpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7vNd-0055aJ-6s; Thu, 13 Jan 2022 08:22:45 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7vNZ-0055Z0-AJ; Thu, 13 Jan 2022 08:22:42 +0000 X-UUID: b674ae9a99d546b38e3a7ff788b13ee9-20220113 X-UUID: b674ae9a99d546b38e3a7ff788b13ee9-20220113 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 734629480; Thu, 13 Jan 2022 01:22:39 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Jan 2022 00:22:37 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Jan 2022 16:22:36 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Jan 2022 16:22:36 +0800 From: allen-kh.cheng To: Matthias Brugger , Mark Brown CC: Kevin Hilman , Linux-ALSA , , , Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , , , , , , , Allen-KH Cheng Subject: [PATCH v3 0/1] firmware: mtk: add adsp ipc protocol for sof Date: Thu, 13 Jan 2022 16:22:33 +0800 Message-ID: <20220113082234.29013-1-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220113_002241_392784_557B39FD X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Allen-KH Cheng This patch provides mtk adsp ipc support for sof. ADSP IPC protocol offers (send/recv) interfaces using mediatek-mailbox APIs. changes since v2: - add out tag for two memroy free phases changes since v1: - add comments for mtk_adsp_ipc_send and mtk_adsp_ipc_recv - remove unuseful MODULE_LICENSE - change label name to out_free Allen-KH Cheng (1): firmware: mediatek: add adsp ipc protocol interface drivers/firmware/Kconfig | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/mediatek/Kconfig | 9 + drivers/firmware/mediatek/Makefile | 2 + drivers/firmware/mediatek/mtk-adsp-ipc.c | 160 ++++++++++++++++++ .../linux/firmware/mediatek/mtk-adsp-ipc.h | 65 +++++++ 6 files changed, 238 insertions(+) create mode 100644 drivers/firmware/mediatek/Kconfig create mode 100644 drivers/firmware/mediatek/Makefile create mode 100644 drivers/firmware/mediatek/mtk-adsp-ipc.c create mode 100644 include/linux/firmware/mediatek/mtk-adsp-ipc.h