Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45103 )
Change subject: Add config IPMI_KCS_IO_TIMEOUT for IPMI KCS timeout value ......................................................................
Add config IPMI_KCS_IO_TIMEOUT for IPMI KCS timeout value
The current value of 1000 cycles of 100ns would see timeout occurs on OCP Delta Lake, especially when the log level is smaller than 8 because the prink(BIOS_SPEW, ..) in ipmi_kcs_status() creates delay and avoid the problem, but after setting log level to 4 we see the timeout occurs. Default remains as 1000.
Change-Id: I42ede1d9200bb5d0dbb455d2ff66e2816f10e86b Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/drivers/ipmi/Kconfig M src/drivers/ipmi/ipmi_kcs.c 2 files changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/45103/1
diff --git a/src/drivers/ipmi/Kconfig b/src/drivers/ipmi/Kconfig index 44ed17e..f86f609 100644 --- a/src/drivers/ipmi/Kconfig +++ b/src/drivers/ipmi/Kconfig @@ -33,3 +33,10 @@ help The PNP base address of BMC KCS. It must be equal to the pnp port value defined in devicetree for chip drivers/ipmi. + +config IPMI_KCS_IO_TIMEOUT + int + default 1000 + depends on IPMI_KCS + help + The timeout time for a single KCS IO in the unit of 100 microseconds. diff --git a/src/drivers/ipmi/ipmi_kcs.c b/src/drivers/ipmi/ipmi_kcs.c index 1d6b71c..e1f6c75 100644 --- a/src/drivers/ipmi/ipmi_kcs.c +++ b/src/drivers/ipmi/ipmi_kcs.c @@ -35,7 +35,7 @@
static int wait_ibf_timeout(int port) { - int timeout = 1000; + int timeout = CONFIG_IPMI_KCS_IO_TIMEOUT; do { if (!(ipmi_kcs_status(port) & IPMI_KCS_IBF)) return 0; @@ -47,7 +47,7 @@
static int wait_obf_timeout(int port) { - int timeout = 1000; + int timeout = CONFIG_IPMI_KCS_IO_TIMEOUT; do { if ((ipmi_kcs_status(port) & IPMI_KCS_OBF)) return 0;