mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
move pmu_init_registers() from pmu_init() to chipset pre-init hook
This moves the PMU register initialization from pmu_init(), which gets called whenever the EC reboots/sysjumps (even when the AP is running), to a hook which will can called selectively when the AP is cold booting. Signed-off-by: David Hendricks <dhendrix@chromium.org> BRANCH=snow BUG=chrome-os-partner:13315 TEST=tested on snow - jumping between RO <--> RW no longer causes the screen to turn off due to resetting FET control regs. Change-Id: I5453bf86af50b84a05a259dc896f04d818b5641b Reviewed-on: https://gerrit.chromium.org/gerrit/31740 Reviewed-by: Charlie Mooney <charliemooney@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -469,15 +469,12 @@ static int pmu_init_registers(void)
|
||||
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, pmu_init_registers, HOOK_PRIO_DEFAULT);
|
||||
|
||||
void pmu_init(void)
|
||||
{
|
||||
int failure = 0;
|
||||
|
||||
/* Reset everything to default, safe values */
|
||||
if (!failure)
|
||||
failure = pmu_init_registers();
|
||||
|
||||
#ifdef CONFIG_PMU_BOARD_INIT
|
||||
if (!failure)
|
||||
failure = board_pmu_init();
|
||||
|
||||
Reference in New Issue
Block a user