CFI physmap - how to create partitions

Ralph Siemsen ralphs at netwinder.org
Thu May 19 07:54:08 EDT 2005


Thorsten Haas wrote:

> Solved. I used mphysmap.c, because there are two banks of flash on my
> board, but mphysmap.c does not support partitioning yet. Though,
> physmap.c does provide commandline partition parsing.
> Sadly, mtd-id's seem not to be well-documented. I looked the one for
> mappings to the physical memory area up in the source. It's
> "phys_mapped_flash". Huzaa.

Hmm, are the two banks the same (eg. two chips of same type), and are 
they consecutive in memory or parallel on the bus?  Then you can 
actually use physmap.  Just pass it the combined size of both chips, the 
MTD code will handle the rest.  There is no need to call probe function 
for each bank, or to partition each bank separately.  This seems to be 
another one of the MTD undocumented "features".

> Thus, I wrote some additional text into chapter "Making partitions with
> CFI flash and working with multiple banks of FLASH" of
> mtd-jffs-HOWTO.txt. ( retreived it from
> ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/mtd/mtd-jffs-HOWTO.txt )

Nice!
-R




More information about the linux-mtd mailing list