/* The offset starts at 0. You can obtain the region information from cros_ec_flash_offset() to find out where to read for a particular region. */
static int cros_ec_flash_read_block(struct udevice *dev, uint8_t *data, uint32_t offset, uint32_t size)
/* The offset starts at 0. You can obtain the region information from cros_ec_flash_offset() to find out where to read for a particular region. */
static int cros_ec_flash_read_block(struct udevice *dev, uint8_t *data, uint32_t offset, uint32_t size)
{
	struct ec_params_flash_read p;
	p.offset = offset;
	p.size = size;
	return ec_command(dev, EC_CMD_FLASH_READ, 0,
			  &p, sizeof(p), data, size) >= 0 ? 0 : -1;
}