diff options
author | Furquan Shaikh <furquan@google.com> | 2020-07-07 12:50:55 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-07-08 23:07:34 +0000 |
commit | 30ee0d881b5c5568fb8e1cf0ad2144b9e84d6a06 (patch) | |
tree | 807618e9cde48f1ec6a080dab85590ff9281e6cd /src/mainboard/google/zork/variants/baseboard/ramstage_common.c | |
parent | ca36acf773b1941c6df25329846765d0225fbd37 (diff) |
mb/google/zork: Add helpers for v3 schematics and wifi power enable
This change adds following two helper functions:
1. variant_uses_v3_schematics() - Check whether the variant is using
v3 version of schematics.
2. variant_has_active_low_wifi_power() - Check whether the variant is
using active low power enable for WiFi.
In addition to this, Kconfig options are reorganized to add two new
configs - VARIANT_SUPPORTS_PRE_V3_SCHEMATICS and
VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH. This allows the helper
functions to return `true` early without checking for board version.
Eventually, when a variant decides to drop support for pre-v3
schematics, it can be dropped from selecting
VARIANT_SUPPORTS_PRE_V3_SCHEMATICS. Similarly, when the variant
decides to drop support for active high power enable for WiFi, it can
be dropped from selecting VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH.
Change-Id: I62851299e8dd7929a8e1e9a287389abd71c7706c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43224
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/zork/variants/baseboard/ramstage_common.c')
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/ramstage_common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/ramstage_common.c b/src/mainboard/google/zork/variants/baseboard/ramstage_common.c index 6372af6a88..143c1b4420 100644 --- a/src/mainboard/google/zork/variants/baseboard/ramstage_common.c +++ b/src/mainboard/google/zork/variants/baseboard/ramstage_common.c @@ -8,11 +8,9 @@ void variant_audio_update(void) { struct soc_amd_picasso_config *cfg = config_of_soc(); - uint32_t board_version; struct acpi_gpio *gpio = &cfg->dmic_select_gpio; - if (!google_chromeec_cbi_get_board_version(&board_version) && - (board_version >= CONFIG_VARIANT_MIN_BOARD_ID_V3_SCHEMATICS)) + if (!variant_uses_v3_schematics()) return; if (CONFIG(BOARD_GOOGLE_BASEBOARD_TREMBYLE)) |