David Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56334 )
Change subject: mb/google/dedede/var/magolor: Add custom Wifi SAR for magister ......................................................................
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=none TEST=build and test on magolor/magister
Signed-off-by: David Wu david_wu@quanta.corp-partner.google.com Change-Id: I4510cc2ad42a11ec802ecd439b353f8e87d63868 --- M src/mainboard/google/dedede/variants/magolor/variant.c 1 file changed, 35 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/56334/1
diff --git a/src/mainboard/google/dedede/variants/magolor/variant.c b/src/mainboard/google/dedede/variants/magolor/variant.c index bb9cf08..44162c1 100644 --- a/src/mainboard/google/dedede/variants/magolor/variant.c +++ b/src/mainboard/google/dedede/variants/magolor/variant.c @@ -1,13 +1,47 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <drivers/intel/gma/opregion.h> +#include <ec/google/chromeec/ec.h> #include <fw_config.h> #include <sar.h>
+enum { + Magolor_SKU1 = 0x70000, + Magolor_SKU2 = 0x70001, + Magolor_SKU3 = 0x70002, + Magolor_SKU4 = 0x70003, + Magolor_SKU5 = 0x70004, + Magolor_SKU6 = 0x70005, + Maglia_SKU1 = 0x80000, + Maglia_SKU2 = 0x80001, + Maglia_SKU3 = 0x80002, + Magister_SKU1 = 0xC0000, + Magister_SKU2 = 0xC0001, + Magister_SKU3 = 0xC0002, + Magister_SKU4 = 0xC0003, +}; + 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(); + + switch (sku_id) { + case Magolor_SKU1: + case Magolor_SKU2: + case Magolor_SKU3: + case Magolor_SKU4: + case Magolor_SKU5: + case Magolor_SKU6: + case Maglia_SKU1: + case Maglia_SKU2: + case Maglia_SKU3: return "wifi_sar-magolor.hex"; + case Magister_SKU1: + case Magister_SKU2: + case Magister_SKU3: + case Magister_SKU4: + return "wifi_sar-magister.hex"; + }
return WIFI_SAR_CBFS_DEFAULT_FILENAME; }