Commit b48b77d8 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: Intel: hda: always do a full reset

There's no point in checking for a full-reset condition that is
always-true in the callers.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20221024165310.246183-11-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a09d82ce
...@@ -182,7 +182,7 @@ int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable) ...@@ -182,7 +182,7 @@ int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable)
return 0; return 0;
} }
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset) int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev)
{ {
struct hdac_bus *bus = sof_to_bus(sdev); struct hdac_bus *bus = sof_to_bus(sdev);
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
...@@ -199,7 +199,6 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset) ...@@ -199,7 +199,6 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
#endif #endif
hda_dsp_ctrl_misc_clock_gating(sdev, false); hda_dsp_ctrl_misc_clock_gating(sdev, false);
if (full_reset) {
/* reset HDA controller */ /* reset HDA controller */
ret = hda_dsp_ctrl_link_reset(sdev, true); ret = hda_dsp_ctrl_link_reset(sdev, true);
if (ret < 0) { if (ret < 0) {
...@@ -213,7 +212,6 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset) ...@@ -213,7 +212,6 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
dev_err(sdev->dev, "error: failed to exit HDA controller reset\n"); dev_err(sdev->dev, "error: failed to exit HDA controller reset\n");
goto err; goto err;
} }
}
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
/* check to see if controller is ready */ /* check to see if controller is ready */
......
...@@ -691,7 +691,7 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume) ...@@ -691,7 +691,7 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
snd_sof_pci_update_bits(sdev, PCI_TCSEL, 0x07, 0); snd_sof_pci_update_bits(sdev, PCI_TCSEL, 0x07, 0);
/* reset and start hda controller */ /* reset and start hda controller */
ret = hda_dsp_ctrl_init_chip(sdev, true); ret = hda_dsp_ctrl_init_chip(sdev);
if (ret < 0) { if (ret < 0) {
dev_err(sdev->dev, dev_err(sdev->dev,
"error: failed to start controller after resume\n"); "error: failed to start controller after resume\n");
......
...@@ -890,7 +890,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev) ...@@ -890,7 +890,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
dev_dbg(sdev->dev, "PP capability, will probe DSP later.\n"); dev_dbg(sdev->dev, "PP capability, will probe DSP later.\n");
/* Init HDA controller after i915 init */ /* Init HDA controller after i915 init */
ret = hda_dsp_ctrl_init_chip(sdev, true); ret = hda_dsp_ctrl_init_chip(sdev);
if (ret < 0) { if (ret < 0) {
dev_err(bus->dev, "error: init chip failed with ret: %d\n", dev_err(bus->dev, "error: init chip failed with ret: %d\n",
ret); ret);
......
...@@ -702,7 +702,7 @@ void hda_dsp_ctrl_ppcap_int_enable(struct snd_sof_dev *sdev, bool enable); ...@@ -702,7 +702,7 @@ void hda_dsp_ctrl_ppcap_int_enable(struct snd_sof_dev *sdev, bool enable);
int hda_dsp_ctrl_link_reset(struct snd_sof_dev *sdev, bool reset); int hda_dsp_ctrl_link_reset(struct snd_sof_dev *sdev, bool reset);
void hda_dsp_ctrl_misc_clock_gating(struct snd_sof_dev *sdev, bool enable); void hda_dsp_ctrl_misc_clock_gating(struct snd_sof_dev *sdev, bool enable);
int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable); int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable);
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset); int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev);
void hda_dsp_ctrl_stop_chip(struct snd_sof_dev *sdev); void hda_dsp_ctrl_stop_chip(struct snd_sof_dev *sdev);
/* /*
* HDA bus operations. * HDA bus operations.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment