mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
cros_ec: Fail if we cannot determine the flash burst size
This value is required for flashing to work correctly. Add a check for it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ac80652342
commit
dc05ac0f2f
1 changed files with 3 additions and 0 deletions
|
@ -827,6 +827,9 @@ int cros_ec_flash_write(struct udevice *dev, const uint8_t *data,
|
|||
uint32_t end, off;
|
||||
int ret;
|
||||
|
||||
if (!burst)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* TODO: round up to the nearest multiple of write size. Can get away
|
||||
* without that on link right now because its write size is 4 bytes.
|
||||
|
|
Loading…
Reference in a new issue