diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-06-02 13:52:26 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-24 11:50:12 +0000 |
commit | 0623b010362b567d66ae696176478c48a1c67fdd (patch) | |
tree | 639503b144437144dda646181d3954514965b301 /src/southbridge/intel | |
parent | c08d4c5c550b84c5067c4cdb5369960bf0f47bf2 (diff) |
sb/intel/bd82x6x: Align mei_recv_msg() functions
They only differ in rather small details, so we can iron them out.
Tested on Asus P8Z77-V LX2, still boots.
Change-Id: I01907f1b8576e82c74b7beeea31ae8ee3e2cc773
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42010
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/bd82x6x/me.c | 8 | ||||
-rw-r--r-- | src/southbridge/intel/bd82x6x/me_8.x.c | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/southbridge/intel/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c index 40b0cc2bd8..03b954f9fa 100644 --- a/src/southbridge/intel/bd82x6x/me.c +++ b/src/southbridge/intel/bd82x6x/me.c @@ -234,8 +234,7 @@ static int mei_send_msg(struct mei_header *mei, struct mkhi_header *mkhi, return mei_wait_for_me_ready(); } -static int mei_recv_msg(struct mei_header *mei, struct mkhi_header *mkhi, - void *rsp_data, int rsp_bytes) +static int mei_recv_msg(struct mkhi_header *mkhi, void *rsp_data, int rsp_bytes) { struct mei_header mei_rsp; struct mkhi_header mkhi_rsp; @@ -279,7 +278,8 @@ static int mei_recv_msg(struct mei_header *mei, struct mkhi_header *mkhi, if (mei_rsp.length & 3) ndata++; if (ndata != (expected - 1)) { - printk(BIOS_ERR, "ME: response is missing data\n"); + printk(BIOS_ERR, "ME: response is missing data %d != %d\n", + ndata, (expected - 1)); return -1; } @@ -322,7 +322,7 @@ static inline int mei_sendrecv(struct mei_header *mei, struct mkhi_header *mkhi, { if (mei_send_msg(mei, mkhi, req_data) < 0) return -1; - if (mei_recv_msg(mei, mkhi, rsp_data, rsp_bytes) < 0) + if (mei_recv_msg(mkhi, rsp_data, rsp_bytes) < 0) return -1; return 0; } diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c index 1f267f90f5..ff94a88e78 100644 --- a/src/southbridge/intel/bd82x6x/me_8.x.c +++ b/src/southbridge/intel/bd82x6x/me_8.x.c @@ -234,13 +234,12 @@ static int mei_send_msg(struct mei_header *mei, struct mkhi_header *mkhi, return mei_wait_for_me_ready(); } -static int mei_recv_msg(struct mkhi_header *mkhi, - void *rsp_data, int rsp_bytes) +static int mei_recv_msg(struct mkhi_header *mkhi, void *rsp_data, int rsp_bytes) { struct mei_header mei_rsp; struct mkhi_header mkhi_rsp; struct mei_csr me, host; - unsigned int ndata, n/*, me_data_len*/; + unsigned int ndata, n; unsigned int expected; u32 *data; |