Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp357236rdf; Fri, 3 Nov 2023 02:55:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6cIVVNdIK6rjxwv3sI/5Z5synhanOjST56YK+L2RtmtPTx1AaGagoC4cQcJXvROvK+23K X-Received: by 2002:aa7:c1cb:0:b0:540:9d0c:75fc with SMTP id d11-20020aa7c1cb000000b005409d0c75fcmr16152632edp.26.1699005357413; Fri, 03 Nov 2023 02:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699005357; cv=none; d=google.com; s=arc-20160816; b=myXcwgiJJNwZV6hHeIHx7cBVlXMyEjamyLIlMW2V793bOqVKjzd5NGYBUgdpqVXQFR 0bgnNXifwWXURc3iCSm1CIaG6o6lzL0iBWiJWgTWtlQ+Ps+MRzbW13CkZmvEVsje5OL/ 01HvIAo9IioI8vzCKm4XzX5wQd4W2yOaT3I1FKkDwOeW8mt0wu6JiskldRUZ1v7gk528 9/YJbOVAKoKFzqQegIl920HTgdnbvRhO+G6DoNfGXV3VaKxZ1WozyaQRgRaFuDUqKAkW f9ifMsPebkFOxKbkbTA7WauGbhaQ5jdQrYvhSCeX9hNPOQ6X6a8hnYTUCVV3euxlI+JO /dzA== 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=I0Dqa79Xnh2YmZD1oFINboyDlJ0ERnJFDZ0JQm5t2bc=; fh=Bh1cQLy19rqnstV4na6MJ9RqbV9xHSek8gDLqyncuy8=; b=VN4oWKAxFnODtS/icGQUE8FnKhjf/20b+BIHzKGtsTRIfchhKQyCoNLImiT6w4iFzK ZR904t3EmLPSny3RWKB2LnbR7L58Tm4ATRUpg4rzhi3uDgM2dKnq2RHqMryHCrC96hzY XlrxVbAyZu2fOqXysbkoze067QWNkqtAlWt2FkiRvhUtXq4jww+fzn5QQ6NrD/0YAkL1 o9GjqLB7xIPrrDNvNFPKqIR71u0nlXhZpMVMezYevBhmT2VZsVuGyVntISHRXBMI4wJW blJgPEcdSg7zk+vMJL8htxkG1Agm5DqXrHJXZY6EPJqOww56IeykYOEuVvsvBeFQYB+h 3v0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PjnIbpzb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id x10-20020a05640226ca00b00543c69aa7c4si802124edd.135.2023.11.03.02.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:55:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PjnIbpzb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id CB7BF80984B6; Fri, 3 Nov 2023 02:55:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347491AbjKCJzD (ORCPT + 99 others); Fri, 3 Nov 2023 05:55:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347380AbjKCJy7 (ORCPT ); Fri, 3 Nov 2023 05:54:59 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86E6D45 for ; Fri, 3 Nov 2023 02:54:50 -0700 (PDT) X-UUID: 02addc667a2f11eea33bb35ae8d461a2-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=I0Dqa79Xnh2YmZD1oFINboyDlJ0ERnJFDZ0JQm5t2bc=; b=PjnIbpzbkT/927symx1E6USn2UB70EDD0H6ovqxsTrlA1n3Fb4eI/umuJnddGUCuHtmhRwz5C0nTdc4M0pw/WxfgZN4C7mlB2PmpdvbeD09wKqdCkY3G4goVBFk7yuspuAkS56pRAPpaK+zuJkXp2OzkP23gaOdnDN5DhEszm8E=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.33,REQID:d46f80be-d5fe-41f3-aeb4-2719447a3f70,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:a85ea55f-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: 02addc667a2f11eea33bb35ae8d461a2-20231103 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 1817119744; Fri, 03 Nov 2023 17:54:42 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) 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.1118.26; Fri, 3 Nov 2023 17:54:41 +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:41 +0800 From: Trevor Wu To: , , , , , , , , , , , CC: , , , , , , Subject: [PATCH 2/3] ASoC: SOF: mediatek: mt8186: clean up unused code Date: Fri, 3 Nov 2023 17:54:31 +0800 Message-ID: <20231103095433.10475-3-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=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Fri, 03 Nov 2023 02:55:23 -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/mt8186/mt8186.c | 49 -------------------------- 1 file changed, 49 deletions(-) diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index b69fa788b16f..0d2d7d697de0 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.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"); @@ -248,26 +225,6 @@ static int adsp_memory_remap_init(struct snd_sof_dev *sdev, struct mtk_adsp_chip 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 mt8186_run(struct snd_sof_dev *sdev) { u32 adsp_bootup_addr; @@ -324,12 +281,6 @@ static int mt8186_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"); - return ret; - } - sdev->bar[DSP_REG_BAR] = priv->adsp->va_cfgreg; sdev->bar[DSP_SECREG_BAR] = priv->adsp->va_secreg; sdev->bar[DSP_BUSREG_BAR] = priv->adsp->va_busreg; -- 2.18.0