Received: from vistatopology.com ([61.218.47.235]) by pentafluge.infradead.org with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 15h8M9-0000RT-00 for ; Wed, 12 Sep 2001 12:39:02 +0100 Message-ID: <009801c13b7f$e7756380$110aa8c0@vistatopology.com> From: "Alex Liao" To: "David Woodhouse" , "Chris Lesiak" Cc: , "Siders, Keith" References: Subject: Re: Partition question... Date: Wed, 12 Sep 2001 19:41:47 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-mtd-admin@lists.infradead.org Errors-To: linux-mtd-admin@lists.infradead.org List-Help: List-Post: List-Subscribe: , List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: 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" To: "Chris Lesiak" Cc: ; "Siders, Keith" 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/