Commit ff0aefe2 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown

ASoC: Intel: avs: Init debugfs before booting firmware

When bringing up setups it's vital to have access to debug functionality
even if firmware boot fails. As order of probe()ing operations is
changed, update remove() procedure accordingly.
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-12-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 30df76bb
...@@ -209,6 +209,7 @@ static void avs_hda_probe_work(struct work_struct *work) ...@@ -209,6 +209,7 @@ static void avs_hda_probe_work(struct work_struct *work)
snd_hdac_ext_bus_ppcap_enable(bus, true); snd_hdac_ext_bus_ppcap_enable(bus, true);
snd_hdac_ext_bus_ppcap_int_enable(bus, true); snd_hdac_ext_bus_ppcap_int_enable(bus, true);
avs_debugfs_init(adev);
ret = avs_dsp_first_boot_firmware(adev); ret = avs_dsp_first_boot_firmware(adev);
if (ret < 0) if (ret < 0)
...@@ -217,7 +218,6 @@ static void avs_hda_probe_work(struct work_struct *work) ...@@ -217,7 +218,6 @@ static void avs_hda_probe_work(struct work_struct *work)
adev->nhlt = intel_nhlt_init(adev->dev); adev->nhlt = intel_nhlt_init(adev->dev);
if (!adev->nhlt) if (!adev->nhlt)
dev_info(bus->dev, "platform has no NHLT\n"); dev_info(bus->dev, "platform has no NHLT\n");
avs_debugfs_init(adev);
avs_register_all_boards(adev); avs_register_all_boards(adev);
...@@ -548,9 +548,9 @@ static void avs_pci_remove(struct pci_dev *pci) ...@@ -548,9 +548,9 @@ static void avs_pci_remove(struct pci_dev *pci)
avs_unregister_all_boards(adev); avs_unregister_all_boards(adev);
avs_debugfs_exit(adev);
if (adev->nhlt) if (adev->nhlt)
intel_nhlt_free(adev->nhlt); intel_nhlt_free(adev->nhlt);
avs_debugfs_exit(adev);
if (avs_platattr_test(adev, CLDMA)) if (avs_platattr_test(adev, CLDMA))
hda_cldma_free(&code_loader); hda_cldma_free(&code_loader);
......
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