From 6c077e9ed08c7af7db56ef6f334d204f78e6de8d Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 24 Nov 2016 16:06:51 +1100 Subject: p8i2c: Use calculated poll_interval when booting OPAL Otherwise we'd default to 2seconds (TIMER_POLL) during boot on chips with a functional i2c interrupt, leading to slow i2c during boot (or hitting timeouts instead). Signed-off-by: Stewart Smith --- include/skiboot.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/skiboot.h b/include/skiboot.h index 97bdce7..3f7c077 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -86,6 +86,11 @@ struct debug_descriptor { }; extern struct debug_descriptor debug_descriptor; +static inline bool opal_booting(void) +{ + return !(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE); +} + /* Console logging */ #define PR_EMERG 0 #define PR_ALERT 1 -- cgit v1.1