ReadPageSpareWithLayout() & WritePageSpareWithLayout() Still Exist?

43 views
Skip to first unread message

Gil Glass

unread,
Sep 13, 2018, 10:31:57 AM9/13/18
to UFFS
Thanks for your help on the other topic, Ricky.  I'm finally returning to my UFFS integration task and have some more questions.

As I think I mentioned, we are using our flash driver to do OOB layout and ECC calculation so our layout_opt is UFFS_LAYOUT_FLASH and ecc_opt is UFFS_ECC_HW_AUTO.  According to the documentation in http://all-about-uffs.blogspot.com/, we must implement the ReadPageSpareWithLayout() and WritePageSpareWithLayout() API functions in our adaptation layer.  However, I do not see any calls to these functions, nor to ReadPageSpare() and WritePageSpare(), anywhere in the 1.3.6 UFFS code.  So...

1.  Do we still have to implement these?  I'm guessing not since they're not called and there's no place for them in struct uffs_FlashOpsSt.

2.  If we do not implement them, how will UFFS handle reading from and writing to the spare (OOB) area?

3.  Are we instead supposed to manually populate (for page reads) and take from (for page writes) the uffs_TagStoreSt structure?

Thanks very much.

Gil Glass

Ricky Zheng

unread,
Sep 13, 2018, 5:12:43 PM9/13/18
to uf...@googlegroups.com
Hi Gil,

From v1.3.3, ReadPageSpareWithLayout/WritePageSpareWithLayout are no longer needed. Instead, these functions should be implemented in ReadPageWithLayout/WritePageWithLayout.

So for your case, you should implement ReadPageWithLayout/WritePageWithLayout.

Since you choose UFFS_ECC_HW_AUTO, your flash driver should do ECC calculation in WritePageWithLayout, and do ECC correction in ReadPageWithLayout.

Regards,
Ricky

--
You received this message because you are subscribed to the Google Groups "UFFS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uffs+uns...@googlegroups.com.
To post to this group, send email to uf...@googlegroups.com.
Visit this group at https://groups.google.com/group/uffs.
For more options, visit https://groups.google.com/d/optout.

Ricky Zheng

unread,
Sep 13, 2018, 5:16:12 PM9/13/18
to uf...@googlegroups.com
For your quesion (3), yes you should manually populate and taken from offs_TagStoreSt which passed to ReadPageWithLayout/WritePageWithLayout in *ts parameter.

Please take src/emu/uffs_fileem_ecc_hw_auto.c as reference.

Regards,
Ricky
Reply all
Reply to author
Forward
0 new messages