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]

 



On Mon, 3 Dec 2018 08:37:17 +0000
"Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@xxxxxxxxx>
wrote:

> Hi!
> 
> On 03/12/2018 09:23, Boris Brezillon wrote:
> >> This is the same instruction 65h which is used to read regs and which
> >> appears in SMPT headers, it is a chicken-egg problem.  
> > Oh, right, I remember now. Not a smart decision from Spansion :-/.
> >   
> >> Therefore, I don't know if it's possible to provide smarter heuristics
> >> here.  
> > Maybe:
> > 
> > ref_cr1 = read_CR1_using_RDCR()
> > 
> > for_each_possible_dummy_and_addr_width
> > 	cr1 = read_CR1_using_RDAR()
> > 	if (cr1 == ref_cr1)
> > 		break;  
> 
> This will not work, as default value for CR1(N)V is 0 and that is the value
> one gets with incorrect addr_width as well.
> 

How about:

	// set the WE bit in SR1 so that SR1 is not 0
	write_enable()

	ref_sr1 = read_SR1_using_RDSR1()
	for_each_possible_dummy_and_addr_width
	sr1 = read_SR1_using_RDAR()
	if (sr1 == ref_sr1)
		break;

	write_disable()  

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



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

  Powered by Linux