From d2c479789103318db8b7780819ac0ec419a31672 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 18 Feb 2021 15:51:05 +0800 Subject: [PATCH] mb/google/volteer: Add WiFi SAR table support for Lindar/Lillipup Lindar/Lillipup uses the WIFI_SAR_ID field in FW_CONFIG to pick which SAR table to load. BUG=b:178302811 BRANCH=volteer TEST=build and test no lindar/lillipup Signed-off-by: Kevin Chang Change-Id: Ibe829062033ba8246b9d9550cdcdc360f5f67dd3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50872 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: YH Lin --- .../google/volteer/variants/lindar/Makefile.inc | 2 ++ .../google/volteer/variants/lindar/variant.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/mainboard/google/volteer/variants/lindar/variant.c diff --git a/src/mainboard/google/volteer/variants/lindar/Makefile.inc b/src/mainboard/google/volteer/variants/lindar/Makefile.inc index b0bfc567ff..22bcbd7727 100644 --- a/src/mainboard/google/volteer/variants/lindar/Makefile.inc +++ b/src/mainboard/google/volteer/variants/lindar/Makefile.inc @@ -5,3 +5,5 @@ bootblock-y += gpio.c romstage-y += memory.c ramstage-y += gpio.c + +ramstage-$(CONFIG_FW_CONFIG) += variant.c diff --git a/src/mainboard/google/volteer/variants/lindar/variant.c b/src/mainboard/google/volteer/variants/lindar/variant.c new file mode 100644 index 0000000000..b8d7165be3 --- /dev/null +++ b/src/mainboard/google/volteer/variants/lindar/variant.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +const char *get_wifi_sar_cbfs_filename(void) +{ + const char *filename = NULL; + + if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_ID_0))) + filename = "wifi_sar_0.hex"; + else if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_ID_1))) + filename = "wifi_sar_1.hex"; + + return filename; +}