[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231103095433.10475-3-trevor.wu@mediatek.com>
Date: Fri, 3 Nov 2023 17:54:31 +0800
From: Trevor Wu <trevor.wu@...iatek.com>
To: <pierre-louis.bossart@...ux.intel.com>,
<peter.ujfalusi@...ux.intel.com>,
<yung-chuan.liao@...ux.intel.com>,
<ranjani.sridharan@...ux.intel.com>,
<kai.vehmanen@...ux.intel.com>, <daniel.baluta@....com>,
<broonie@...nel.org>, <lgirdwood@...il.com>, <tiwai@...e.com>,
<perex@...ex.cz>, <matthias.bgg@...il.com>,
<angelogioacchino.delregno@...labora.com>
CC: <trevor.wu@...iatek.com>, <yc.hung@...iatek.com>,
<sound-open-firmware@...a-project.org>,
<alsa-devel@...a-project.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 2/3] ASoC: SOF: mediatek: mt8186: clean up unused code
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 <trevor.wu@...iatek.com>
Reviewed-by: Yaochun Hung <yc.hung@...iatek.com>
---
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
Powered by blists - more mailing lists