cros: Update ec_commands to latest version

This file has changed quite a bit in the last 5 years as the capabilities
of the ECs have grown. Sync it up with the copy in coreboot commit
b9141f2215.

The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed
because U-Boot uses the new v2 vboot API and this is not currently fully
supported by Chromium OS firmware.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2018-10-01 12:22:36 -06:00
parent 67b9052264
commit 6f1c0430e8
4 changed files with 3326 additions and 440 deletions

View file

@ -27,7 +27,7 @@ static int cros_ec_decode_region(int argc, char * const argv[])
{
if (argc > 0) {
if (0 == strcmp(*argv, "rw"))
return EC_FLASH_REGION_RW;
return EC_FLASH_REGION_ACTIVE;
else if (0 == strcmp(*argv, "ro"))
return EC_FLASH_REGION_RO;
@ -137,7 +137,6 @@ static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
printf("rows = %u\n", info.rows);
printf("cols = %u\n", info.cols);
printf("switches = %#x\n", info.switches);
} else if (0 == strcmp("curimage", cmd)) {
enum ec_current_image image;
@ -177,7 +176,7 @@ static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
region = cros_ec_decode_region(argc - 2, argv + 2);
if (region == EC_FLASH_REGION_RO)
cmd = EC_REBOOT_JUMP_RO;
else if (region == EC_FLASH_REGION_RW)
else if (region == EC_FLASH_REGION_ACTIVE)
cmd = EC_REBOOT_JUMP_RW;
else
return CMD_RET_USAGE;