how can I use MTD partition with large size ( >= 4G bytes)?

Tian Jin tad2k at msn.com
Sat Mar 17 04:40:10 EDT 2007


Hi, I want to use NAND flash chips to storage large audio data, the max 
storage size will be 3.6G bytes£¨may be 7G bytes in the future£©, so I have 
to use four 1GB NAND flash chips to make up a single 4GB MTD partition, but 
mtd->size was defined as 32bit integer in MTD driver(linux-2.6.20-rc1), so 
mtd->size just overflowed in function nand_scan_ident():

/* Store the number of chips and calc total size for mtd */
chip->numchips = i;
mtd->size = i * chip->chipsize; // 4 * 40000000 = 0x100000000 = 0xFFFFFFFF + 
0x01

I've tried to modify the data type of mtd->size to usinged long long, but 
kernel can not be compiled successfully£¬Is there any solution for this?

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





More information about the linux-mtd mailing list