Skip to content

Commit d3741c2

Browse files
committed
ASoC: SOF: mediatek: mt8195: Add prefixes to avoid duplicate symbols
Follow the example of mt8186 and add prefixes to functions to future proof the code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 806274d commit d3741c2

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

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

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

154-
int adsp_clock_on(struct snd_sof_dev *sdev)
154+
int mt8195_adsp_clock_on(struct snd_sof_dev *sdev)
155155
{
156156
/* Open ADSP clock */
157157
return adsp_default_clk_init(sdev, 1);
158158
}
159159

160-
int adsp_clock_off(struct snd_sof_dev *sdev)
160+
int mt8195_adsp_clock_off(struct snd_sof_dev *sdev)
161161
{
162162
/* Close ADSP clock */
163163
return adsp_default_clk_init(sdev, 0);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ enum adsp_clk_id {
2323
};
2424

2525
int mt8195_adsp_init_clock(struct snd_sof_dev *sdev);
26-
int adsp_clock_on(struct snd_sof_dev *sdev);
27-
int adsp_clock_off(struct snd_sof_dev *sdev);
26+
int mt8195_adsp_clock_on(struct snd_sof_dev *sdev);
27+
int mt8195_adsp_clock_off(struct snd_sof_dev *sdev);
2828
#endif

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

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

13-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
13+
void mt8195_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
1414
{
1515
/* ADSP bootup base */
1616
snd_sof_dsp_write(sdev, DSP_REG_BAR, DSP_ALTRESETVEC, boot_addr);
@@ -47,7 +47,7 @@ void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
4747
ADSP_RUNSTALL, 0);
4848
}
4949

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

sound/soc/sof/mediatek/mt8195/mt8195.c

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

168168
adsp_bootup_addr = SRAM_PHYS_BASE_FROM_DSP_VIEW;
169169
dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", adsp_bootup_addr);
170-
sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr);
170+
mt8195_sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr);
171171

172172
return 0;
173173
}
@@ -200,9 +200,9 @@ static int mt8195_dsp_probe(struct snd_sof_dev *sdev)
200200
return -EINVAL;
201201
}
202202

203-
ret = adsp_clock_on(sdev);
203+
ret = mt8195_adsp_clock_on(sdev);
204204
if (ret) {
205-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
205+
dev_err(sdev->dev, "mt8195_adsp_clock_on fail!\n");
206206
return -EINVAL;
207207
}
208208

@@ -275,7 +275,7 @@ static int mt8195_dsp_probe(struct snd_sof_dev *sdev)
275275
err_adsp_sram_power_off:
276276
adsp_sram_power_on(&pdev->dev, false);
277277
exit_clk_disable:
278-
adsp_clock_off(sdev);
278+
mt8195_adsp_clock_off(sdev);
279279

280280
return ret;
281281
}
@@ -292,7 +292,7 @@ static void mt8195_dsp_remove(struct snd_sof_dev *sdev)
292292

293293
platform_device_unregister(priv->ipc_dev);
294294
adsp_sram_power_on(&pdev->dev, false);
295-
adsp_clock_off(sdev);
295+
mt8195_adsp_clock_off(sdev);
296296
}
297297

298298
static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
@@ -314,7 +314,7 @@ static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
314314
}
315315

316316
/* stall and reset dsp */
317-
sof_hifixdsp_shutdown(sdev);
317+
mt8195_sof_hifixdsp_shutdown(sdev);
318318

319319
/* power down adsp sram */
320320
ret = adsp_sram_power_on(&pdev->dev, false);
@@ -324,17 +324,17 @@ static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
324324
}
325325

326326
/* turn off adsp clock */
327-
return adsp_clock_off(sdev);
327+
return mt8195_adsp_clock_off(sdev);
328328
}
329329

330330
static int mt8195_dsp_resume(struct snd_sof_dev *sdev)
331331
{
332332
int ret;
333333

334334
/* turn on adsp clock */
335-
ret = adsp_clock_on(sdev);
335+
ret = mt8195_adsp_clock_on(sdev);
336336
if (ret) {
337-
dev_err(sdev->dev, "adsp_clock_on fail!\n");
337+
dev_err(sdev->dev, "mt8195_adsp_clock_on fail!\n");
338338
return ret;
339339
}
340340

sound/soc/sof/mediatek/mt8195/mt8195.h

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

159-
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
160-
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
159+
void mt8195_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
160+
void mt8195_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
161161
#endif

0 commit comments

Comments
 (0)