diff options
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r-- | src/soc/intel/apollolake/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/intel/apollolake/pmc.c | 13 | ||||
-rw-r--r-- | src/soc/intel/apollolake/pmutil.c | 13 |
3 files changed, 13 insertions, 14 deletions
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc index 64889e56f9..a816713e3f 100644 --- a/src/soc/intel/apollolake/Makefile.inc +++ b/src/soc/intel/apollolake/Makefile.inc @@ -42,7 +42,6 @@ romstage-y += reset.c romstage-y += spi.c smm-y += mmap_boot.c -smm-y += pmc.c smm-y += pmutil.c smm-y += smihandler.c smm-y += spi.c diff --git a/src/soc/intel/apollolake/pmc.c b/src/soc/intel/apollolake/pmc.c index 2eb8f11334..4cc7670b59 100644 --- a/src/soc/intel/apollolake/pmc.c +++ b/src/soc/intel/apollolake/pmc.c @@ -77,19 +77,6 @@ static void set_slp_s3_assertion_width(int width_usecs) write32((void *)gen_pmcon3, reg); } -void pmc_soc_set_afterg3_en(const bool on) -{ - void *const gen_pmcon1 = (void *)(soc_read_pmc_base() + GEN_PMCON1); - uint32_t reg32; - - reg32 = read32(gen_pmcon1); - if (on) - reg32 &= ~SLEEP_AFTER_POWER_FAIL; - else - reg32 |= SLEEP_AFTER_POWER_FAIL; - write32(gen_pmcon1, reg32); -} - void pmc_soc_init(struct device *dev) { const struct soc_intel_apollolake_config *cfg = config_of(dev); diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c index 8f222dd244..891c876c83 100644 --- a/src/soc/intel/apollolake/pmutil.c +++ b/src/soc/intel/apollolake/pmutil.c @@ -224,3 +224,16 @@ uint16_t get_pmbase(void) { return (uint16_t) ACPI_BASE_ADDRESS; } + +void pmc_soc_set_afterg3_en(const bool on) +{ + void *const gen_pmcon1 = (void *)(soc_read_pmc_base() + GEN_PMCON1); + uint32_t reg32; + + reg32 = read32(gen_pmcon1); + if (on) + reg32 &= ~SLEEP_AFTER_POWER_FAIL; + else + reg32 |= SLEEP_AFTER_POWER_FAIL; + write32(gen_pmcon1, reg32); +} |