Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2652668rwb; Sun, 15 Jan 2023 19:54:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFOg1uBs04Z9NVVYQzfUU0vril+ruVHKhdfbUmr7o6WElINrPrc6jT2XJGTqrBNftxKRj9 X-Received: by 2002:a17:90a:d30e:b0:228:dac2:3707 with SMTP id p14-20020a17090ad30e00b00228dac23707mr21160745pju.48.1673841243816; Sun, 15 Jan 2023 19:54:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673841243; cv=none; d=google.com; s=arc-20160816; b=dTrMqAKdBpHaypoteCiukJKHeVE/dGCMjcOBMNnEVd7tu8PPeK/RT9cW1nXKW64lvR cWs8sHL1f/vgiOF8/b+IW2renIz4mo+47hS1bY3OB0nm+aZ88kYaEN6xKaDxpN/GSr9t zYlYRiH7e9uwBLWZS+sXgmYu0E6egA+K5uI/Vl4eP/pHbTlYh132smw62YoujTxfk4X3 Y9orDqkYcSLwmsT4BIaxpcbe2+pjO33Qn57HdFk8fTc7eKgoWQlhuMN9Z3xclx/7ti6M u19lUB19HGOUXfCRFGomw5Ud6nrj4LRNJWaDeKQxF818nadyH2bDwUZBzFMbz10RWwse ME0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5IM+T/EeHPaIjcB5oMvcI/085Imht9mibpgKuwLJpfo=; b=WybLlQkr0Uq7UO8+kZ1mivdJDhF5LXWVsisUDAw8VzIv7xXdpMPzU8A23jdX4ADtVF orpAZ8Nj150ad3uHytpjQverEXILNIp0ymUhwGmLQLGpxSX2+DfcIuEyEN7opoLqI9xz qQIgq6aw7AU/zizBi9JE6oGXLRNqZjw0GJkK8P5HpK9/uYn7bd/8QNO9U423Zb8PifT5 ktb7Rwm83Mg8bpO/i3mmI2bWwI+G9Vjb7wTdvI1sknMaivWduoGuO5b6Fjv/waozeAZ4 2aLSh/D/0YjhP0gMT1S60dRxP3UGx3P+zI/woQ9A6JZBYc8rAM+RIGJPO0A8i9ciivhD rdgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LvfjkRQr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me13-20020a17090b17cd00b00226f47d5d57si28382307pjb.72.2023.01.15.19.53.56; Sun, 15 Jan 2023 19:54:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LvfjkRQr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjAPDlp (ORCPT + 54 others); Sun, 15 Jan 2023 22:41:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbjAPDln (ORCPT ); Sun, 15 Jan 2023 22:41:43 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC41C72AE; Sun, 15 Jan 2023 19:41:41 -0800 (PST) X-UUID: ad7032c2954f11eda06fc9ecc4dadd91-20230116 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=LvfjkRQrRKlM3+Rt1TWINuXF6i9AhlZzJ0T5lorYFx80ovpb2uP4DAUJYo76j7kItZHCBnaGT91Y/qNFGy7fxJ9dedckMJHI95GOqqAilTeO32eZZMiXg73m9gnaQOaSIK8aQp9Y2DcHBQvaOobdNgDJL3AnR+7Woxt8TPDToeA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:18fad5aa-4396-4e59-ad53-51486c3d5e0f,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.17,REQID:18fad5aa-4396-4e59-ad53-51486c3d5e0f,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:543e81c,CLOUDID:5ff1bb54-dd49-462e-a4be-2143a3ddc739,B ulkID:2301161141381FL6OTTB,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-APTURL: Status:success,Category:nil,Trust:0,Unknown:0,Malicious:0 X-CID-BVR: 0 X-UUID: ad7032c2954f11eda06fc9ecc4dadd91-20230116 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 648632269; Mon, 16 Jan 2023 11:41:36 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 16 Jan 2023 11:41:35 +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; Mon, 16 Jan 2023 11:41:35 +0800 From: Trevor Wu To: , , , , , , , CC: , , , , , , , Subject: [RESEND,v5 01/13] ASoC: mediatek: common: add SMC ops and SMC CMD Date: Mon, 16 Jan 2023 11:41:19 +0800 Message-ID: <20230116034131.23943-2-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230116034131.23943-1-trevor.wu@mediatek.com> References: <20230116034131.23943-1-trevor.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; -- 2.18.0