[PATCH v1] cmd: mtd: OTP access support

Arseniy Krasnov avkrasnov at salutedevices.com
Fri Dec 1 11:43:05 CET 2023



On 01.12.2023 11:28, Michael Walle wrote:
> Hi,
> 
>>>> +static int do_mtd_otp_write(struct cmd_tbl *cmdtp, int flag, int argc,
>>>> +                char *const argv[])
>>>> +{
>>> ..
>>>
>>>> +    printf("Caution! OTP data bits can't be erased! Continue (y/n)?\n");
>>>
>>> Please note, that with current SPI-NOR flashes this is not true and
>>> there is usually some kind of erase command for the OTP bits. Only
>>> the region lock is permanent and with that set, no more write or erase
>>> is possible.
>>
>> I see, so may be just rephrase this message, like just "Continue? (y/n)?"
> 
> I don't have any strong opinion here. The code may or may not be used
> to write to the OTP of an SPI-NOR flash. Also, this patchset doesn't
> support the erase op (I guess u-boot's MTD won't support it either). So
> from an user's perspective these OTP data can't be erased ;)

Ok, anyway if SPI-NOR supports erasing of OTP, I'll remove these words
from the message above. About erase-op - unfortunately I don't have SPI-NOR
hardware at this moment (only NAND), so I can't test such implementation.

Thanks, Arseniy

> 
> -michael


More information about the U-Boot mailing list