From 957857de6afb1f4e1431edc6b3f0ef5c7a60542f Mon Sep 17 00:00:00 2001 From: Rizwan Qureshi Date: Mon, 30 Aug 2021 16:43:57 +0530 Subject: soc/intel/common/cse: Add argument for CSE fixed client addr There are multiple HECI clients in the CSE. heci_send_receive() is sending HECI messages to only the MKHI client. Add an argument to heci_send_receive() function to provide flexibility to the caller to select the client for which the message is intended. With the above change heci_send() and heci_receive() functions are no longer required to be exposed. In the follow-up patches there will be messages sent to one other client. BUG=None BRANCH=None TEST=Build and boot brya. HECI message send and receive to MKHI client is working. Also, MEI BUS message to disable bus is working. Signed-off-by: Rizwan Qureshi Change-Id: Icde6d0155b62472b6a7caadc5fc8ea2e2ba6eb0c Reviewed-on: https://review.coreboot.org/c/coreboot/+/57295 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/apollolake/cse.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/cse.c b/src/soc/intel/apollolake/cse.c index 1558d38b00..24fb41749d 100644 --- a/src/soc/intel/apollolake/cse.c +++ b/src/soc/intel/apollolake/cse.c @@ -44,7 +44,6 @@ static enum fuse_flash_state { static int read_cse_file(const char *path, void *buff, size_t *size, size_t offset, uint32_t flags) { - int res; size_t reply_size; struct mca_command { @@ -77,18 +76,10 @@ static int read_cse_file(const char *path, void *buff, size_t *size, msg.data_size = *size; msg.offset = offset; - res = heci_send(&msg, sizeof(msg), BIOS_HOST_ADDR, HECI_MKHI_ADDR); - - if (!res) { - printk(BIOS_ERR, "failed to send HECI message\n"); - return 0; - } - reply_size = sizeof(rmsg); - res = heci_receive(&rmsg, &reply_size); - if (!res) { - printk(BIOS_ERR, "failed to receive HECI reply\n"); + if (!heci_send_receive(&msg, sizeof(msg), &rmsg, &reply_size, HECI_MKHI_ADDR)) { + printk(BIOS_ERR, "HECI: Failed to read file\n"); return 0; } -- cgit v1.2.3