Partition question...

Alex Liao alex at vistatopology.com
Wed Sep 12 07:41:47 EDT 2001


Hi,
    I want to partition my MTD devices , it physical address :
    CS0: 0x00000000 - 0x00800000
    CS1: 0x10000000 - 0x10800000
    How should I to haldle it ?

Thanks..
----- Original Message -----
From: "David Woodhouse" <dwmw2 at infradead.org>
To: "Chris Lesiak" <clesiak at licor.com>
Cc: <linux-mtd at lists.infradead.org>; "Siders, Keith"
<keith_siders at toshibatv.com>
Sent: Tuesday, September 11, 2001 3:52 AM
Subject: Re: Partition question...


> On Mon, 10 Sep 2001, Chris Lesiak wrote:
>
> > I also have two banks mapped contiguously into virtual memory that I
would
> > like to be seen as one.
>
> Should be fine, as long as the two chips are identical. At the moment,
> they need to be mapped with no space between them. However, aliases are
> OK. So, for example, if you have
>
>  0xbe000000-0xbe7fffff Chip 1
>  0xbe800000-0xbeffffff Chip 1 again
>  0xbf000000-0xbf7fffff Chip 2
>  0xbf800000-0xbfffffff Chip 2 again.
>
> That'll be fine. It'll detect the aliases in there. It will quit scanning
> the region when it finds something that's not a flash chip, though, so if
> those aliases _weren't_ there it'd break (and you could trivially fix it
> the your 'map' driver by munging the addresses).
>
> > The problem is that RedBoot (and ECOS) seems to only support one flash
> > logical device.  I wrote an ECOS flash driver that treated both banks
> > as a single large logical device.  RedBoot stores its partition table
> > in the last erase block of the device.  So in my case, a single
> > partition table is store in the last erase block of the second bank
> > but partitions the space of both banks.
> >
> > When I get to the linux, mtd seems to expect a partition table for each
bank.
> >
> > What is the best way to reconcile the problem?
>
> Change your map driver to encompass the whole region, then it should
> appear as a single MTD device and it'll look for a single partition table.
>
> > I have two 32-bit Flash devices (or so I'm told). Since this is a MIPS
> > application the reset vector is 0xBFC00000. The Flash devices are
> > 0xBE000000-BEFFFFFF and 0xBF000000-BFFFFFFF, so I have 4Megs at the
> > top of the second device, with the first device and lower 12Megs of
> > the second giving me 28Megs of linear Flash
>
> You should be able probe the two chips as a single device with no
> problems, as I said above. But then you want two non-contiguous regions to
> appear as a single partition.
>
> That's not handled by the existing partition code - but the partition code
> is just a simple set of wrappers that add an offset and pass control
> through to the methods of the underlying MTD device. It's simple enough to
> hack up your own wrapper which does what you want.
>
> --
> dwmw2
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/





More information about the linux-mtd mailing list