From f7841d03e2580c666f544e7bb625b1df0ed298a4 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sun, 10 May 2020 11:26:22 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41217 Tested-by: build bot (Jenkins) Reviewed-by: Sathyanarayana Nujella Reviewed-by: Srinidhi N Kaushik Reviewed-by: Furquan Shaikh --- src/mainboard/google/volteer/romstage.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mainboard/google/volteer/romstage.c b/src/mainboard/google/volteer/romstage.c index cd4d7fea50..d35bbb5bea 100644 --- a/src/mainboard/google/volteer/romstage.c +++ b/src/mainboard/google/volteer/romstage.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,10 @@ void mainboard_memory_init_params(FSPM_UPD *mupd) }; 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); }