From patchwork Fri Dec 30 05:54:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?VHJldm9yIFd1ICjlkLPmlofoia8p?= X-Patchwork-Id: 13084122 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 DC1E8C10F1B for ; Fri, 30 Dec 2022 06:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:CC:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5IM+T/EeHPaIjcB5oMvcI/085Imht9mibpgKuwLJpfo=; b=lkv7m3wL++lLUVtrAEX171e2YD xeJQK/NP2UAMUlxGfhV56ri4WDA/P3tssXQBEUp++UuIRVBm5nBS8hKGL9WzYQHvnOjv/nc9itiGM a/K5/W1NtOHddwJWlcoH7qR74vFDwd2O+VHoCyCv7LC0cEe2zfwIdbQVlBmvv3BJUtsODmTzXZhbd OBNIP/tBcl/6J0v2ivlknL7qhidU8Ay62Y+E439n9zrN0AnTC6O8IONORyi+OnfO4J0hQS1rXYbDN kHdC1oFxYs5K4FgpC6wVuq4/tbatnEkUWoRLWpdxWOwXjK14J7pXQDebtE5tF2tnxiBVdzoQr3BXL 2EwpuuEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pB90L-006Uvi-VE; Fri, 30 Dec 2022 06:36:34 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pB8zT-006UZM-O0; Fri, 30 Dec 2022 06:35:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5IM+T/EeHPaIjcB5oMvcI/085Imht9mibpgKuwLJpfo=; b=FmJlsq15YvRJgVN4ocyuv5vCr0 ZDI6HPPphyEIzngcO5cZ5VuaeF1QnFctRqSs9aHXxKmGFuaRgwny9uRA1cGmu+pCbUpEpW0JIq9Sa jQ7XApIgZ4LrvJDS87lB5bw08KicLK9RK4PDzhFi+HlXBsDy9NioiXKZYnN8VksXCR+HvcNIdxCqG ITsfxTgUr4gVxEVW6752J9aVsAfv40ShhLjKFVOTZG0M/AnFBMxj2y0MvacL/j2vkB8N9p1o1icOv SBreZ5/VpSYiRJghLuimTktDFIG00yNjf7eMqpVTkK8PPU/vYMqY5Ul91PnCcczS0UH2H8b/83yjg Z4A7QVDA==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pB8zK-00Gk3V-3D; Fri, 30 Dec 2022 06:35:34 +0000 X-UUID: 194030d443464eb0ae40d8b14a36d24b-20221229 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=5IM+T/EeHPaIjcB5oMvcI/085Imht9mibpgKuwLJpfo=; b=K42HJJDjYR0RLrvIKp+Z0mZDgEtH7ZVt4tTWiH5MTV/6xetxAzMOFHEPBI1y9QIplRhRdPlC9QX8diaGIr8uGdctPCOi/Hl34b94/E8lxNtJPDyNZ13PdjWLU1w2IoS7XkcZl2JDRG6Mo/ifOAXi0fnWz/Xm7DoVs+3DMilxejc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.16,REQID:46f4680a-0fad-4d6d-9fb7-aa1f64fd6101,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:09771b1,CLOUDID:3b2061f4-ff42-4fb0-b929-626456a83c14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: 194030d443464eb0ae40d8b14a36d24b-20221229 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1842567445; Thu, 29 Dec 2022 23:35:25 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 30 Dec 2022 13:54:48 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 30 Dec 2022 13:54:48 +0800 From: Trevor Wu To: , , , , , , , CC: , , , , , , , Subject: [PATCH v4 01/13] ASoC: mediatek: common: add SMC ops and SMC CMD Date: Fri, 30 Dec 2022 13:54:31 +0800 Message-ID: <20221230055443.16024-2-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221230055443.16024-1-trevor.wu@mediatek.com> References: <20221230055443.16024-1-trevor.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221230_063532_250487_72E2EC65 X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org SMC call is required to communicate with ATF for some secure operations, so we add SMC ops IDs and SMC CMD ID to common header. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/common/mtk-base-afe.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/mediatek/common/mtk-base-afe.h b/sound/soc/mediatek/common/mtk-base-afe.h index ef83e78c22a8..f51578b6c50a 100644 --- a/sound/soc/mediatek/common/mtk-base-afe.h +++ b/sound/soc/mediatek/common/mtk-base-afe.h @@ -9,7 +9,26 @@ #ifndef _MTK_BASE_AFE_H_ #define _MTK_BASE_AFE_H_ +#include + #define MTK_STREAM_NUM (SNDRV_PCM_STREAM_LAST + 1) +#define MTK_SIP_AUDIO_CONTROL MTK_SIP_SMC_CMD(0x517) + +/* SMC CALL Operations */ +enum mtk_audio_smc_call_op { + MTK_AUDIO_SMC_OP_INIT = 0, + MTK_AUDIO_SMC_OP_DRAM_REQUEST, + MTK_AUDIO_SMC_OP_DRAM_RELEASE, + MTK_AUDIO_SMC_OP_SRAM_REQUEST, + MTK_AUDIO_SMC_OP_SRAM_RELEASE, + MTK_AUDIO_SMC_OP_ADSP_REQUEST, + MTK_AUDIO_SMC_OP_ADSP_RELEASE, + MTK_AUDIO_SMC_OP_DOMAIN_SIDEBANDS, + MTK_AUDIO_SMC_OP_BTCVSD_WRITE, + MTK_AUDIO_SMC_OP_BTCVSD_UPDATE_CTRL_CLEAR, + MTK_AUDIO_SMC_OP_BTCVSD_UPDATE_CTRL_UNDERFLOW, + MTK_AUDIO_SMC_OP_NUM +}; struct mtk_base_memif_data { int id;