Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6847174rwl; Thu, 29 Dec 2022 22:27:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXtLefs3pRjXTXhpKuwi66YvX/5Bs/FhQ2O8VzvRQc40DEBz9pOotnJf8bwlgGDCobG7s/us X-Received: by 2002:a17:906:6d8:b0:844:79b1:ab36 with SMTP id v24-20020a17090606d800b0084479b1ab36mr25315712ejb.25.1672381675545; Thu, 29 Dec 2022 22:27:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672381675; cv=none; d=google.com; s=arc-20160816; b=oyGaEn/82MAznswNJrao02SJioACQw+1kpVOQ6gZhqgCH5amOIbdeJEq7Upc9X7whZ doxELmqv220gOLiDY/Ece+O2oSwaGZAbYbhNe77sB7oOBLmQlXYxouPqrj4LBg3RJnhe eAbKOceEGkxEW6Ak5gD2G0gg12p900xry1YDOUMHR6mbrg5bQ4rsOl94by46+x3UlCFc RsmMba3mrM8VNXS51eRj3keHO4uo7j4mNJL01q3Eru0fBfqTzCoT0zOQkedSVS2ApO20 2Gg9XCq2Q6D1bp2BSeMfGlIhT/1uXAKYM377SBkYOCc0H+PXJ/eGsJzv2/PIsqaEsznc A0Bg== 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=yX26iQzec7358aC5YQr8w5t6mQVjRl2lmMKuuNXXmIeuCf+iHxuPJJW8DX+1nlehUS WmQjMovkrthfLSSDRD+pDNINzjtVWPQ31v8UyLbnA00Ey5YQuGK0l1Z3d3nZiti+IvTx pMvxWpF5lXjYE73ucYGmZW5WXOI3cxCYO+gDRwWcrD62mSjq6thXpGjeH8+AUBSHJ+M5 9SC6Dm0LOJ8BMWWjeMc2+P5rnmAq7hk+7GIg3VSv3Y5WbG6etu3Vd/OWliRGvUAt1X9s 5Y6cDkiz3reamWeIPNmMxJAHI4lmD2xtdJh1HchAbke9R3KUulp3orJ6Vl/1zGnIO2zf YP9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=K42HJJDj; 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 a21-20020a1709066d5500b007c10d4ceddesi14067456ejt.767.2022.12.29.22.27.40; Thu, 29 Dec 2022 22:27:55 -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=K42HJJDj; 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 S234592AbiL3FzU (ORCPT + 64 others); Fri, 30 Dec 2022 00:55:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbiL3FzC (ORCPT ); Fri, 30 Dec 2022 00:55:02 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE1215820; Thu, 29 Dec 2022 21:54:56 -0800 (PST) X-UUID: 1b852b5aa96748238ef0a974e9a608d2-20221230 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:b55bba3b-95dc-47ce-aab6-9d3eb89d8037,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:3af45ff4-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: 1b852b5aa96748238ef0a974e9a608d2-20221230 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 392936977; Fri, 30 Dec 2022 13:54:49 +0800 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 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