summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/pmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/apollolake/pmutil.c')
-rw-r--r--src/soc/intel/apollolake/pmutil.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index 8d9af926d6..5366ca8baf 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -138,12 +138,23 @@ void soc_clear_pm_registers(uintptr_t pmc_bar)
write32p(pmc_bar + GEN_PMCON1, gen_pmcon1 & ~RPS);
}
+static void gpe0_different_values(const struct soc_intel_apollolake_config *config)
+{
+ bool result = (config->gpe0_dw1 != config->gpe0_dw2) &&
+ (config->gpe0_dw1 != config->gpe0_dw3) &&
+ (config->gpe0_dw2 != config->gpe0_dw3);
+
+ assert(result);
+}
+
void soc_get_gpi_gpe_configs(uint8_t *dw0, uint8_t *dw1, uint8_t *dw2)
{
DEVTREE_CONST struct soc_intel_apollolake_config *config;
config = config_of_soc();
+ gpe0_different_values(config);
+
/* Assign to out variable */
*dw0 = config->gpe0_dw1;
*dw1 = config->gpe0_dw2;