aboutsummaryrefslogtreecommitdiff
path: root/hw/bt.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2014-11-05 14:40:49 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-12 16:41:26 +1100
commit92443c4cda88be28afffb1b1888805dd8953cd87 (patch)
tree095eea4bb15a819d2d861ec5c7fe345ba04da864 /hw/bt.c
parentcda7da4f537e88719930318a1a98da53d5268fe1 (diff)
downloadskiboot-92443c4cda88be28afffb1b1888805dd8953cd87.zip
skiboot-92443c4cda88be28afffb1b1888805dd8953cd87.tar.gz
skiboot-92443c4cda88be28afffb1b1888805dd8953cd87.tar.bz2
bt: Reinitialise bt interface correctly after a reset
Add a call to bt_init_interface() in bt_reset_interface(). This ensures that interrupts are re-enabled after a bt interface reset. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/bt.c')
-rw-r--r--hw/bt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/bt.c b/hw/bt.c
index da84da0..4a5cac6 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -130,12 +130,6 @@ static void bt_msg_del(struct bt_msg *bt_msg)
IPMI_TIMEOUT_ERR, &bt_msg->ipmi_msg);
}
-static void bt_reset_interface(void)
-{
- bt_outb(BT_INTMASK_BMC_HWRST, BT_INTMASK);
- bt_set_state(BT_STATE_B_BUSY);
-}
-
static void bt_init_interface(void)
{
/* Clear interrupt condition & enable irq */
@@ -147,6 +141,12 @@ static void bt_init_interface(void)
bt_set_state(BT_STATE_B_BUSY);
}
+static void bt_reset_interface(void)
+{
+ bt_outb(BT_INTMASK_BMC_HWRST, BT_INTMASK);
+ bt_init_interface();
+}
+
static bool bt_try_send_msg(void)
{
int i;