blob: 483716c2025edb57c000ebf56e64365fec5a5f0f [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Kyösti Mälkki78c5d582015-01-09 23:48:47 +02002
3#include <stdint.h>
4#include <arch/io.h>
Furquan Shaikh76cedd22020-05-02 10:24:23 -07005#include <acpi/acpi.h>
Kyösti Mälkki78c5d582015-01-09 23:48:47 +02006#include "SBPLATFORM.h"
7
8int acpi_get_sleep_type(void)
9{
10 u16 tmp = inw(PM1_CNT_BLK_ADDRESS);
11 tmp = ((tmp & (7 << 10)) >> 10);
12 return (int)tmp;
13}