mb/google/dedede/var/magolor: Add custom Wifi SAR for magister
Add wifi sar for magister. Due to fw-config cannot distinguish between magolor and magister. Using sku_id to decide to load magister custom wifi sar. BUG=b:192290227 TEST=build and test on magolor/magister Cq-Depend: chrome-internal:3986580 Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com> Change-Id: I4510cc2ad42a11ec802ecd439b353f8e87d63868 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56334 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
parent
df520855ca
commit
df060bc362
|
@ -1,13 +1,27 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <drivers/intel/gma/opregion.h>
|
#include <drivers/intel/gma/opregion.h>
|
||||||
|
#include <ec/google/chromeec/ec.h>
|
||||||
#include <fw_config.h>
|
#include <fw_config.h>
|
||||||
#include <sar.h>
|
#include <sar.h>
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MAGOLOR_SKU_START = 0x70000,
|
||||||
|
MAGOLOR_SKU_END = 0x7ffff,
|
||||||
|
MAGLIA_SKU_START = 0x80000,
|
||||||
|
MAGLIA_SKU_END = 0x8ffff,
|
||||||
|
MAGISTER_SKU_START = 0xc0000,
|
||||||
|
MAGISTER_SKU_END = 0xcffff,
|
||||||
|
};
|
||||||
|
|
||||||
const char *get_wifi_sar_cbfs_filename(void)
|
const char *get_wifi_sar_cbfs_filename(void)
|
||||||
{
|
{
|
||||||
if (fw_config_probe(FW_CONFIG(TABLETMODE, TABLETMODE_ENABLED)))
|
uint32_t sku_id = google_chromeec_get_board_sku();
|
||||||
|
|
||||||
|
if (sku_id >= MAGOLOR_SKU_START && sku_id <= MAGLIA_SKU_END)
|
||||||
return "wifi_sar-magolor.hex";
|
return "wifi_sar-magolor.hex";
|
||||||
|
if (sku_id >= MAGISTER_SKU_START && sku_id <= MAGISTER_SKU_END)
|
||||||
|
return "wifi_sar-magister.hex";
|
||||||
|
|
||||||
return WIFI_SAR_CBFS_DEFAULT_FILENAME;
|
return WIFI_SAR_CBFS_DEFAULT_FILENAME;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue