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>
This commit is contained in:
Duncan Laurie
2017-04-20 14:48:21 +00:00
committed by chrome-bot
parent 60d1bc7891
commit 30bd74b233
10 changed files with 8 additions and 32 deletions

View File

@@ -150,7 +150,7 @@ test_mockable void system_reset(int flags)
emulator_reboot();
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
test_mockable void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
uint32_t i;

View File

@@ -96,7 +96,7 @@ uint32_t system_get_scratchpad(void)
return 0;
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
}

View File

@@ -18,7 +18,7 @@
#include "version.h"
#include "watchdog.h"
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
#ifdef CONFIG_HOSTCMD_PD
/* Inform the PD MCU that we are going to hibernate. */

View File

@@ -381,7 +381,7 @@ static void hibernate(uint32_t seconds, uint32_t microseconds, uint32_t flags)
__enter_hibernate(hibctl | LM4_HIBCTL_HIBREQ);
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
/* Flush console before hibernating */
cflush();

View File

@@ -215,7 +215,7 @@ uint32_t system_get_scratchpad(void)
return MEC1322_VBAT_RAM(HIBDATA_INDEX_SCRATCHPAD);
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
int i;

View File

@@ -596,7 +596,7 @@ void system_enable_hib_interrupt(void)
task_enable_irq(NPCX_IRQ_MTC_WKINTAD_0);
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
/* Flush console before hibernating */
cflush();

View File

@@ -31,7 +31,7 @@ const char *system_get_chip_revision(void)
return "";
}
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
/* Flush console before hibernating */
cflush();

View File

@@ -103,7 +103,7 @@ void __no_hibernate(uint32_t seconds, uint32_t microseconds)
void __enter_hibernate(uint32_t seconds, uint32_t microseconds)
__attribute__((weak, alias("__no_hibernate")));
void chip_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
#ifdef CONFIG_HOSTCMD_PD
/* Inform the PD MCU that we are going to hibernate. */

View File

@@ -4,7 +4,6 @@
*/
/* System module for Chrome EC : common functions */
#include "chipset.h"
#include "clock.h"
#include "common.h"
#include "console.h"
@@ -409,23 +408,6 @@ const char *system_image_copy_t_to_string(enum system_image_copy_t copy)
return image_names[copy < ARRAY_SIZE(image_names) ? copy : 0];
}
test_mockable void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
#ifdef HAS_TASK_CHIPSET
/* Wait up to a second for chipset to shut down */
int retries = 100;
chipset_force_shutdown();
while (--retries) {
if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
break;
msleep(10);
}
if (!retries)
CPRINTS("Hibernate before chipset shutdown");
#endif
chip_hibernate(seconds, microseconds);
}
/**
* Jump to what we hope is the init address of an image.
*

View File

@@ -321,12 +321,6 @@ int system_set_bbram(enum system_bbram_idx idx, uint8_t value);
*/
void system_hibernate(uint32_t seconds, uint32_t microseconds);
/**
* Chip-level callback functions called in system_hibernate() after we force
* to shutdown the chipset and get ready to enter hibernate mode.
*/
void chip_hibernate(uint32_t seconds, uint32_t microseconds);
/**
* Optional board-level callback functions called before and after initiating
* chip-level hibernate sequence. These function may or may not return,