summaryrefslogtreecommitdiff
path: root/src/drivers/ipmi/ipmi_fru.c
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2021-10-22 01:02:32 +0300
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-02 22:01:50 +0000
commitef7dd5d54df9137b8167e86838270a7c812b21f3 (patch)
tree7f21c3e30b189c6cfa1e00380f302f269d9f6ca6 /src/drivers/ipmi/ipmi_fru.c
parent36d7f82d98ff9127f38c2517d03b90107514bf33 (diff)
drivers/ipmi: prepare for adding more interfaces
De-duplicate common initialization code (self-test and device identification) and put it in a new ipmi_if.c unit, which is supposed to work with any underlying IPMI interface. Change-Id: Ia99da6fb63adb7bf556d3d6f7964b34831be8a2f Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67056 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Diffstat (limited to 'src/drivers/ipmi/ipmi_fru.c')
-rw-r--r--src/drivers/ipmi/ipmi_fru.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/ipmi/ipmi_fru.c b/src/drivers/ipmi/ipmi_fru.c
index 822e5bfa23..f16530705f 100644
--- a/src/drivers/ipmi/ipmi_fru.c
+++ b/src/drivers/ipmi/ipmi_fru.c
@@ -5,6 +5,7 @@
#include <delay.h>
#include <stdlib.h>
+#include "ipmi_if.h"
#include "ipmi_ops.h"
#define MAX_FRU_BUSY_RETRY 5
@@ -34,7 +35,7 @@ static enum cb_err ipmi_read_fru(const int port, struct ipmi_read_fru_data_req *
req->count = CONFIG_IPMI_FRU_SINGLE_RW_SZ;
while (retry_count <= MAX_FRU_BUSY_RETRY) {
- ret = ipmi_kcs_message(port, IPMI_NETFN_STORAGE, 0x0,
+ ret = ipmi_message(port, IPMI_NETFN_STORAGE, 0x0,
IPMI_READ_FRU_DATA, (const unsigned char *) req,
sizeof(*req), (unsigned char *) &rsp, sizeof(rsp));
if (rsp.resp.completion_code == 0x81) {