[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de27927d-ce37-4c0f-85d0-e32bae3f0ef9@salutedevices.com>
Date: Mon, 14 Oct 2024 15:48:46 +0300
From: Martin Kurbanov <mmkurbanov@...utedevices.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
CC: Richard Weinberger <richard@....at>, Vignesh Raghavendra
<vigneshr@...com>, Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Michael Walle" <michael@...le.cc>, Mark Brown <broonie@...nel.org>, Chia-Lin
Kao <acelan.kao@...onical.com>, Md Sadre Alam <quic_mdalam@...cinc.com>,
"Ezra Buehler" <ezra.buehler@...qvarnagroup.com>, Sridharan S N
<quic_sridsn@...cinc.com>, Frieder Schrempf <frieder.schrempf@...tron.de>,
Alexey Romanov <avromanov@...utedevices.com>, <linux-kernel@...r.kernel.org>,
<linux-mtd@...ts.infradead.org>, <kernel@...utedevices.com>
Subject: Re: [PATCH v2 4/5] mtd: spinand: micron: OTP access for
MT29F2G01ABAGD
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
Powered by blists - more mailing lists