Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp425584rwb; Wed, 7 Dec 2022 20:47:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4eZ/M1Eg9RVaYj2Wanc/Bc4Qen1bHCwllc18mV8bKx/V5EPkfVGQ1bONHYl1XM9bNtlrQu X-Received: by 2002:a17:902:9681:b0:189:9d01:929d with SMTP id n1-20020a170902968100b001899d01929dmr43644017plp.108.1670474861083; Wed, 07 Dec 2022 20:47:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670474861; cv=none; d=google.com; s=arc-20160816; b=lKSnXlApRzsQlIdTVXBo+exUYAr6lia3d9lkzRXP1Zt33mWWzblUWa5Y5rkKvI0tm+ UOJg4uKPTAfLhlQQWmGN2VmV1IjSHE1CEJ1X9t7PznQ4hTS1JPkUL2z6XxjWsBH+FflE iBlJzJWi4/z3CoNc5jWHnxX4WBrltEfV2bwzc4FwBL034eqAM7/3PpLa7oqDaxLvILhx iKghIuNPgNBh65y6SHQpJFrP//vEmpQLeMGWuRhZ6LQDd8s682XFVUuYyYpKUQslUz/Y 4DtxS1uiUQm0RWp8Y8HsQ8M6ojEl/IiNuG/BvudTlwlNV1sSWj/VIsQ8pYm5TLYTRzyR kthA== 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=mYPcs1IOe6NtCzuGcnog0KWdUa2jDExn9rUhH4BHCfo=; b=EcquN6Br0/ke3CMY3cjNYpO79mfIkYI22/j4MoBgcJtow2gABw0HEIynvgMyZyqfhQ GzaPks+sVMb72Uv76AE8+KlSOzB5EtVq4vFhq2bRHPZIPjh7uv1CZdJG+LEKyKaesNGL dUYWxoL/0uhIpoFRUWw2nrq0YZzM1e76+lMVoQSjX4odFlaJotJyUmZ/XwcARlfHv2eO 7QfO5a3oqAKCU7DU8XMq9Y7ZBu0sxVELieBqU5RATZjDEb3wEWWD5YZP37lmYJoesmYh kMpzOwW9mp86vd7lXU34Xwx4oomOVyIzdJwcMrzIsqzx6CfV49zk9tC8FPjJkypIyk9d SJ3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Jp1T3FAc; 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 g8-20020a636b08000000b0047701022c7dsi23218685pgc.729.2022.12.07.20.47.31; Wed, 07 Dec 2022 20:47:41 -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=Jp1T3FAc; 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 S229892AbiLHDcc (ORCPT + 74 others); Wed, 7 Dec 2022 22:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiLHDc1 (ORCPT ); Wed, 7 Dec 2022 22:32:27 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361AF98967; Wed, 7 Dec 2022 19:32:24 -0800 (PST) X-UUID: 442afca1619549f8a561e4a65624635e-20221208 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=mYPcs1IOe6NtCzuGcnog0KWdUa2jDExn9rUhH4BHCfo=; b=Jp1T3FAcfKZaRoKHgWScT7pRnfwDYO7KP7CxX+fCWYDUVGShj+KeYijrR8iSdUDC52Cu5t/QQbSgPTSq9q7PtSfmoCy9Mj0jljLz6x2faQ0ILe3wmsDDZoRMF0vczHcf92TRzte3dax9gJDzBJZjoo8y/K8KnEOZI4sQhVjd+74=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:74291e03-1288-4167-99cc-8aacba38f429,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.14,REQID:74291e03-1288-4167-99cc-8aacba38f429,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:dcaaed0,CLOUDID:b0d5f9d1-652d-43fd-a13a-a5dd3c69a43d,B ulkID:221208113217ZQY7T4FJ,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 X-UUID: 442afca1619549f8a561e4a65624635e-20221208 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2028549348; Thu, 08 Dec 2022 11:32:14 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 8 Dec 2022 11:32:12 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 8 Dec 2022 11:32:12 +0800 From: Trevor Wu To: , , , , , , , CC: , , , , , , , Subject: [PATCH v3 01/12] ASoC: mediatek: common: add SMC ops and SMC CMD Date: Thu, 8 Dec 2022 11:31:37 +0800 Message-ID: <20221208033148.21866-2-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221208033148.21866-1-trevor.wu@mediatek.com> References: <20221208033148.21866-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 --- 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