From 11c156aedd6c28a23ad710493f806ea69b976183 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Sat, 2 Jul 2016 20:52:17 -0700 Subject: [PATCH] cr50: init rbox before the board init is invoked Board initialization function configures certain RBOX registers, but RBOX initialization runs at the same priority as board initialization, and as such is not guaranteed to run in time. Reducing RBOX initialization priority guarantees that RBOX is initialized by the time board init function needs to access it. BRANCH=none BUG=chrome-os-partner:49959 TEST=the AP_WP_L signal now reports the expected value: > gpioget AP_WP_L 1 AP_WP_L > Change-Id: I9c29451a08fc47d3409031bda1a936de243c0c70 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/358169 Tested-by: Brian Norris Reviewed-by: Randall Spangler --- chip/g/rbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/g/rbox.c b/chip/g/rbox.c index 546003755a..6fb582dc90 100644 --- a/chip/g/rbox.c +++ b/chip/g/rbox.c @@ -72,4 +72,4 @@ void rbox_init(void) enable_interrupts(); #endif } -DECLARE_HOOK(HOOK_INIT, rbox_init, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, rbox_init, HOOK_PRIO_DEFAULT - 1);