rammus: get cbfs sar table name based on the sku id

This patch overrides the get_wifi_sar_cbfs_filename()
to return different sar table according to the sku id.

BUG=b:173465272
TEST=checked bios log and the correct sar table was loaded.

Change-Id: Ia30d760b1a029197d470818c73bfd2c00514652d
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Zhuohao Lee 2021-03-11 12:07:57 +08:00 committed by Patrick Georgi
parent 9e16ca9dec
commit e6f12d0d50
1 changed files with 15 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <ec/google/chromeec/ec.h> #include <ec/google/chromeec/ec.h>
#include <smbios.h> #include <smbios.h>
#include <string.h> #include <string.h>
#include <sar.h>
#define SKU_UNKNOWN 0xFFFFFFFF #define SKU_UNKNOWN 0xFFFFFFFF
@ -29,3 +30,17 @@ const char *smbios_system_sku(void)
return sku_str; return sku_str;
} }
const char *get_wifi_sar_cbfs_filename(void)
{
const char *filename = NULL;
uint32_t sku_id;
sku_id = variant_board_sku();
if (sku_id & 0x200)
filename = "wifi_sar-shyvana.hex";
else
filename = "wifi_sar-leona.hex";
return filename;
}