aboutsummaryrefslogtreecommitdiff
path: root/hw/bt.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-08-09 16:38:13 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-11 19:54:22 +1000
commitc8fc681aa2ed5dc5584518d213eeecb2eef7b22c (patch)
treeac312aa93b378d62a143e774b57723120334c707 /hw/bt.c
parentbc8817ede97fde4bc4f1cabd5ea9794d21571098 (diff)
downloadskiboot-c8fc681aa2ed5dc5584518d213eeecb2eef7b22c.zip
skiboot-c8fc681aa2ed5dc5584518d213eeecb2eef7b22c.tar.gz
skiboot-c8fc681aa2ed5dc5584518d213eeecb2eef7b22c.tar.bz2
platform: Add BT to Generic platform
Instantiate if if it's in the device-tree... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/bt.c')
-rw-r--r--hw/bt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/bt.c b/hw/bt.c
index 19a34e9..2ecc7d3 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -26,6 +26,7 @@
#include <timer.h>
#include <ipmi.h>
#include <timebase.h>
+#include <chip.h>
/* BT registers */
#define BT_CTRL 0
@@ -379,8 +380,9 @@ static void bt_expire_old_msg(uint64_t tb)
bt_msg = list_top(&bt.msgq, struct bt_msg, link);
- if (bt_msg && bt_msg->tb > 0 &&
- (tb_compare(tb, bt_msg->tb + secs_to_tb(bt.caps.msg_timeout)) == TB_AAFTERB)) {
+ if (bt_msg && bt_msg->tb > 0 && !chip_quirk(QUIRK_SIMICS) &&
+ (tb_compare(tb, bt_msg->tb +
+ secs_to_tb(bt.caps.msg_timeout)) == TB_AAFTERB)) {
if (bt_msg->send_count <= bt.caps.max_retries) {
/* A message timeout is usually due to the BMC
* clearing the H2B_ATN flag without actually
@@ -626,8 +628,10 @@ void bt_init(void)
/* We support only one */
n = dt_find_compatible_node(dt_root, NULL, "ipmi-bt");
- if (!n)
+ if (!n) {
+ prerror("No BT device\n");
return;
+ }
/* Get IO base */
prop = dt_find_property(n, "reg");