blob: d25f391b1351a547bf2d9439e7441240925351c0 [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Kyösti Mälkki78c5d582015-01-09 23:48:47 +02003
4#include <stdint.h>
5#include <arch/io.h>
Furquan Shaikh76cedd22020-05-02 10:24:23 -07006#include <acpi/acpi.h>
Kyösti Mälkki78c5d582015-01-09 23:48:47 +02007#include <cbmem.h>
8#include "SBPLATFORM.h"
9
10int acpi_get_sleep_type(void)
11{
12 u16 tmp = inw(PM1_CNT_BLK_ADDRESS);
13 tmp = ((tmp & (7 << 10)) >> 10);
14 return (int)tmp;
15}