hw/bt.c: Fix message timeout
hw/bt.c: Fix message timeout

Commit fb457c9 (hw/bt: Ask the BMC for its BT interface capabilities)
sets the BT message timeout based on the IPMI get capabilities
command. This adds a new structure containing a uint8_t to store the
message timeout in seconds (msg_timeout).

This introduces two problems:

1) The code that checks for timeouts assumes msg_timeout is in units
of the timebase (tb_hz).

2) If get_bt_caps() fails msg_timeout is set to BT_MSG_TIMEOUT which
is in units of tb_hz and easily overflows a uint8_t.

This patch solves the above two problems by changing the definition of
BT_MSG_TIMEOUT to seconds and using secs_to_tb() when comparing
timebases. It also converts the timebase comparison to use
tb_compare().

Signed-off-by: Alistair Popple <e9adbcf81c8a36ccc628e09bc92d0e25e1c8e501@popple.id.au>
Cc: Cyril Bur <6ce38dade8c4b52fd55c193fae70fd1d1275c3c3@au1.ibm.com>
Cc: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>
Cc: Jeremy Kerr <68a658b44bbaefab3ef5cd231967195fc0ff9d69@ozlabs.org>
Cc: Mamatha Inamdar <c9c04db4563c6ba28a835170b40378a5b6527c82@linux.vnet.ibm.com>
Tested-by: Vipin K Parashar <f7dae5427b3dec859a8db9747c62b0d6fc100992@linux.vnet.ibm.com>
Reviewed-by: Vaibhav Jain <e78384dfaa97bf0f3945c4da4075af8ac33ade0a@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

shenki/skiboot,shenki/skiboot,legoater/skiboot,open-power/skiboot,qemu/skiboot,shenki/skiboot,legoater/skiboot,qemu/skiboot,mikey/skiboot,mikey/skiboot,qemu/skiboot,open-power/skiboot,legoater/skiboot,qemu/skiboot,open-power/skiboot,stewart-ibm/skiboot,legoater/skiboot,qemu/skiboot,mikey/skiboot,open-power/skiboot,legoater/skiboot,stewart-ibm/skiboot,open-power/skiboot,shenki/skiboot,stewart-ibm/skiboot,shenki/skiboot