mb/google/nissa/var/rull: Add 6W and 15W DPTF parameters
[coreboot2.git] / src / mainboard / ocp / tiogapass / ipmi.c
blobe97341b2b6780fe5f5b23bb41f324ee7ee10fdfa
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>
8 #include <string.h>
10 #include "ipmi.h"
11 #include "vpd.h"
13 void init_frb2_wdt(void)
15 char val[VPD_LEN];
16 /* Enable FRB2 timer by default. */
17 u8 enable = 1;
18 uint16_t countdown;
20 if (vpd_get_bool(FRB2_TIMER, VPD_RW_THEN_RO, &enable)) {
21 if (!enable) {
22 printk(BIOS_DEBUG, "Disable FRB2 timer\n");
23 ipmi_stop_bmc_wdt(CONFIG_BMC_KCS_BASE);
24 return;
27 if (enable) {
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",
31 countdown * 100);
32 } else {
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,
38 TIMEOUT_HARD_RESET);