summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/mediatek/mt8195/mt8195.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:50:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:50:03 +0000
commit01a69402cf9d38ff180345d55c2ee51c7e89fbc7 (patch)
treeb406c5242a088c4f59c6e4b719b783f43aca6ae9 /sound/soc/sof/mediatek/mt8195/mt8195.c
parentAdding upstream version 6.7.12. (diff)
downloadlinux-01a69402cf9d38ff180345d55c2ee51c7e89fbc7.tar.xz
linux-01a69402cf9d38ff180345d55c2ee51c7e89fbc7.zip
Adding upstream version 6.8.9.upstream/6.8.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/soc/sof/mediatek/mt8195/mt8195.c')
-rw-r--r--sound/soc/sof/mediatek/mt8195/mt8195.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c
index cac0a085f..8ee7ee246 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;