public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Query Regarding NOR flash page size calculation s25fl512s
@ 2018-08-31  4:57 Yogesh Gaur
  2018-09-17 10:05 ` Yogesh Narayan Gaur
  0 siblings, 1 reply; 4+ messages in thread
From: Yogesh Gaur @ 2018-08-31  4:57 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-18 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31  4:57 Query Regarding NOR flash page size calculation s25fl512s Yogesh Gaur
2018-09-17 10:05 ` Yogesh Narayan Gaur
2018-09-17 11:41   ` Boris Brezillon
2018-09-18 10:19     ` Cyrille Pitchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox