Lines Matching +full:cros +full:- +full:ec
1 // SPDX-License-Identifier: GPL-2.0+
13 #include <dm/device-internal.h>
14 #include <dm/uclass-internal.h>
24 * @return flash region (EC_FLASH_REGION_...) or -1 on error
39 return -1; in cros_ec_decode_region()
45 * @param dev CROS-EC device to read/write
49 * @return 0 for ok, 1 for a usage error or -ve for ec command error
55 uint32_t offset, size = -1U, region_size; in do_read_write()
61 region = cros_ec_decode_region(argc - 2, argv + 2); in do_read_write()
62 if (region == -1) in do_read_write()
80 if (size == -1U) in do_read_write()
120 printf("Cannot get cros-ec device (err=%d)\n", ret); in do_cros_ec()
158 printf("type: SHA-256\n"); in do_cros_ec()
176 region = cros_ec_decode_region(argc - 2, argv + 2); in do_cros_ec()
216 int region = cros_ec_decode_region(argc - 2, argv + 2); in do_cros_ec()
219 if (region == -1) in do_cros_ec()
223 ret = -1; in do_cros_ec()
232 int region = cros_ec_decode_region(argc - 2, argv + 2); in do_cros_ec()
235 if (region == -1) in do_cros_ec()
311 (int)sizeof(p->version_string_ro), in do_cros_ec()
312 p->version_string_ro); in do_cros_ec()
314 (int)sizeof(p->version_string_rw), in do_cros_ec()
315 p->version_string_rw); in do_cros_ec()
317 (p->current_image < in do_cros_ec()
319 ec_current_image_name[p->current_image] : in do_cros_ec()
357 printf("Error: CROS-EC command failed (error %d)\n", ret); in do_cros_ec()
366 "CROS-EC utility command",
367 "init Re-init CROS-EC (done on startup automatically)\n"
368 "crosec id Read CROS-EC ID\n"
369 "crosec info Read CROS-EC info\n"
370 "crosec curimage Read CROS-EC current image\n"
371 "crosec hash Read CROS-EC hash\n"
372 "crosec reboot [rw | ro | cold] Reboot CROS-EC\n"
373 "crosec events Read CROS-EC host events\n"
374 "crosec clrevents [mask] Clear CROS-EC host events\n"
377 "crosec erase <ro|rw> Erase EC image\n"
378 "crosec read <ro|rw> <addr> [<size>] Read EC image\n"
379 "crosec write <ro|rw> <addr> [<size>] Write EC image\n"
380 "crosec vbnvcontext [hexstring] Read [write] VbNvContext from EC\n"
383 "crosec version Read CROS-EC version"