summaryrefslogtreecommitdiff
path: root/src/mainboard/google/volteer/variants/lindar
diff options
context:
space:
mode:
authorKevin Chang <kevin.chang@lcfc.corp-partner.google.com>2021-02-18 15:51:05 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-03-15 06:08:33 +0000
commitd2c479789103318db8b7780819ac0ec419a31672 (patch)
tree3283fc78d7399bafc11fcda37179043acac01763 /src/mainboard/google/volteer/variants/lindar
parent1c02f6f088b5be1d37bdceb63194685fd2e3e2de (diff)
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 <kevin.chang@lcfc.corp-partner.google.com> Change-Id: Ibe829062033ba8246b9d9550cdcdc360f5f67dd3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50872 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: YH Lin <yueherngl@google.com>
Diffstat (limited to 'src/mainboard/google/volteer/variants/lindar')
-rw-r--r--src/mainboard/google/volteer/variants/lindar/Makefile.inc2
-rw-r--r--src/mainboard/google/volteer/variants/lindar/variant.c16
2 files changed, 18 insertions, 0 deletions
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 <fw_config.h>
+#include <sar.h>
+
+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;
+}