RE: Query Regarding NOR flash page size calculation s25fl512s

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

 



Hi All,

Please suggest how can we work for this flash, s25fl512s?
Passing flag SPI_NOR_SKIP_SFDP would going to break functionality of 1-2-2/1-4-4 protocol mode, as only through SFDP parameter read we get information for the dummy cycles, mode bits etc for this flash.

But, page_size value is getting populated wrongly for case when value of CR3V[4] is 0 for this flash.

--
Regards
Yogesh Gaur

> -----Original Message-----
> From: linux-mtd [mailto:linux-mtd-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> Yogesh Gaur
> Sent: Friday, August 31, 2018 10:28 AM
> To: linux-mtd@xxxxxxxxxxxxxxxxxxx
> Subject: Query Regarding NOR flash page size calculation s25fl512s
> 
> Hi All,
> 
> I have query and concern regarding page_size calculation for the underlying
> NOR flashes.
> 
> I have spansion, ‘s25fl512s’ flash connected on my target.
> 
> With SFDP param reading, page_size for this flash is assigned as 0x200 using
> below routine.
>    /* Page size: this field specifies 'N' so the page size = 2^N bytes. */
>    params->page_size = bfpt.dwords[BFPT_DWORD(11)];
>    params->page_size &= BFPT_DWORD11_PAGE_SIZE_MASK;
>    params->page_size >>= BFPT_DWORD11_PAGE_SIZE_SHIFT;
>    params->page_size = 1U << params->page_size;
> 
> As per the BG of S25FS512S_512_M flash and SFDP header info table above
> calculation are correct.
> 
> But final value of the page_size for this flash is depends on the configuration
> register CR3V[4], page buffer wrap, it can be either of
> 256 byte (0) or 512 byte (1).
> 
> For my case, this value is 0 and page_size becomes 0x100 bytes but with SFDP
> header read, value for this is being assigned as 0x200.
> Due to this, I am getting data corruption.
> 
> Please suggest, how can we check and proceed in these case. I guess this is
> specific to spansion family of flashes.
> 
> IMO, for this flash we need to add flag SPI_NOR_SKIP_SFDP for entry of this
> flash, s25fl512s.
> 
> 
> Regards,
> Yogesh
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infr
> adead.org%2Fmailman%2Flistinfo%2Flinux-
> mtd%2F&amp;data=02%7C01%7Cyogeshnarayan.gaur%40nxp.com%7Cebe34d2
> 48bd54e4c399508d60efe5805%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%
> 7C0%7C636712882907344494&amp;sdata=m%2BtwKRbzFEYc2hqxUiloYT5SKGq
> eAkscVVPk7AkOaHM%3D&amp;reserved=0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




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

  Powered by Linux