1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <drivers/ipmi/ipmi_if.h>
5 #include <drivers/ipmi/ipmi_ops.h>
6 #include <drivers/ipmi/ocp/ipmi_ocp.h>
7 #include <drivers/vpd/vpd.h>
13 void init_frb2_wdt(void)
16 /* Enable FRB2 timer by default. */
20 if (vpd_get_bool(FRB2_TIMER
, VPD_RW_THEN_RO
, &enable
)) {
22 printk(BIOS_DEBUG
, "Disable FRB2 timer\n");
23 ipmi_stop_bmc_wdt(CONFIG_BMC_KCS_BASE
);
28 if (vpd_gets(FRB2_COUNTDOWN
, val
, VPD_LEN
, VPD_RW_THEN_RO
)) {
29 countdown
= (uint16_t)atol(val
);
30 printk(BIOS_DEBUG
, "FRB2 timer countdown set to: %d ms\n",
33 printk(BIOS_DEBUG
, "FRB2 timer use default value: %d ms\n",
34 DEFAULT_COUNTDOWN
* 100);
35 countdown
= DEFAULT_COUNTDOWN
;
37 ipmi_init_and_start_bmc_wdt(CONFIG_BMC_KCS_BASE
, countdown
,