[PATCH] mtd: rawnand: cadence: Add support for NV-DDR interface mode
Miquel Raynal
miquel.raynal at bootlin.com
Fri Oct 24 04:11:37 PDT 2025
>>> + 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
More information about the linux-mtd
mailing list