[PATCH v9 16/18] mtd: spinand: negotiate optimal controller operating point before dirmap creation

Miquel Raynal miquel.raynal at bootlin.com
Tue Sep 8 08:54:38 PDT 2026


Hello Santhosh,

>>> +		if (!ret && spinand->max_read_op.max_freq) {
>>> +			templates->read_cache = best;
>>> +			if (spinand->all_cont_read_variants) {
>>> +				templates->cont_read_cache =
>>> +					spinand_find_cont_read_variant(spinand, best, iface);
>>> +				spinand->cont_read_possible =
>>> +					!!templates->cont_read_cache;
>> I believe you almost addressed the concerns raised in v7 about
>> cont_read_possible, except what you do here is still a bit dangerous
>> since you could re-enable continuous reads on no_cs_assertion capable
>> controllers. I believe you should clear the flag only, never risk to set
>> it, something like:
>> if (!templates->cont_read_cache)
>>      spinand->cont_read_possible = false;
>> With this fixed,
>> Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
>
> Thank you for the review.
>
> Fixed as you suggested - spinand_try_ranked_variant() now only clears
> cont_read_possible when the newly selected variant has no matching
> cont_read counterpart; Will carry this into v10 along with the other
> fixes.

Perfect, thank you. I'm good with it then.

Cheers,
Miquèl



More information about the linux-mtd mailing list