From 3efa44c57bb0637d847f9160d38e645afda7f941 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 29 Aug 2012 12:12:42 -0700 Subject: [PATCH] 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 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 Reviewed-by: Vincent Palatin Commit-Ready: David Hendricks Tested-by: David Hendricks --- common/pmu_tps65090.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c index 4ed7c5a5c6..adb0eb79d7 100644 --- a/common/pmu_tps65090.c +++ b/common/pmu_tps65090.c @@ -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();