defining flash partitions given 4x4M flash setup

Robert P. J. Day rpjday at mindspring.com
Tue Jul 6 12:59:21 EDT 2004


   given an rpxlite board with a 4x4M flash setup, i'm looking at the 
code in rpxlite.c by a previous programmer who defined the 
partitioning.

   first, i notice that, because this board has 4 4M flash chips, he 
defined WINDOW_SIZE in the map_info structure as 0x00400000 (4M), 
although the actual single call to ioremap uses the values:

ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);

to represent the full 16M. is that the correct way to handle multiple 
chips that define a single contiguous address space?

   second, i notice that, whereas pretty well all the examples in 
drivers/mtd/maps use:

map.virt = ... ioremap ...

this person seemed set on using

map.map_priv_1 = ... ioremap ...

and, obviously, continued using the map_priv_1 field consistently for 
the rest of the routine.  is there an accepted practice for using the 
"virt" field, which is what i had assumed.  not sure what the use of 
"map_priv_1" was all about.

   thanks again.  back to adding command-line partitioning.

rday




More information about the linux-mtd mailing list