2014-01-16 07:39:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de>
|
|
|
|
*
|
2015-02-12 16:08:04 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-01-16 07:39:33 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-02-12 16:05:41 +01:00
|
|
|
* @ingroup boards_qemu-i386
|
2014-01-16 07:39:33 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
2014-05-29 04:40:01 +02:00
|
|
|
* @brief Low-power mode emulation for qemu-i386.
|
2014-01-16 07:39:33 +01:00
|
|
|
*
|
|
|
|
* @author René Kijewski <rene.kijewski@fu-berlin.de>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-05-29 04:40:01 +02:00
|
|
|
#include "lpm.h"
|
|
|
|
#include "x86_reboot.h"
|
2014-01-16 07:39:33 +01:00
|
|
|
|
|
|
|
void lpm_init(void)
|
|
|
|
{
|
2014-05-29 04:40:01 +02:00
|
|
|
/* void */
|
2014-01-16 07:39:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum lpm_mode lpm_set(enum lpm_mode target)
|
|
|
|
{
|
|
|
|
if (target != LPM_ON) {
|
2014-05-29 04:40:01 +02:00
|
|
|
if (target == LPM_POWERDOWN) {
|
|
|
|
x86_shutdown();
|
|
|
|
}
|
2014-01-16 07:39:33 +01:00
|
|
|
asm volatile ("hlt");
|
|
|
|
}
|
|
|
|
return LPM_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
void lpm_awake(void)
|
|
|
|
{
|
2014-05-29 04:40:01 +02:00
|
|
|
/* void */
|
2014-01-16 07:39:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void lpm_begin_awake(void)
|
|
|
|
{
|
2014-05-29 04:40:01 +02:00
|
|
|
/* void */
|
2014-01-16 07:39:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void lpm_end_awake(void)
|
|
|
|
{
|
2014-05-29 04:40:01 +02:00
|
|
|
/* void */
|
2014-01-16 07:39:33 +01:00
|
|
|
}
|