Skip to content

Commit 5e42522

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 <peter.ujfalusi@linux.intel.com>
1 parent 97bb677 commit 5e42522

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

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
@@ -273,7 +273,7 @@ static int adsp_memory_remap_init(struct device *dev, struct mtk_adsp_chip_info
273273
static int mt8365_run(struct snd_sof_dev *sdev)
274274
{
275275
dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", SRAM_PHYS_BASE_FROM_DSP_VIEW);
276-
sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);
276+
mt8365_sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);
277277

278278
return 0;
279279
}
@@ -306,9 +306,9 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
306306
return -EINVAL;
307307
}
308308

309-
ret = adsp_clock_on(sdev);
309+
ret = mt8365_adsp_clock_on(sdev);
310310
if (ret) {
311-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
311+
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
312312
return -EINVAL;
313313
}
314314

@@ -375,7 +375,7 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
375375
err_adsp_sram_power_off:
376376
adsp_sram_power_on(&pdev->dev, false);
377377
exit_clk_disable:
378-
adsp_clock_off(sdev);
378+
mt8365_adsp_clock_off(sdev);
379379

380380
return ret;
381381
}
@@ -392,7 +392,7 @@ static void mt8365_dsp_remove(struct snd_sof_dev *sdev)
392392

393393
platform_device_unregister(priv->ipc_dev);
394394
adsp_sram_power_on(&pdev->dev, false);
395-
adsp_clock_off(sdev);
395+
mt8365_adsp_clock_off(sdev);
396396
}
397397

398398
static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
@@ -401,7 +401,7 @@ static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
401401
int ret;
402402

403403
/* reset dsp */
404-
sof_hifixdsp_shutdown(sdev);
404+
mt8365_sof_hifixdsp_shutdown(sdev);
405405

406406
/* power down adsp sram */
407407
ret = adsp_sram_power_on(&pdev->dev, false);
@@ -411,17 +411,17 @@ static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
411411
}
412412

413413
/* turn off adsp clock */
414-
return adsp_clock_off(sdev);
414+
return mt8365_adsp_clock_off(sdev);
415415
}
416416

417417
static int mt8365_dsp_resume(struct snd_sof_dev *sdev)
418418
{
419419
int ret;
420420

421421
/* turn on adsp clock */
422-
ret = adsp_clock_on(sdev);
422+
ret = mt8365_adsp_clock_on(sdev);
423423
if (ret) {
424-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
424+
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
425425
return ret;
426426
}
427427

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)