Re: [PATCH] mtd: spi-nor: Provide default address width and latency for map selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Boris!

On 30/11/2018 11:40, Boris Brezillon wrote:
>> +		/*
>> +		 * JESD216 allows to omit particular address length or latency
>> +		 * specification in the header and at this point they are still
>> +		 * unset, so we need some heuristics. One example is S25FS128S.
>> +		 */
>> +		if (!nor->addr_width)
>> +			nor->addr_width = 3;
>> +		if (!nor->read_dummy)
>> +			nor->read_dummy = 8;
>> +
> Looks like the same problem was reported by Yogesh here [1]. One more

This is indeed the same problem, although I was not aware of the [1] discussion.

> proof that parsing SFDP is not trivial. I mean, what's the point of
> defining a generic tables to describe NOR capabilities if you then
> depend on vendor/chip specific init to read those tables...
> 
> Anyway, I think this sort of initialization should be placed in a
> pre_sfdp() fixup hook, as getting the right values likely requires

This is still on my TODO list, to learn about new hooks.

> reading some volatile/non-volatile regs.

This is the same instruction 65h which is used to read regs and which
appears in SMPT headers, it is a chicken-egg problem.

Therefore, I don't know if it's possible to provide smarter heuristics
here. But without it Spansion S25FS-S Family is now broken by SFDP.

>>  		err = spi_nor_read_raw(nor, addr, 1, &data_byte);
>>  		if (err)
>>  			goto out;
> [1]https://lkml.org/lkml/2018/10/22/354
> 

-- 
Best regards,
Alexander Sverdlin.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux