summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/baytrail/pmutil.c11
-rw-r--r--src/soc/intel/braswell/pmutil.c11
-rw-r--r--src/soc/intel/broadwell/pch/pmutil.c11
3 files changed, 33 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/pmutil.c b/src/soc/intel/baytrail/pmutil.c
index 93024d9fba..79f95bbf03 100644
--- a/src/soc/intel/baytrail/pmutil.c
+++ b/src/soc/intel/baytrail/pmutil.c
@@ -12,6 +12,7 @@
#include <device/pci.h>
#include <device/pci_ops.h>
#include <console/console.h>
+#include <halt.h>
#include <soc/iomap.h>
#include <soc/lpc.h>
@@ -357,3 +358,13 @@ int platform_is_resuming(void)
return acpi_sleep_from_pm1(inl(ACPI_BASE_ADDRESS + PM1_CNT)) == ACPI_S3;
}
+
+void poweroff(void)
+{
+ uint32_t pm1_cnt;
+
+ /* Go to S5 */
+ pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ pm1_cnt |= (0xf << 10);
+ outl(pm1_cnt, ACPI_BASE_ADDRESS + PM1_CNT);
+}
diff --git a/src/soc/intel/braswell/pmutil.c b/src/soc/intel/braswell/pmutil.c
index a880183b82..3efcc7b6de 100644
--- a/src/soc/intel/braswell/pmutil.c
+++ b/src/soc/intel/braswell/pmutil.c
@@ -10,6 +10,7 @@
#include <device/mmio.h>
#include <device/pci.h>
#include <device/pci_ops.h>
+#include <halt.h>
#include <console/console.h>
#include <soc/iomap.h>
#include <soc/lpc.h>
@@ -356,3 +357,13 @@ int platform_is_resuming(void)
return acpi_sleep_from_pm1(inl(ACPI_BASE_ADDRESS + PM1_CNT)) == ACPI_S3;
}
+
+void poweroff(void)
+{
+ uint32_t pm1_cnt;
+
+ /* Go to S5 */
+ pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ pm1_cnt |= (0xf << 10);
+ outl(pm1_cnt, ACPI_BASE_ADDRESS + PM1_CNT);
+}
diff --git a/src/soc/intel/broadwell/pch/pmutil.c b/src/soc/intel/broadwell/pch/pmutil.c
index 4ba30b4ec6..e310416eaa 100644
--- a/src/soc/intel/broadwell/pch/pmutil.c
+++ b/src/soc/intel/broadwell/pch/pmutil.c
@@ -11,6 +11,7 @@
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
+#include <halt.h>
#include <console/console.h>
#include <soc/iomap.h>
#include <soc/lpc.h>
@@ -421,6 +422,16 @@ int platform_is_resuming(void)
return acpi_sleep_from_pm1(inl(get_pmbase() + PM1_CNT)) == ACPI_S3;
}
+void poweroff(void)
+{
+ uint32_t pm1_cnt;
+
+ /* Go to S5 */
+ pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ pm1_cnt |= (0xf << 10);
+ outl(pm1_cnt, ACPI_BASE_ADDRESS + PM1_CNT);
+}
+
/* STM Support */
uint16_t get_pmbase(void)
{