summaryrefslogtreecommitdiff
path: root/src/mainboard/google/octopus
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/octopus')
-rw-r--r--src/mainboard/google/octopus/variants/bloog/variant.c9
-rw-r--r--src/mainboard/google/octopus/variants/bobba/variant.c5
-rw-r--r--src/mainboard/google/octopus/variants/casta/variant.c5
-rw-r--r--src/mainboard/google/octopus/variants/fleex/variant.c6
-rw-r--r--src/mainboard/google/octopus/variants/foob/variant.c5
-rw-r--r--src/mainboard/google/octopus/variants/meep/variant.c9
-rw-r--r--src/mainboard/google/octopus/variants/phaser/mainboard.c10
7 files changed, 17 insertions, 32 deletions
diff --git a/src/mainboard/google/octopus/variants/bloog/variant.c b/src/mainboard/google/octopus/variants/bloog/variant.c
index 5682ac3eb0..28f2ce8f54 100644
--- a/src/mainboard/google/octopus/variants/bloog/variant.c
+++ b/src/mainboard/google/octopus/variants/bloog/variant.c
@@ -28,7 +28,6 @@ enum {
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id = google_chromeec_get_board_sku();
switch (sku_id) {
@@ -36,18 +35,16 @@ const char *get_wifi_sar_cbfs_filename(void)
case SKU_34_BLOOG:
case SKU_35_BLOOG:
case SKU_36_BLOOG:
- filename = "wifi_sar-bloog.hex";
- break;
+ return "wifi_sar-bloog.hex";
case SKU_49_BLOOGUARD:
case SKU_50_BLOOGUARD:
case SKU_51_BLOOGUARD:
case SKU_52_BLOOGUARD:
case SKU_53_BIPSHIP:
case SKU_54_BIPSHIP:
- filename = "wifi_sar-blooguard.hex";
- break;
+ return "wifi_sar-blooguard.hex";
}
- return filename;
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
const char *mainboard_vbt_filename(void)
diff --git a/src/mainboard/google/octopus/variants/bobba/variant.c b/src/mainboard/google/octopus/variants/bobba/variant.c
index 2d09270148..5765eb7768 100644
--- a/src/mainboard/google/octopus/variants/bobba/variant.c
+++ b/src/mainboard/google/octopus/variants/bobba/variant.c
@@ -18,13 +18,12 @@ enum {
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id = google_chromeec_get_board_sku();
if (sku_id >= 33 && sku_id <= 44)
- filename = "wifi_sar-droid.hex";
+ return "wifi_sar-droid.hex";
- return filename;
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
void variant_smi_sleep(u8 slp_typ)
diff --git a/src/mainboard/google/octopus/variants/casta/variant.c b/src/mainboard/google/octopus/variants/casta/variant.c
index a5b948cf62..b9165a7aab 100644
--- a/src/mainboard/google/octopus/variants/casta/variant.c
+++ b/src/mainboard/google/octopus/variants/casta/variant.c
@@ -8,13 +8,12 @@
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id = google_chromeec_get_board_sku();
if (sku_id == 2)
- filename = "wifi_sar-bluebird.hex";
+ return "wifi_sar-bluebird.hex";
- return filename;
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
bool variant_ext_usb_status(unsigned int port_type, unsigned int port_id)
diff --git a/src/mainboard/google/octopus/variants/fleex/variant.c b/src/mainboard/google/octopus/variants/fleex/variant.c
index 6333b074dd..63908e2f68 100644
--- a/src/mainboard/google/octopus/variants/fleex/variant.c
+++ b/src/mainboard/google/octopus/variants/fleex/variant.c
@@ -32,12 +32,10 @@ void variant_smi_sleep(u8 slp_typ)
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
-
if (!is_lte_sku())
- filename = "wifi_sar-fleex.hex";
+ return "wifi_sar-fleex.hex";
- return filename;
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
void variant_update_devtree(struct device *dev)
diff --git a/src/mainboard/google/octopus/variants/foob/variant.c b/src/mainboard/google/octopus/variants/foob/variant.c
index 8cc4a3df0b..aeddc3b3b2 100644
--- a/src/mainboard/google/octopus/variants/foob/variant.c
+++ b/src/mainboard/google/octopus/variants/foob/variant.c
@@ -25,11 +25,10 @@ void variant_update_devtree(struct device *dev)
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id = SKU_UNKNOWN;
sku_id = google_chromeec_get_board_sku();
if (sku_id == 9)
- filename = "wifi_sar-foob360.hex";
- return filename;
+ return "wifi_sar-foob360.hex";
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
diff --git a/src/mainboard/google/octopus/variants/meep/variant.c b/src/mainboard/google/octopus/variants/meep/variant.c
index df4dbd69ea..4e5c4bebf4 100644
--- a/src/mainboard/google/octopus/variants/meep/variant.c
+++ b/src/mainboard/google/octopus/variants/meep/variant.c
@@ -8,7 +8,6 @@
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id = google_chromeec_get_board_sku();
switch (sku_id) {
@@ -16,16 +15,14 @@ const char *get_wifi_sar_cbfs_filename(void)
case SKU_2_MEEP:
case SKU_3_MEEP:
case SKU_4_MEEP:
- filename = "wifi_sar-meep.hex";
- break;
+ return "wifi_sar-meep.hex";
case SKU_49_VORTININJA:
case SKU_50_VORTININJA:
case SKU_51_VORTININJA:
case SKU_52_VORTININJA:
- filename = "wifi_sar-vortininja.hex";
- break;
+ return "wifi_sar-vortininja.hex";
}
- return filename;
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
}
const char *mainboard_vbt_filename(void)
diff --git a/src/mainboard/google/octopus/variants/phaser/mainboard.c b/src/mainboard/google/octopus/variants/phaser/mainboard.c
index 4997ce452f..b5b53539b7 100644
--- a/src/mainboard/google/octopus/variants/phaser/mainboard.c
+++ b/src/mainboard/google/octopus/variants/phaser/mainboard.c
@@ -6,14 +6,10 @@
const char *get_wifi_sar_cbfs_filename(void)
{
- const char *filename = NULL;
uint32_t sku_id;
- if (google_chromeec_cbi_get_sku_id(&sku_id))
- return NULL;
+ if (google_chromeec_cbi_get_sku_id(&sku_id) || (sku_id != 5))
+ return WIFI_SAR_CBFS_DEFAULT_FILENAME;
- if (sku_id == 5)
- filename = "wifi_sar-laser.hex";
-
- return filename;
+ return "wifi_sar-laser.hex";
}