Files
OpenCellular/chip/ish/system.c
Duncan Laurie 30bd74b233 Revert "system: Shutdown AP before entering hibernate mode"
This reverts commit 20c439be20.

Reason for revert: This breaks hibernate on skylake boards and
needs to be tested on more than just kevin before submitting.

BUG=chromium:702451
BRANCH=none
TEST=power down and successfully hibernate on Eve

Original change's description:
> system: Shutdown AP before entering hibernate mode
>
> BUG=chromium:702451
> BRANCH=none
> TEST=manually test on gru: confirm
> 'Alt+VolUp+h' puts gru in hibernate mode and
> AC plug-in wakes it up.
>
> Change-Id: I3e1134b866dea5d3cc61f9b3dad31c3ff0bd9096
> Reviewed-on: https://chromium-review.googlesource.com/470787
> Commit-Ready: Philip Chen <philipchen@chromium.org>
> Tested-by: Philip Chen <philipchen@chromium.org>
> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
>

TBR=rspangler@chromium.org,aaboagye@chromium.org,philipchen@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=chromium:702451

Change-Id: Ie847a5e3efb28256b00ddc6534d8ae6bbbba7121
Reviewed-on: https://chromium-review.googlesource.com/482989
Commit-Ready: Duncan Laurie <dlaurie@chromium.org>
Tested-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-04-21 06:03:57 -07:00

121 lines
1.9 KiB
C

/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* System module ISH (Not implemented) */
#include "clock.h"
#include "common.h"
#include "console.h"
#include "cpu.h"
#include "gpio.h"
#include "host_command.h"
#include "registers.h"
#include "shared_mem.h"
#include "system.h"
#include "hooks.h"
#include "task.h"
#include "timer.h"
#include "util.h"
#include "spi.h"
/* Indices for hibernate data registers (RAM backed by VBAT) */
enum hibdata_index {
HIBDATA_INDEX_SCRATCHPAD = 0, /* General-purpose scratchpad */
HIBDATA_INDEX_SAVED_RESET_FLAGS /* Saved reset flags */
};
int system_is_reboot_warm(void)
{
return 0;
}
void system_pre_init(void)
{
}
void chip_save_reset_flags(int flags)
{
}
void _system_reset(int flags, int wake_from_hibernate)
{
}
void system_reset(int flags)
{
_system_reset(flags, 0);
}
const char *system_get_chip_vendor(void)
{
return "intel";
}
const char *system_get_chip_name(void)
{
return "intel";
}
static char to_hex(int x)
{
if (x >= 0 && x <= 9)
return '0' + x;
return 'a' + x - 10;
}
const char *system_get_chip_revision(void)
{
static char buf[3];
uint8_t rev = 0x86;
buf[0] = to_hex(rev / 16);
buf[1] = to_hex(rev & 0xf);
buf[2] = '\0';
return buf;
}
int system_get_bbram(enum system_bbram_idx idx, uint8_t *value)
{
return EC_ERROR_UNIMPLEMENTED;
}
int system_set_bbram(enum system_bbram_idx idx, uint8_t value)
{
return EC_ERROR_UNIMPLEMENTED;
}
int system_set_scratchpad(uint32_t value)
{
return EC_SUCCESS;
}
uint32_t system_get_scratchpad(void)
{
return 0;
}
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
}
void htimer_interrupt(void)
{
/* Time to wake up */
}
enum system_image_copy_t system_get_shrspi_image_copy(void)
{
return 0;
}
uint32_t system_get_lfw_address(void)
{
return 0;
}
void system_set_image_copy(enum system_image_copy_t copy)
{
}