[PATCH v2 4/5] mtd: spinand: micron: OTP access for MT29F2G01ABAGD

Martin Kurbanov mmkurbanov at salutedevices.com
Mon Oct 14 05:48:46 PDT 2024


Hi Miquel,

On 10/1/24 12:31, Miquel Raynal wrote:

>> +#define MICRON_MT29F2G01ABAGD_OTP_PAGES			12
>> +#define MICRON_MT29F2G01ABAGD_OTP_PAGE_SIZE		2176
> 
> In the core we did add the data size and the OOB size to get the OTP
> page size. I would prefer something dynamic here as well, otherwise the
> implementation is very device specific for now reason?

Do you mean:
otp_page_size = nanddev_page_size(nand) + nanddev_per_page_oobsize(nand)

>> +		size_t i = 0;
>> +
>> +		/* If all zeros, then the OTP area is locked. */
>> +		while (i < buf_size && *(uint32_t *)(&buf[i]) == 0)
>> +			i += 4;
> 
> Shall we expect buf_size to always be a multiple of 4? (real question)

This function is only for the nand flash MT29F2G01ABAGD that has a page
size multiple of 4.

-- 
Best Regards,
Martin Kurbanov




More information about the linux-mtd mailing list