summaryrefslogtreecommitdiff
path: root/drivers/misc/cros_ec_sandbox.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-06 01:32:51 +0300
committerSimon Glass <sjg@chromium.org>2021-07-21 19:27:34 +0300
commit656d7447705550af0b464e7f6bc10fc1547e69ee (patch)
tree5ed5cbb24e362ae56b585ef1fc0eeffab340a9ac /drivers/misc/cros_ec_sandbox.c
parent1e465eb6698e294e8fa9ed41165483b88062396a (diff)
downloadu-boot-656d7447705550af0b464e7f6bc10fc1547e69ee.tar.xz
cros_ec: Support the full-size vboot context
The v2 format is 64-bytes in size. Support this and drop v1 since it is not used anymore. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/cros_ec_sandbox.c')
-rw-r--r--drivers/misc/cros_ec_sandbox.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index ab91f3fa67..12cc11efbd 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -343,15 +343,13 @@ static int process_cmd(struct ec_state *ec,
switch (req->op) {
case EC_VBNV_CONTEXT_OP_READ:
- /* TODO(sjg@chromium.org): Support full-size context */
memcpy(resp->block, ec->vbnv_context,
- EC_VBNV_BLOCK_SIZE);
- len = 16;
+ EC_VBNV_BLOCK_SIZE_V2);
+ len = EC_VBNV_BLOCK_SIZE_V2;
break;
case EC_VBNV_CONTEXT_OP_WRITE:
- /* TODO(sjg@chromium.org): Support full-size context */
memcpy(ec->vbnv_context, req->block,
- EC_VBNV_BLOCK_SIZE);
+ EC_VBNV_BLOCK_SIZE_V2);
len = 0;
break;
default: