Skip to contentSkip to conversation

Can mtd partition span multiple devices

DISCUSSION John Burch 6 participants 7 messages Apr 2, 2003 – Apr 3, 2003 Memory technology devices (MTD)

lore
Share & tools
lore

John Burch

author
#0 lore raw

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash devices span the following address ranges, 0x0-0x3FFFFF and 0x400000-0x7FFFFF, can an mtd partition be defined as follows?

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

John

#1 lore raw
Quoted 11 lines · John Burch

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash devices span the following address ranges, 0x0-0x3FFFFF and 0x400000-0x7FFFFF, can an mtd partition be defined as follows?

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

Enable MTD concatenating support.

Signature · 5 lines
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: [email protected]
#2 lore raw
Quoted 6 lines · Thomas Gleixner
Quoted 5 lines · John Burch

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash devices span the following address ranges, 0x0-0x3FFFFF and 0x400000-0x7FFFFF, can an mtd partition be defined as follows?

Quoted 9 lines
Quoted 6 lines

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

Enable MTD concatenating support.

You mean MTD partitioning no need for concatenating with this layout.

Signature · 4 lines
Kenneth Johansson	
Ericsson AB                       Tel: +46 8 719 70 20
Tellusborgsvägen  90              Fax: +46 8 719 29 45
126 25 Stockholm                  [email protected]
#3 lore raw
Quoted 11 lines · Kenneth Johansson
Quoted 10 lines · Thomas Gleixner
Quoted 9 lines · John Burch

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash devices span the following address ranges, 0x0-0x3FFFFF and 0x400000-0x7FFFFF, can an mtd partition be defined as follows?

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

Enable MTD concatenating support.

You mean MTD partitioning no need for concatenating with this layout.

Probably true -- if the two physical devices are laid out such that a single chip probe will find them together, they can be used as a single MTD device even without mtdconcat just by setting your map to cover the whole range 0->8M. You only really need mtdconcat for more complicated setups.

Signature · 1 line
dwmw2
author
#4 lore raw
Quoted 21 lines · Kenneth Johansson
Quoted 4 lines · Thomas Gleixner
Quoted 3 lines · John Burch
Quoted 2 lines

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash

devices span the

Quoted 1 line
Quoted 1 line
Quoted 1 line

following address ranges, 0x0-0x3FFFFF and

0x400000-0x7FFFFF, can

Quoted 12 lines
Quoted 11 lines
Quoted 8 lines

an mtd partition be defined as follows?

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

Enable MTD concatenating support.

Quoted 9 lines
Quoted 1 line

You mean MTD partitioning no need for concatenating with

this layout.

Probably true -- if the two physical devices are laid out such that a single chip probe will find them together, they can be used as a single MTD device even without mtdconcat just by setting your map to cover the whole range 0->8M. You only really need mtdconcat for more complicated setups.

I'm using 2.4.17 and I don't think mtdconcat is part of that kernel (though I may not need it anyway based on dwmw2's response). Are the changes since then substantial, and can 2.4.17 be patched to support the latest mtd/jffs2 code?

Second, you imply that a single chip probe will handle multiple devices (assuming contiguous addressing?). Is this supported in 2.4.17 and is it a common approach to use for multiple devices?

John

#5 lore raw
Quoted 5 lines · John Burch

I'm using 2.4.17 and I don't think mtdconcat is part of that kernel (though I may not need it anyway based on dwmw2's response). Are the changes since then substantial, and can 2.4.17 be patched to support the latest mtd/jffs2 code?

I wouldn't patch the mtd/jffs2 part, unless I had to. The better strategy is to update the whole kernel, but that is always a bit tricky inside some companies.

Quoted 3 lines

Second, you imply that a single chip probe will handle multiple devices (assuming contiguous addressing?). Is this supported in 2.4.17 and is it a common approach to use for multiple devices?

That support has been in the official kernel since 2.4.2 or even longer.

Jörn

Signature · 3 lines
Measure. Don't tune for speed until you've measured, and even then
don't unless one part of the code overwhelms the rest.
-- Rob Pike
#6 lore raw
In reply to John Burch

I believe mtdconcat will do what you want.

Quoted 19 lines · John Burch

I'm wondering if a single mtd partition can span more than one physical flash device. For example, if two flash devices span the following address ranges, 0x0-0x3FFFFF and 0x400000-0x7FFFFF, can an mtd partition be defined as follows?

Name: spanning_partition
Size: 0x200000
Offset: 0x300000

So this partition would span physical addresses 0x300000 - 0x3FFFFF (device 1) and 0x400000 - 0x4FFFFF (device 2).

John

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