Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8195/mt8195-clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ static int adsp_default_clk_init(struct snd_sof_dev *sdev, bool enable)
return 0;
}

int adsp_clock_on(struct snd_sof_dev *sdev)
int mt8195_adsp_clock_on(struct snd_sof_dev *sdev)
{
/* Open ADSP clock */
return adsp_default_clk_init(sdev, 1);
}

int adsp_clock_off(struct snd_sof_dev *sdev)
int mt8195_adsp_clock_off(struct snd_sof_dev *sdev)
{
/* Close ADSP clock */
return adsp_default_clk_init(sdev, 0);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8195/mt8195-clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ enum adsp_clk_id {
};

int mt8195_adsp_init_clock(struct snd_sof_dev *sdev);
int adsp_clock_on(struct snd_sof_dev *sdev);
int adsp_clock_off(struct snd_sof_dev *sdev);
int mt8195_adsp_clock_on(struct snd_sof_dev *sdev);
int mt8195_adsp_clock_off(struct snd_sof_dev *sdev);
#endif
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8195/mt8195-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "mt8195.h"
#include "../../ops.h"

void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
void mt8195_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
{
/* ADSP bootup base */
snd_sof_dsp_write(sdev, DSP_REG_BAR, DSP_ALTRESETVEC, boot_addr);
Expand Down Expand Up @@ -47,7 +47,7 @@ void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
ADSP_RUNSTALL, 0);
}

void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
void mt8195_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
{
/* RUN_STALL pull high again to reset */
snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, DSP_RESET_SW,
Expand Down
18 changes: 9 additions & 9 deletions sound/soc/sof/mediatek/mt8195/mt8195.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int mt8195_run(struct snd_sof_dev *sdev)

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

return 0;
}
Expand Down Expand Up @@ -200,9 +200,9 @@ static int mt8195_dsp_probe(struct snd_sof_dev *sdev)
return -EINVAL;
}

ret = adsp_clock_on(sdev);
ret = mt8195_adsp_clock_on(sdev);
if (ret) {
dev_err(sdev->dev, "adsp_clock_on fail!\n");
dev_err(sdev->dev, "mt8195_adsp_clock_on fail!\n");
return -EINVAL;
}

Expand Down Expand Up @@ -275,7 +275,7 @@ static int mt8195_dsp_probe(struct snd_sof_dev *sdev)
err_adsp_sram_power_off:
adsp_sram_power_on(&pdev->dev, false);
exit_clk_disable:
adsp_clock_off(sdev);
mt8195_adsp_clock_off(sdev);

return ret;
}
Expand All @@ -292,7 +292,7 @@ static void mt8195_dsp_remove(struct snd_sof_dev *sdev)

platform_device_unregister(priv->ipc_dev);
adsp_sram_power_on(&pdev->dev, false);
adsp_clock_off(sdev);
mt8195_adsp_clock_off(sdev);
}

static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
Expand All @@ -314,7 +314,7 @@ static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
}

/* stall and reset dsp */
sof_hifixdsp_shutdown(sdev);
mt8195_sof_hifixdsp_shutdown(sdev);

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

/* turn off adsp clock */
return adsp_clock_off(sdev);
return mt8195_adsp_clock_off(sdev);
}

static int mt8195_dsp_resume(struct snd_sof_dev *sdev)
{
int ret;

/* turn on adsp clock */
ret = adsp_clock_on(sdev);
ret = mt8195_adsp_clock_on(sdev);
if (ret) {
dev_err(sdev->dev, "adsp_clock_on fail!\n");
dev_err(sdev->dev, "mt8195_adsp_clock_on fail!\n");
return ret;
}

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8195/mt8195.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ struct snd_sof_dev;
#define SUSPEND_DSP_IDLE_TIMEOUT_US 1000000 /* timeout to wait dsp idle, 1 sec */
#define SUSPEND_DSP_IDLE_POLL_INTERVAL_US 500 /* 0.5 msec */

void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
void mt8195_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
void mt8195_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
#endif
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8365/mt8365-clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ static int adsp_default_clk_init(struct snd_sof_dev *sdev, bool enable)
return 0;
}

