mb/google/volteer: Disable HDA PCI device when AUDIO=NONE

If there is no installed audio daughter board on volteer then the
HDA driver in the kernel will crash on resume.  In order to prevent
this disable the PCI device when AUDIO=NONE probe match is true.

BUG=b:147462631
TEST=boot on volteer and ensure that the PCI device at 0:1f.3 is gone

Change-Id: I4a436e1b76418030bf635427e490b54a713fdd33
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41217
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Reviewed-by: Srinidhi N Kaushik <srinidhi.n.kaushik@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/mainboard/google/volteer/romstage.c b/src/mainboard/google/volteer/romstage.c
index cd4d7fe..d35bbb5 100644
--- a/src/mainboard/google/volteer/romstage.c
+++ b/src/mainboard/google/volteer/romstage.c
@@ -7,6 +7,7 @@
 #include <baseboard/variants.h>
 #include <ec/google/chromeec/ec.h>
 #include <fsp/soc_binding.h>
+#include <fw_config.h>
 #include <gpio.h>
 #include <memory_info.h>
 #include <soc/gpio.h>
@@ -26,6 +27,10 @@
 	};
 	bool half_populated = gpio_get(GPIO_MEM_CH_SEL);
 
+	/* Disable HDA device if no audio board is present. */
+	if (fw_config_probe(FW_CONFIG(AUDIO, NONE)))
+		mem_cfg->PchHdaEnable = 0;
+
 	meminit_lpddr4x(mem_cfg, board_cfg, &spd_info, half_populated);
 }