Skip to content

Commit 035fa5d

Browse files
tinghan-shenplbossart
authored andcommitted
ASoC: SOF: mediatek: Fix allyesconfig build error
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x18): multiple definition of `adsp_clock_on'; sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x60): first defined here ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function `.adsp_clock_on': ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x30): multiple definition of `adsp_clock_off'; sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x78): first defined here ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function `.adsp_clock_off': ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x0): multiple definition of `sof_hifixdsp_boot_sequence'; sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x0): first defined here ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function `.sof_hifixdsp_boot_sequence': ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x18): multiple definition of `sof_hifixdsp_shutdown'; sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x18): first defined here ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function `.sof_hifixdsp_shutdown': Fixes: 570c14d ("ASoC: SOF: mediatek: Add mt8186 sof fw loader and dsp ops") Fixes: 210b3ab ("ASoC: SOF: mediatek: Add mt8186 dsp clock support") Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
1 parent 95ec8d3 commit 035fa5d

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

sound/soc/sof/mediatek/mt8186/mt8186-clk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void adsp_disable_all_clock(struct snd_sof_dev *sdev)
7474
clk_disable_unprepare(priv->clk[CLK_TOP_AUDIODSP]);
7575
}
7676

77-
int adsp_clock_on(struct snd_sof_dev *sdev)
77+
int mt8186_adsp_clock_on(struct snd_sof_dev *sdev)
7878
{
7979
struct device *dev = sdev->dev;
8080
int ret;
@@ -92,7 +92,7 @@ int adsp_clock_on(struct snd_sof_dev *sdev)
9292
return 0;
9393
}
9494

95-
void adsp_clock_off(struct snd_sof_dev *sdev)
95+
void mt8186_adsp_clock_off(struct snd_sof_dev *sdev)
9696
{
9797
snd_sof_dsp_write(sdev, DSP_REG_BAR, ADSP_CK_EN, 0);
9898
snd_sof_dsp_write(sdev, DSP_REG_BAR, ADSP_UART_CTRL, 0);

sound/soc/sof/mediatek/mt8186/mt8186-clk.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ enum adsp_clk_id {
1919
};
2020

2121
int mt8186_adsp_init_clock(struct snd_sof_dev *sdev);
22-
int adsp_clock_on(struct snd_sof_dev *sdev);
23-
void adsp_clock_off(struct snd_sof_dev *sdev);
22+
int mt8186_adsp_clock_on(struct snd_sof_dev *sdev);
23+
void mt8186_adsp_clock_off(struct snd_sof_dev *sdev);
2424
#endif

sound/soc/sof/mediatek/mt8186/mt8186-loader.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "mt8186.h"
1212
#include "../../ops.h"
1313

14-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
14+
void mt8186_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
1515
{
1616
/* set RUNSTALL to stop core */
1717
snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, ADSP_HIFI_IO_CONFIG,
@@ -39,7 +39,7 @@ void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
3939
RUNSTALL, 0);
4040
}
4141

42-
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
42+
void mt8186_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
4343
{
4444
/* set RUNSTALL to stop core */
4545
snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, ADSP_HIFI_IO_CONFIG,

sound/soc/sof/mediatek/mt8186/mt8186.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static int mt8186_run(struct snd_sof_dev *sdev)
211211

212212
adsp_bootup_addr = SRAM_PHYS_BASE_FROM_DSP_VIEW;
213213
dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", adsp_bootup_addr);
214-
sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr);
214+
mt8186_sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr);
215215

216216
return 0;
217217
}
@@ -284,9 +284,9 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
284284
return ret;
285285
}
286286

287-
ret = adsp_clock_on(sdev);
287+
ret = mt8186_adsp_clock_on(sdev);
288288
if (ret) {
289-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
289+
dev_err(sdev->dev, "mt8186_adsp_clock_on fail!\n");
290290
return ret;
291291
}
292292

@@ -297,18 +297,18 @@ static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
297297

298298
static int mt8186_dsp_remove(struct snd_sof_dev *sdev)
299299
{
300-
sof_hifixdsp_shutdown(sdev);
300+
mt8186_sof_hifixdsp_shutdown(sdev);
301301
adsp_sram_power_off(sdev);
302-
adsp_clock_off(sdev);
302+
mt8186_adsp_clock_off(sdev);
303303

304304
return 0;
305305
}
306306

307307
static int mt8186_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
308308
{
309-
sof_hifixdsp_shutdown(sdev);
309+
mt8186_sof_hifixdsp_shutdown(sdev);
310310
adsp_sram_power_off(sdev);
311-
adsp_clock_off(sdev);
311+
mt8186_adsp_clock_off(sdev);
312312

313313
return 0;
314314
}
@@ -317,9 +317,9 @@ static int mt8186_dsp_resume(struct snd_sof_dev *sdev)
317317
{
318318
int ret;
319319

320-
ret = adsp_clock_on(sdev);
320+
ret = mt8186_adsp_clock_on(sdev);
321321
if (ret) {
322-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
322+
dev_err(sdev->dev, "mt8186_adsp_clock_on fail!\n");
323323
return ret;
324324
}
325325

sound/soc/sof/mediatek/mt8186/mt8186.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ struct snd_sof_dev;
7575
#define SIZE_SHARED_DRAM_UL 0x40000 /*Shared buffer for Uplink*/
7676
#define TOTAL_SIZE_SHARED_DRAM_FROM_TAIL (SIZE_SHARED_DRAM_DL + SIZE_SHARED_DRAM_UL)
7777

78-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
79-
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
78+
void mt8186_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
79+
void mt8186_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
8080
#endif

0 commit comments

Comments
 (0)