summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/pmc.c
diff options
context:
space:
mode:
authorShaunak Saha <shaunak.saha@intel.com>2017-04-18 15:42:09 -0700
committerAaron Durbin <adurbin@chromium.org>2017-08-08 17:15:43 +0000
commit93cdc8bbc20539cb9a2c1cbe3057c566cc5293e7 (patch)
tree8dc2a3f8c40f78261405426504056a276ed71dfb /src/soc/intel/apollolake/pmc.c
parent83e9823aec2a4510794851771b82429cf4d374e1 (diff)
soc/intel/apollolake: Use common PMC for apollolake
With this patch apollolake uses the common PMC util code.No regression observed on a APL platform. Change-Id: I322a25a8b608d7fe98bec626c6696e723357a9d2 Signed-off-by: Shaunak Saha <shaunak.saha@intel.com> Reviewed-on: https://review.coreboot.org/19375 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/pmc.c')
-rw-r--r--src/soc/intel/apollolake/pmc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/pmc.c b/src/soc/intel/apollolake/pmc.c
index 051943460b..190f5fb15c 100644
--- a/src/soc/intel/apollolake/pmc.c
+++ b/src/soc/intel/apollolake/pmc.c
@@ -20,6 +20,7 @@
#include <device/pci_ids.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
+#include <intelblocks/pmclib.h>
#include <soc/iomap.h>
#include <soc/gpio.h>
#include <soc/pci_devs.h>
@@ -128,7 +129,7 @@ static int choose_slp_s3_assertion_width(int width_usecs)
static void set_slp_s3_assertion_width(int width_usecs)
{
uint32_t reg;
- uintptr_t gen_pmcon3 = get_pmc_mmio_bar() + GEN_PMCON3;
+ uintptr_t gen_pmcon3 = soc_read_pmc_base() + GEN_PMCON3;
int setting = choose_slp_s3_assertion_width(width_usecs);
reg = read32((void *)gen_pmcon3);
@@ -143,7 +144,7 @@ static void pmc_init(struct device *dev)
/* Set up GPE configuration */
pmc_gpe_init();
- fixup_power_state();
+ pmc_fixup_power_state();
pch_set_acpi_mode();
if (cfg != NULL)
@@ -153,7 +154,7 @@ static void pmc_init(struct device *dev)
pch_log_state();
/* Now that things have been logged clear out the PMC state. */
- clear_pmc_status();
+ pmc_clear_status();
}
static const struct device_operations device_ops = {