summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-05-25 10:32:31 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-05-29 20:06:15 +0000
commitea6dd747e8a49cfba8add8e59bc3900bc9b598df (patch)
tree755d3131bb96e133f97e2704927791a1d371fc72 /src
parenta5eed800f3fa84ab100f7b612361c641515ee412 (diff)
downloadcoreboot-ea6dd747e8a49cfba8add8e59bc3900bc9b598df.tar.xz
soc/intel/common/pmc: Don't use CAR_GLOBAL
All platforms using this code use NO_CAR_GLOBAL_MIGRATION. Change-Id: I426dee60521045db4711cd253432c65223a64b93 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33002 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index f58d36246e..564aacb55e 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <arch/early_variables.h>
#include <arch/io.h>
#include <device/mmio.h>
#include <cbmem.h>
@@ -27,7 +26,7 @@
#include <timer.h>
#include <security/vboot/vboot_common.h>
-static struct chipset_power_state power_state CAR_GLOBAL;
+static struct chipset_power_state power_state;
struct chipset_power_state *pmc_get_power_state(void)
{
@@ -38,7 +37,7 @@ struct chipset_power_state *pmc_get_power_state(void)
/* cbmem is online but ptr is not populated yet */
if (ptr == NULL && !(ENV_RAMSTAGE || ENV_POSTCAR))
- return car_get_var_ptr(&power_state);
+ return &power_state;
return ptr;
}
@@ -46,16 +45,14 @@ struct chipset_power_state *pmc_get_power_state(void)
static void migrate_power_state(int is_recovery)
{
struct chipset_power_state *ps_cbmem;
- struct chipset_power_state *ps_car;
- ps_car = car_get_var_ptr(&power_state);
ps_cbmem = cbmem_add(CBMEM_ID_POWER_STATE, sizeof(*ps_cbmem));
if (ps_cbmem == NULL) {
printk(BIOS_DEBUG, "Not adding power state to cbmem!\n");
return;
}
- memcpy(ps_cbmem, ps_car, sizeof(*ps_cbmem));
+ memcpy(ps_cbmem, &power_state, sizeof(*ps_cbmem));
}
ROMSTAGE_CBMEM_INIT_HOOK(migrate_power_state)