int adsp_clock_on(struct snd_sof_dev *sdev)
int mt8365_adsp_clock_on(struct snd_sof_dev *sdev)
{
/* Open ADSP clock */
return adsp_default_clk_init(sdev, 1);
}

int adsp_clock_off(struct snd_sof_dev *sdev)
int mt8365_adsp_clock_off(struct snd_sof_dev *sdev)
{
/* Close ADSP clock */
return adsp_default_clk_init(sdev, 0);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8365/mt8365-clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ enum adsp_clk_id {
};

int mt8365_adsp_init_clock(struct snd_sof_dev *sdev);
int adsp_clock_on(struct snd_sof_dev *sdev);
int adsp_clock_off(struct snd_sof_dev *sdev);
int mt8365_adsp_clock_on(struct snd_sof_dev *sdev);
int mt8365_adsp_clock_off(struct snd_sof_dev *sdev);
#endif
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8365/mt8365-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "mt8365.h"
#include "../../ops.h"

void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
void mt8365_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
{
/* ADSP bootup base */
snd_sof_dsp_write(sdev, DSP_REG_BAR, DSP_ALTRESETVEC, boot_addr);
Expand Down Expand Up @@ -48,7 +48,7 @@ void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr)
ADSP_RUNSTALL, 0);
}

void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
void mt8365_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev)
{
/* RUN_STALL pull high again to reset */
snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, DSP_RESET_SW,
Expand Down
18 changes: 9 additions & 9 deletions sound/soc/sof/mediatek/mt8365/mt8365.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static int adsp_memory_remap_init(struct device *dev, struct mtk_adsp_chip_info
static int mt8365_run(struct snd_sof_dev *sdev)
{
dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", SRAM_PHYS_BASE_FROM_DSP_VIEW);
sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);
mt8365_sof_hifixdsp_boot_sequence(sdev, SRAM_PHYS_BASE_FROM_DSP_VIEW);

return 0;
}
Expand Down Expand Up @@ -306,9 +306,9 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
return -EINVAL;
}

ret = adsp_clock_on(sdev);
ret = mt8365_adsp_clock_on(sdev);
if (ret) {
dev_err(sdev->dev, "adsp_clock_on fail!\n");
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
return -EINVAL;
}

Expand Down Expand Up @@ -375,7 +375,7 @@ static int mt8365_dsp_probe(struct snd_sof_dev *sdev)
err_adsp_sram_power_off:
adsp_sram_power_on(&pdev->dev, false);
exit_clk_disable:
adsp_clock_off(sdev);
mt8365_adsp_clock_off(sdev);

return ret;
}
Expand All @@ -392,7 +392,7 @@ static void mt8365_dsp_remove(struct snd_sof_dev *sdev)

platform_device_unregister(priv->ipc_dev);
adsp_sram_power_on(&pdev->dev, false);
adsp_clock_off(sdev);
mt8365_adsp_clock_off(sdev);
}

static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
Expand All @@ -401,7 +401,7 @@ static int mt8365_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
int ret;

/* reset dsp */
sof_hifixdsp_shutdown(sdev);
mt8365_sof_hifixdsp_shutdown(sdev);

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

/* turn off adsp clock */
return adsp_clock_off(sdev);
return mt8365_adsp_clock_off(sdev);
}

static int mt8365_dsp_resume(struct snd_sof_dev *sdev)
{
int ret;

/* turn on adsp clock */
ret = adsp_clock_on(sdev);
ret = mt8365_adsp_clock_on(sdev);
if (ret) {
dev_err(sdev->dev, "adsp_clock_on fail!\n");
dev_err(sdev->dev, "mt8365_adsp_clock_on fail!\n");
return ret;
}

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/mediatek/mt8365/mt8365.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@ struct snd_sof_dev;
#define SUSPEND_DSP_IDLE_TIMEOUT_US 1000000 /* timeout to wait dsp idle, 1 sec */
#define SUSPEND_DSP_IDLE_POLL_INTERVAL_US 500 /* 0.5 msec */

void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
void mt8365_sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
void mt8365_sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
#endif
Loading