Commit fb36cca7 authored by Nick Vaccaro's avatar Nick Vaccaro Committed by chrome-bot
Browse files

power/pch: provide cannonlake power off ops



Added cannonlake power off ops

BUG=b:65696721
BRANCH=None
TEST=None

Change-Id: I9f8e8f2550467a52e7eefdb3019bfc360e63ae69
Signed-off-by: default avatarNick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/674803

Reviewed-by: default avatarAaron Durbin <adurbin@chromium.org>
parent 56f733ff
......@@ -229,6 +229,24 @@ static int skylake_power_off(PowerOps *me)
return __pch_power_off_common(&args);
}
static int cannonlake_power_off(PowerOps *me)
{
/*
* Cannonlake has 4 GPE en registers and the bar lives within the
* PMC device at 0:1f.2.
*/
struct power_off_args args;
memset(&args, 0, sizeof(args));
args.pci_dev = PCI_DEV(0, 0x1f, 2);
args.pmbase_reg = 0x20;
args.pmbase_mask = 0xff80;
args.gpe_en_reg = 0x70;
args.num_gpe_regs = 4;
return __pch_power_off_common(&args);
}
static int apollolake_power_off(PowerOps *me)
{
struct power_off_args args;
......@@ -273,3 +291,8 @@ PowerOps apollolake_power_ops = {
.cold_reboot = &pch_cold_reboot,
.power_off = &apollolake_power_off
};
PowerOps cannonlake_power_ops = {
.cold_reboot = &pch_cold_reboot,
.power_off = &cannonlake_power_off
};
......@@ -24,6 +24,7 @@ PowerOps pch_power_ops;
PowerOps baytrail_power_ops;
PowerOps braswell_power_ops;
PowerOps skylake_power_ops;
PowerOps cannonlake_power_ops;
PowerOps apollolake_power_ops;
#endif /* __DRIVERS_POWER_PCH_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment