mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
apollolake: ignore PLTRST# from SOC unless RSMRST# is deasserted
add optional chipset specific function to check if PLTRST# is valid BUG=chrome-os-partner:52656 BRANCH=none TEST=make buildall, able to boot to OS on amenia Change-Id: I7a2747c4f77f50393c3250c2ab0e1625e64e5a41 Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/341732 Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
/* LPC module for Chrome EC */
|
||||
|
||||
#include "acpi.h"
|
||||
#include "chipset.h"
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
@@ -756,11 +757,9 @@ void lpc_lreset_pltrst_handler(void)
|
||||
/* Clear pending bit of WUI */
|
||||
SET_BIT(NPCX_WKPCL(MIWU_TABLE_0 , MIWU_GROUP_5), 7);
|
||||
|
||||
#ifdef GPIO_PCH_RSMRST_L
|
||||
/* Ignore PLTRST# from SOC unless RSMRST# to soc is deasserted */
|
||||
if (!gpio_get_level(GPIO_PCH_RSMRST_L))
|
||||
/* Ignore PLTRST# from SOC if it is not valid */
|
||||
if (chipset_pltrst_is_valid && !chipset_pltrst_is_valid())
|
||||
return;
|
||||
#endif
|
||||
|
||||
ccprintf("[%T PLTRST deasserted]\n");
|
||||
|
||||
|
||||
@@ -101,4 +101,11 @@ static inline void power_interrupt(enum gpio_signal signal) { }
|
||||
|
||||
#endif /* !HAS_TASK_CHIPSET */
|
||||
|
||||
/**
|
||||
* Optional chipset check if PLTRST# is valid.
|
||||
*
|
||||
* @return non-zero if PLTRST# is valid, 0 if invalid.
|
||||
*/
|
||||
int chipset_pltrst_is_valid(void) __attribute__((weak));
|
||||
|
||||
#endif /* __CROS_EC_CHIPSET_H */
|
||||
|
||||
@@ -450,3 +450,18 @@ void power_signal_interrupt_S0(enum gpio_signal signal)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* chipset check if PLTRST# is valid.
|
||||
*
|
||||
* @return non-zero if PLTRST# is valid, 0 if invalid.
|
||||
*/
|
||||
int chipset_pltrst_is_valid(void)
|
||||
{
|
||||
/*
|
||||
* Invalid PLTRST# from SOC unless RSMRST#
|
||||
* from PMIC through EC to soc is deasserted.
|
||||
*/
|
||||
return (gpio_get_level(GPIO_RSMRST_L_PGOOD) &&
|
||||
gpio_get_level(GPIO_PCH_RSMRST_L));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user