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

Josh Boyer jwboyer at gmail.com
Sat Mar 17 08:42:20 EDT 2007


On 3/17/07, Tian Jin <tad2k at msn.com> wrote:
> 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£(c), 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?

Not at the moment.  MTD doesn't support things greater than 4GiB.

josh




More information about the linux-mtd mailing list