Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp356953rdf; Fri, 3 Nov 2023 02:55:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEU5Ci1Iy0/5b3sfGLIEyonxSCvXy1A1oPfB3HZCp1ynVuz6JQDYprpWgL7T1NGmM0EfdxL X-Received: by 2002:a54:411a:0:b0:3a0:41d4:b144 with SMTP id l26-20020a54411a000000b003a041d4b144mr22203550oic.1.1699005300667; Fri, 03 Nov 2023 02:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699005300; cv=none; d=google.com; s=arc-20160816; b=g+Xkdm2Idr5CUrCHORlreNvMk7wsBz5D4OVMGVGlKvdi82jVc8cXtloSQnM5Y8Fhx1 RGdH0Rqzk5phUJscnkPRkkbrf00Mx2FuwA/FiXtl/8++X/tFUgDmIOlkGIv14s8YL8D8 uMx4IwFnImNzkYlQfO2laPNMA+UReNb//+ANkyiNEBethfUM04MWNXHF0Hia8wXgwKc6 LXO7GeMCSkNDvqSMMRk603nUE5or5PbQRlWKWwnXMRpAtInaldLsTQizeWIOYrYL/nen Im291qAhoFnLM/fJvrHmcOQmqtlCLwrzbRHVhDMA75aqRGTZHzIFeAV1xT+jjdt+LN9N UBeA== 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=1PNy4lQFDD/9P/cCBJ+oFYmFIxu9jH1NPA/0OOwYEBQ=; fh=Bh1cQLy19rqnstV4na6MJ9RqbV9xHSek8gDLqyncuy8=; b=KVkURV/8t7Te2OB0SK9EKeTG5U8OCcQcFe+i0+dnf45oG6NR4T7EBHnhdDyP8berTa stJSi24XvmZm6W5f/jlRZHwjYPrtwLH1tqhtH+X6CdXFZqwcz4uheTcdBXZL3/aLDGr7 Q5FYtClYCrqb0ahInB1aUyqGbafjjJhJrX0EIwjlvQYYWAXedPxWHMSQbC7XAJ65p47C lnLA5wI/vhtGUtYcBTBSdb0e7t4cgxUT6Wn7JDxItsMsd4q5gywqVCg7/Icb8Vmu+mUW ckkcoOHx6hpxcWDHtbyPK6K6omRzCMBDS/AQKK1XdHp0sI5TNGvp6IVaxl6Pj802EJk/ PqoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=exflmBaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q14-20020a056a00088e00b006bdf4d02453si1275584pfj.145.2023.11.03.02.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:55:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=exflmBaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B816A83896D4; Fri, 3 Nov 2023 02:54:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347442AbjKCJy6 (ORCPT + 99 others); Fri, 3 Nov 2023 05:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347380AbjKCJyz (ORCPT ); Fri, 3 Nov 2023 05:54:55 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8CCB1BD for ; Fri, 3 Nov 2023 02:54:49 -0700 (PDT) X-UUID: 029a1fa07a2f11eea33bb35ae8d461a2-20231103 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=1PNy4lQFDD/9P/cCBJ+oFYmFIxu9jH1NPA/0OOwYEBQ=; b=exflmBaW3pz4CX2PxrtXv6Ox93ybXp7gYvw0C2Hf/j+fmS20+kWNvHhUvRctBFoPr6UFcFvfBW/sOGZkhryEkqlFJxWagYg1nzRrrfIrNad1EdHdSzIXUoG/6C4APWhiIX3uWZB3w8lswXZMZKaTRlPBinusRfe3gTjnaSG4Cdo=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.33,REQID:84f5920e-a7b2-4fae-8d45-4a812c825796,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:364b77b,CLOUDID:a75ea55f-c89d-4129-91cb-8ebfae4653fc,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,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 029a1fa07a2f11eea33bb35ae8d461a2-20231103 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 859796463; Fri, 03 Nov 2023 17:54:42 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 3 Nov 2023 17:54:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 3 Nov 2023 17:54:40 +0800 From: Trevor Wu To: , , , , , , , , , , , CC: , , , , , , Subject: [PATCH 1/3] ASoC: SOF: mediatek: mt8195: clean up unused code Date: Fri, 3 Nov 2023 17:54:30 +0800 Message-ID: <20231103095433.10475-2-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231103095433.10475-1-trevor.wu@mediatek.com> References: <20231103095433.10475-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_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 02:54:59 -0700 (PDT) Since there are some variables that are no longer being used, we remove the code that was implemented for those variables. Signed-off-by: Trevor Wu Reviewed-by: Yaochun Hung --- sound/soc/sof/mediatek/mt8195/mt8195.c | 49 -------------------------- 1 file changed, 49 deletions(-) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index cac0a085f60a..8ee7ee246344 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -96,29 +96,6 @@ static int platform_parse_resource(struct platform_device *pdev, void *data) struct mtk_adsp_chip_info *adsp = data; int ret; - mem_region = of_parse_phandle(dev->of_node, "memory-region", 0); - if (!mem_region) { - dev_err(dev, "no dma memory-region phandle\n"); - return -ENODEV; - } - - ret = of_address_to_resource(mem_region, 0, &res); - of_node_put(mem_region); - if (ret) { - dev_err(dev, "of_address_to_resource dma failed\n"); - return ret; - } - - dev_dbg(dev, "DMA %pR\n", &res); - - adsp->pa_shared_dram = (phys_addr_t)res.start; - adsp->shared_size = resource_size(&res); - if (adsp->pa_shared_dram & DRAM_REMAP_MASK) { - dev_err(dev, "adsp shared dma memory(%#x) is not 4K-aligned\n", - (u32)adsp->pa_shared_dram); - return -EINVAL; - } - ret = of_reserved_mem_device_init(dev); if (ret) { dev_err(dev, "of_reserved_mem_device_init failed\n"); @@ -238,26 +215,6 @@ static int adsp_memory_remap_init(struct device *dev, struct mtk_adsp_chip_info return 0; } -static int adsp_shared_base_ioremap(struct platform_device *pdev, void *data) -{ - struct device *dev = &pdev->dev; - struct mtk_adsp_chip_info *adsp = data; - - /* remap shared-dram base to be non-cachable */ - adsp->shared_dram = devm_ioremap(dev, adsp->pa_shared_dram, - adsp->shared_size); - if (!adsp->shared_dram) { - dev_err(dev, "failed to ioremap base %pa size %#x\n", - adsp->shared_dram, adsp->shared_size); - return -ENOMEM; - } - - dev_dbg(dev, "shared-dram vbase=%p, phy addr :%pa, size=%#x\n", - adsp->shared_dram, &adsp->pa_shared_dram, adsp->shared_size); - - return 0; -} - static int mt8195_run(struct snd_sof_dev *sdev) { u32 adsp_bootup_addr; @@ -338,12 +295,6 @@ static int mt8195_dsp_probe(struct snd_sof_dev *sdev) } priv->adsp->va_dram = sdev->bar[SOF_FW_BLK_TYPE_SRAM]; - ret = adsp_shared_base_ioremap(pdev, priv->adsp); - if (ret) { - dev_err(sdev->dev, "adsp_shared_base_ioremap fail!\n"); - goto err_adsp_sram_power_off; - } - sdev->bar[DSP_REG_BAR] = priv->adsp->va_cfgreg; sdev->mmio_bar = SOF_FW_BLK_TYPE_SRAM; -- 2.18.0