probing two non-contiguous cfi flash and a single partition

Robert Kaiser rob at sysgo.de
Wed Apr 3 05:32:17 EST 2002


Am Samstag, 30. März 2002 15:48 schrieben Sie:
> Hi Robert,
> I read the mtd concatnate stuffs which seems to be made for concatnating
> different indedpendent CFI/no-cfi mtd devices. So basically in example
> file of sc520cdp.c, there are three probes for the three devices and then
> concatnating the two flash devices in one.
>
> But my problem seems to be somewhat different. See the follwoing diagrams -
>
>  _________
>
> |         |<--   First flash starts at 0xbf800000
> |
> |4MB      |
> |
> |
> |
> |_________|
>
>  _________
>
> | 640K    | <-- Second flash starts at 0xbfc00000
> |_________|     out of which first 640KB is needed
> |
> |         |     for boot loader.
> |
> | 3360K   |
> |_________|
>
> So there will be two probes for the two flashes. But now I want
> to keep the 640KB(for bootloader) of the second flash to be
> in first partition and the first flash and remaining portion of the second
> flash to be in second partition to be used for JFFS2 mounting.

The example in sc520cdp.c is a simple one, which is why I initially pointed
you at it. There is another example in dilnetpc.c which is more like what you
need, albeit a little more complicated. The idea in your case would be to
partition the second flash into two pieces: one for the 640KB part and one
for the rest. That will give you two MTD device objects corresponding to the
two sections in the second flash. You can then concatenate the second device
object (the one corresponding to the 3360K part) and the device object
corresponding to the first flash (4MB) into a single concatenated device that
will have 4MB + 3360KB size.

Rob


--
----------------------------------------------------------------
Robert Kaiser                         email: rkaiser at sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14                    phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany   fax:   (49) 6136 9948-10





More information about the linux-mtd mailing list