aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-03-06 13:22:09 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-06 13:22:09 +1100
commit6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87 (patch)
treee223fa891e43ceec6021284fd1d63e27a0022425 /include
parent015038fa72a63a8424743deb2d9e7f85cdc3c70a (diff)
downloadskiboot-6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87.zip
skiboot-6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87.tar.gz
skiboot-6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87.tar.bz2
Refactor fsp-rtc.c to not call fsp_sync_msg (and thus pollers) with lock held
We introduce simple state machine, have liberal assert()s and very clearly indicate what's protected by the lock (everything). We also stop waiting for the initial RTC response on boot, which will ever so slightly speed up booting. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/fsp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/fsp.h b/include/fsp.h
index b65ef98..b796bfb 100644
--- a/include/fsp.h
+++ b/include/fsp.h
@@ -617,6 +617,15 @@ static inline bool fsp_msg_busy(struct fsp_msg *msg)
return true;
}
+static inline u32 fsp_msg_cmd(const struct fsp_msg *msg)
+{
+ u32 cmd_sub_mod;
+ cmd_sub_mod = (msg->word0 & 0xff) << 16;
+ cmd_sub_mod |= (msg->word1 & 0xff) << 8;
+ cmd_sub_mod |= (msg->word1 & 0xff00) >> 8;
+ return cmd_sub_mod;
+}
+
/* Initialize the FSP mailbox driver */
extern void fsp_init(void);