diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-24 16:06:51 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-24 16:47:16 +1100 |
commit | 6c077e9ed08c7af7db56ef6f334d204f78e6de8d (patch) | |
tree | bbdbfc64d5cff3a163da3b6f1409dfa60c870261 /include | |
parent | a5761fb4585520983716d17fdb33f04891cf0479 (diff) | |
download | skiboot-6c077e9ed08c7af7db56ef6f334d204f78e6de8d.zip skiboot-6c077e9ed08c7af7db56ef6f334d204f78e6de8d.tar.gz skiboot-6c077e9ed08c7af7db56ef6f334d204f78e6de8d.tar.bz2 |
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 <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/skiboot.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 |