From Qi-Hardware
Jump to: navigation, search


[edit] Overview

This page tries to look for causes and possible mitigation for long UBI (nand flash) attach times that slow down the Ben Nanonote's boot process.

[edit] Possible Causes

[edit] No subpage reading support in driver

Nanonote driver uses a flash access mode of NAND_ECC_HW_OOB_FIRST. Looks like sub-page reads are not supported, so UBI attach has to read one page (4Kbyte) per PEB during initialization, much more than required. The ECC size of 2G flash chip is 72 bytes (according to board-qi_lb60.c), so sub-page reads would in theory be possible!?

[edit] Possible Solutions

[edit] subpage reading

We could switch to software-based ECC (NAND_ECC_SOFT) to allow subpage reading. Or hack the driver to use software-ecc only for subpages. According to comments on IRC, that's not a too good itea, as SW ECC is quite slow

Instead the best way to implement partial reads would be to use the HW ECC that works on 512 byte blocks. Some comments from larsc on IRC:

11:59 <larsc> but you might indeed gain some improvements if you do not
              read the whole page
11:59 <larsc> nand_do_read_ops does all the work
12:00 <larsc> you could extend the read_page callback to take a bytes
              argument and stop when enough bytes have been read

[edit] Links

Personal tools