Re: [PATCH v2 4/5] mtd: spinand: micron: OTP access for MT29F2G01ABAGD
From: Martin Kurbanov
Date: Mon Oct 14 2024 - 08:49:51 EST
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