Re: [PATCH v2 27/35] mtd: spi-nor: core: Init flash params based on SFDP first for new flash additions

Tudor.Ambarus
2021-10-04T11:37:28Z

On 10/4/21 8:01 AM, Tudor.Ambarus@microchip.com wrote:

cut

>>> + if (!treat_id_collisions)
>>> + return;
>>
>> No, this doesn't seem quite right. Why would you not want to treat ID
>> collisions for flashes that use spi_nor_init_params_deprecated()? What
>> makes this not possible for them?
>
> I think I wanted to motivate people to switch to the parse SFDP first idea.
> Why would we care for those flashes that use deprecated methods?
>

No, no, I'm wrong.

cut

>>> + if (nor->info->flags & SPI_NOR_PARSE_SFDP)
>>> + spi_nor_sfdp_init_params(nor, true);
>>> + else
>>> + spi_nor_init_params_deprecated(nor);

deprecated maybe it's not the best name, because here falls also the
non-SFDP compliant flashes, which are not mandatory seen as deprecated.

I'll rework this and resubmit.