diff options
author | Rizwan Qureshi <rizwan.qureshi@intel.com> | 2021-08-30 16:43:57 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-09-05 19:32:11 +0000 |
commit | 957857de6afb1f4e1431edc6b3f0ef5c7a60542f (patch) | |
tree | 95767ddc6e10ee8eb2718c26c590bf5979c77680 /src/soc/intel/apollolake | |
parent | 92db5d734c7c20c70c3a87b23cd48ccb8acbaf1a (diff) |
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 <rizwan.qureshi@intel.com>
Change-Id: Icde6d0155b62472b6a7caadc5fc8ea2e2ba6eb0c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r-- | src/soc/intel/apollolake/cse.c | 13 |
1 files changed, 2 insertions, 11 deletions
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; } |