how little do i have to do to define flash layout on my system?

Josh Boyer jdub at us.ibm.com
Mon Apr 11 13:01:11 EDT 2005


On Mon, 2005-04-11 at 07:32 -0400, Robert P. J. Day wrote:
> On Mon, 11 Apr 2005, Cliff Brake wrote:
> 
> > I am using the MTD mechanism for defining the physical area where the
> > flash lives on several PXA systems:
> >
> > CONFIG_MTD_PHYSMAP=y
> > CONFIG_MTD_PHYSMAP_START=0x0
> > CONFIG_MTD_PHYSMAP_LEN=0x4000000
> > CONFIG_MTD_PHYSMAP_BANKWIDTH=4
> >
> > You can then use the kernel command line to define the partitions:
> >
> > mtdparts=phys_mapped_flash:256k(boot)ro,0x1C0000(kernel),-(root)
> 
> that's exactly what i was looking at to see if it could do what i
> want, but for more than one chip.
> 
> > The only tricky part was figuring out the above name
> > (phys_mapped_flash).  From reading the documentation, I thought I
> > could leave the name blank, but did not work for me.
> 
> based on what i've read, i'm pretty sure you need a non-empty mtd-id,
> even if you have only one chip.  certainly, a quick glance at
> cmdlinepart.c seems to suggest it has to have some value (see the
> mtdpart_setup_real() routine).
> 
> > >   i need to be able to concatenate 2 16M chips into a single 32M
> > > address space, then partition into 5 or 6 partitions.  am i being too
> > > optimistic about not needing my own driver map program if i can use
> > > the "generic" one?
> >
> > I have not used the above with multiple chips.  MTD layer does have a
> > CONFIG_MTD_CONCAT config parameter ...
> 
> i did a bit more reading last night and concluded that the PHYSMAP
> stuff would let me define a single flash chip but no more.  so if i
> want multiple chips, it *appears* that i have to write a maps file.

See drivers/mtd/maps/mphysmap.c

josh





More information about the linux-mtd mailing list