2015/10/18

MLC Page Written Randomly?

Can UBI logical eraseblocks be written randomly?

No, the flash chip restrictions have to be taken into account. This is because UBI logical eraseblocks (LEB) are mapped to physical eraseblocks (PEB), and an LEB write operation is essentially a write to the corresponding PEB plus a small offset. The important flash restrictions are:

all writes have to be aligned to the min. I/O unit size and be multiple of min. I/O unit size;
sometimes it is prohibited to write more then once to the same PEB offset (e.g., in case of NAND flash);
many NAND flashes (specifically, MLC NAND flashes) require NAND pages to be written sequentially from the beginning of the physical eraseblock, to the end of the physical eraseblock; for example, it is prohibited to first write to offset 2048, then to offset 0; once offset 2048 has been written to, it is possible to write only to further offsets.

Even if the flash chip is devoid of the last restriction, UBI anyway requires logical eraseblocks to be written sequentially from the beginning to the end. This is because UBI calculates data CRC when moving logical eraseblocks to other physical eraseblocks (see here for more information), so a write an offset which is less than the furthest written data offset causes CRC errors;


Reference
http://www.linux-mtd.infradead.org/faq/ubi.html

2015/10/12

Linux Support for eMMC

Software Layer
File System  (Sector Based)
Card  (Block Device Driver)
Core  (eMMC Driver )
Host  (Host Driver, Platform Dependent)
eMMC Card  (Card)


The eMMC subsystem (./drivers/mmc) is organized into three layers:
• The card layer is the external interface. It is seen as a block device driver, depending
on the enablement of block layer support for the kernel and interfaces within the file
system.
• The core layer implements all eMMC-dependent functionality, such as main operations,
command management, host setting, management functions, and high-level
functions.
• The host layer implements the driver for most known platform controllers and is platform
dependent.


SDHCI Specification
https://www.sdcard.org/downloads/pls/partA2_300.pdf

Reference
https://www.sdcard.org/downloads/pls/partA2_300.pdf
http://www.ebv.com/fileadmin/design_solutions/php/download.php?path=fileadmin%2Fproducts%2FEBVuniversity%2F120912_Micron_e.MMC%2F120912_mic_emmc_Linux.pdf

 

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...