On 9/5/23 05:43, Venkatesh Yadav Abbarapu wrote:
When we pass the size parameter to the command "sf erase",

please avoid we

flash_is_unlocked() api is getting updated with length which is
incorrect. Fix this flash_is_unlocked() api by passing the size
parameter.

ZynqMP> sf erase 0 100000
len=0x8000000 which is flash size
size=0x100000

We need to update the size in the flash_is_unlocked() api and not
the length.

I think it will be good to rewrite it.

When flash erase is called with size parameter, code is checking if sectors are locked or not. But for checking the whole device length is used instead of actual size which should be erased. That's why when only some sectors are locked it is not possible to erase unlocked sectors.

Did I describe the issue properly?

Thanks,
Michal

Reply via email to