Skip to contentSkip to conversation

Howto handle 2 flashs with addresses not contiguous ?

DISCUSSION Stephane List 2 participants 2 messages Jan 31, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

My mtd drivers are not far from working..
I've replaced CONFIG_ZLIB by CONFIG_ZLIB_DEFLATE and INFLATE It's compiled and linked in lib.a but I can't see the functions in System.map ! And when I insmod jffs2, I've got unresolved symbols..

I've got flash at physical address :
0x1000 0000 - 0x11FF FFFF
and
0X2000 0000 - 0x21FF FFFF

what is the good method to handle this ? I don't thing it's a good solution to ioremap from the beginning of the first flash to the end of the second. Will it work if I copy physmap.c in a second file to have 2 physmap drivers inserted in my kernel ?

Thanks
Stephane

PS : I hope you understand my english

Signature · 2 lines
Stephane List
http://slist.lilotux.net
#1 lore raw
Quoted 4 lines · Stephane List

My mtd drivers are not far from working..
I've replaced CONFIG_ZLIB by CONFIG_ZLIB_DEFLATE and INFLATE It's compiled and linked in lib.a but I can't see the functions in System.map ! And when I insmod jffs2, I've got unresolved symbols..

The because lib/lib.a is a library, objects which aren't referenced are not pulled in to your vmlinux binary. If nothing in the kernel image itself uses zlib_inflate or zlib_deflate, they need to be built as modules too.

Quoted 9 lines

I've got flash at physical address :
0x1000 0000 - 0x11FF FFFF
and
0X2000 0000 - 0x21FF FFFF

what is the good method to handle this ? I don't thing it's a good solution to ioremap from the beginning of the first flash to the end of the second. Will it work if I copy physmap.c in a second file to have 2 physmap drivers inserted in my kernel ?

Yes but then you'll have two separate MTD devices, although you can use the 'mtdconcat' code to merge them into one. You can also write your own map driver which ioremaps both and translates access requests from the chip driver so that offsets 0->0x1ffffff go to the first one at 0x10000000, and offsets 0x2000000->0x3ffffff go to the second one at 0x20000000.

Signature · 1 line
dwmw2