[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xc4r1ue.fsf@bootlin.com>
Date: Fri, 24 Oct 2025 13:11:37 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Niravkumar L Rabara <niravkumarlaxmidas.rabara@...era.com>
Cc: richard@....at, vigneshr@...com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: rawnand: cadence: Add support for NV-DDR interface
mode
>>> + if (dll_phy_gate_open_delay > NVDDR_GATE_CFG_MIN)
>>> + ie_start = NVDDR_GATE_CFG_MIN;
>> Can you double check here? I would expect < instead of > given that
>> you
>> compare with something you named "minimum". Maybe it is legitimate, just
>> warning.
>
> I have double checked, the logic is correct. May be I shouldn't use _MIN
> to avoid confusion.
> In v2 I will change NVDDR_GATE_CFG_MIN to NVDDR_GATE_CFG_STD.
Ok.
>>> + if (nand_interface_is_sdr(conf)) {
>>> + const struct nand_sdr_timings *sdr = nand_get_sdr_timings(conf);
>>> +
>>> + if (IS_ERR(sdr))
>>> + return PTR_ERR(sdr);
>>> +
>>> + ret = cadence_nand_setup_sdr_interface(chip, sdr);
>>> + } else if (chipnr >= 0) {
>> This isn't very clear. Please make it a separate condition if you
>> think
>> you must handle this case. Otherwise you're mixing it with the SDR
>> vs. NVDDR choice, and that's misleading.
> Noted.
> I will make a separate condition check as below in v2.
>
> - } else if (chipnr >= 0) {
> - const struct nand_nvddr_timings *nvddr =
> nand_get_nvddr_timings(conf);
> + } else {
> + if (chipnr < 0)
> + return ret;
Why do you check chipnr only for the NVDDR interface? I don't think it
makes sense. chipnr should probably be checked before the whole if()
block.
Miquèl
Powered by blists - more mailing lists