Skip to content

Commit 632952d

Browse files
committed
fixup! ASoC: SOF: mediatek: Add mt8365 support
Add prefixes to avoid symbol duplication and future proof the code: ld.lld: error: duplicate symbol: __cfi_adsp_clock_off ld.lld: error: duplicate symbol: __cfi_adsp_clock_on ld.lld: error: duplicate symbol: __cfi_sof_hifixdsp_boot_sequence ld.lld: error: duplicate symbol: __cfi_sof_hifixdsp_shutdown ld.lld: error: duplicate symbol: adsp_clock_off ld.lld: error: duplicate symbol: adsp_clock_on ld.lld: error: duplicate symbol: sof_hifixdsp_boot_sequence ld.lld: error: duplicate symbol: sof_hifixdsp_shutdown Signed-off-by: Peter Ujfalusi <[email protected]>
1 parent d3741c2 commit 632952d

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ static int adsp_default_clk_init(struct snd_sof_dev *sdev, bool enable)
163163
return 0;
164164
}
165165

166-
int adsp_clock_on(struct snd_sof_dev *sdev)
166+
int mt8365_adsp_clock_on(struct snd_sof_dev *sdev)
167167
{
168168
/* Open ADSP clock */
169169
return adsp_default_clk_init(sdev, 1);
170170
}
171171

172-
int adsp_clock_off(struct snd_sof_dev *sdev)
172+
int mt8365_adsp_clock_off(struct snd_sof_dev *sdev)
173173
{
174174
/* Close ADSP clock */
175175
return adsp_default_clk_init(sdev, 0);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ enum adsp_clk_id {
2727
};
2828

2929
int mt8365_adsp_init_clock(struct snd_sof_dev *sdev);
30-
int adsp_clock_on(struct snd_sof_dev *sdev);
31-
int adsp_clock_off(struct snd_sof_dev *sdev);
30+
int mt8365_adsp_clock_on(struct snd_sof_dev *sdev);
31+
int mt8365_adsp_clock_off(struct snd_sof_dev *sdev);
3232
#endif

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

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

14-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
14+
void mt8365_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
1515
{
1616
/* ADSP bootup base */
1717
snd_sof_dsp_write(sdev, DSP_REG_BAR, DSP_ALTRESETVEC, boot_addr);
@@ -48,7 +48,7 @@ void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
4848
ADSP_RUNSTALL, 0);
4949
}
5050

51-
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
51+
void mt8365_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
5252
{
5353
/* RUN_STALL pull high again to reset */
5454
snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, DSP_RESET_SW,

sound/soc/sof/mediatek/mt8365/mt8365.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static int adsp_memory_remap_init(struct device *dev, struct mtk_adsp_chip_info
270270
static int mt8365_run(struct snd_sof_dev *sdev)
271271
{
272272
dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", SRAM_PHYS_BASE_FROM_DSP_VIEW);
273-
sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);
273+
mt8365_sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);
274274

275275
return 0;
276276
}
@@ -303,9 +303,9 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
303303
return -EINVAL;
304304
}
305305

306-
ret = adsp_clock_on(sdev);
306+
ret = mt8365_adsp_clock_on(sdev);
307307
if (ret) {
308-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
308+
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
309309
return -EINVAL;
310310
}
311311

@@ -372,7 +372,7 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
372372
err_adsp_sram_power_off:
373373
adsp_sram_power_on(&pdev->dev, false);
374374
exit_clk_disable:
375-
adsp_clock_off(sdev);
375+
mt8365_adsp_clock_off(sdev);
376376

377377
return ret;
378378
}
@@ -389,7 +389,7 @@ static void mt8365_dsp_remove(struct snd_sof_dev *sdev)
389389

390390
platform_device_unregister(priv->ipc_dev);
391391
adsp_sram_power_on(&pdev->dev, false);
392-
adsp_clock_off(sdev);
392+
mt8365_adsp_clock_off(sdev);
393393
}
394394

395395
static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
@@ -398,7 +398,7 @@ static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
398398
int ret;
399399

400400
/* reset dsp */
401-
sof_hifixdsp_shutdown(sdev);
401+
mt8365_sof_hifixdsp_shutdown(sdev);
402402

403403
/* power down adsp sram */
404404
ret = adsp_sram_power_on(&pdev->dev, false);
@@ -408,17 +408,17 @@ static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
408408
}
409409

410410
/* turn off adsp clock */
411-
return adsp_clock_off(sdev);
411+
return mt8365_adsp_clock_off(sdev);
412412
}
413413

414414
static int mt8365_dsp_resume(struct snd_sof_dev *sdev)
415415
{
416416
int ret;
417417

418418
/* turn on adsp clock */
419-
ret = adsp_clock_on(sdev);
419+
ret = mt8365_adsp_clock_on(sdev);
420420
if (ret) {
421-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
421+
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
422422
return ret;
423423
}
424424

sound/soc/sof/mediatek/mt8365/mt8365.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ struct snd_sof_dev;
165165
#define SUSPEND_DSP_IDLE_TIMEOUT_US 1000000 /* timeout to wait dsp idle, 1 sec */
166166
#define SUSPEND_DSP_IDLE_POLL_INTERVAL_US 500 /* 0.5 msec */
167167

168-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
169-
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
168+
void mt8365_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
169+
void mt8365_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
170170
#endif

0 commit comments

Comments
 (0)