public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Partition question...
@ 2001-08-15 17:41 Siders, Keith
  0 siblings, 0 replies; 5+ messages in thread
From: Siders, Keith @ 2001-08-15 17:41 UTC (permalink / raw)
  To: linux-mtd

If the addressing between two Flash devices remains linear with no gaps, 
can they be part of the same mtd[n] partition, or must the next chip be
mtd[n+1]?

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

available. 

Keith Siders
Software Engineer
 Toshiba America Consumer Products, Inc.
Advanced Television Technology Center
801 Royal Parkway, Suite 100
Nashville, Tennessee 37214
Phone: (615) 257-4050
Fax:   (615) 453-7880

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Partition question...
@ 2001-09-10 17:55 Chris Lesiak
  2001-09-10 19:52 ` David Woodhouse
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Lesiak @ 2001-09-10 17:55 UTC (permalink / raw)
  To: linux-mtd, Siders, Keith


I also have two banks mapped contiguously into virtual memory that I would
like to be seen as one.

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?
Can linux also easily see both banks as a single device that can be partitioned?

Chris Lesiak
clesiak@licor.com



If the addressing between two Flash devices remains linear with no gaps,
can they be part of the same mtd[n] partition, or must the next chip be
mtd[n+1]?

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

available.

Keith Siders
Software Engineer
 Toshiba America Consumer Products, Inc.
Advanced Television Technology Center
801 Royal Parkway, Suite 100
Nashville, Tennessee 37214
Phone: (615) 257-4050
Fax:   (615) 453-7880


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Partition question...
  2001-09-10 17:55 Partition question Chris Lesiak
@ 2001-09-10 19:52 ` David Woodhouse
  2001-09-12 11:41   ` Alex Liao
  0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2001-09-10 19:52 UTC (permalink / raw)
  To: Chris Lesiak; +Cc: linux-mtd, Siders, Keith

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Partition question...
  2001-09-10 19:52 ` David Woodhouse
@ 2001-09-12 11:41   ` Alex Liao
  2001-09-12 11:49     ` David Woodhouse
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Liao @ 2001-09-12 11:41 UTC (permalink / raw)
  To: David Woodhouse, Chris Lesiak; +Cc: linux-mtd, Siders, Keith

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@infradead.org>
To: "Chris Lesiak" <clesiak@licor.com>
Cc: <linux-mtd@lists.infradead.org>; "Siders, Keith"
<keith_siders@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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Partition question...
  2001-09-12 11:41   ` Alex Liao
@ 2001-09-12 11:49     ` David Woodhouse
  0 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2001-09-12 11:49 UTC (permalink / raw)
  To: Alex Liao; +Cc: Chris Lesiak, linux-mtd, Siders, Keith

alex@vistatopology.com said:
>    I want to partition my MTD devices , it physical address :
>     CS0: 0x00000000 - 0x00800000
>     CS1: 0x10000000 - 0x10800000
>     How should I to haldle it ? 

What's at 0x800000-0xffffff? A second image of CS0? If so, just copy one of 
the existing map drivers and make it length 0x10800000. Then after calling 
the chip probe routines you set up your array of struct mtd_partitions and 
call add_mtd_partitions. There are plenty of examples to crib from.

--
dwmw2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-12 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-10 17:55 Partition question Chris Lesiak
2001-09-10 19:52 ` David Woodhouse
2001-09-12 11:41   ` Alex Liao
2001-09-12 11:49     ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2001-08-15 17:41 Siders, Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox