* how can I use MTD partition with large size ( >= 4G bytes)?
@ 2007-03-17 8:40 Tian Jin
2007-03-17 12:42 ` Josh Boyer
0 siblings, 1 reply; 3+ messages in thread
From: Tian Jin @ 2007-03-17 8:40 UTC (permalink / raw)
To: linux-mtd
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how can I use MTD partition with large size ( >= 4G bytes)?
2007-03-17 8:40 how can I use MTD partition with large size ( >= 4G bytes)? Tian Jin
@ 2007-03-17 12:42 ` Josh Boyer
2007-03-17 13:20 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2007-03-17 12:42 UTC (permalink / raw)
To: Tian Jin; +Cc: linux-mtd
On 3/17/07, Tian Jin <tad2k@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how can I use MTD partition with large size ( >= 4G bytes)?
2007-03-17 12:42 ` Josh Boyer
@ 2007-03-17 13:20 ` Artem Bityutskiy
0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2007-03-17 13:20 UTC (permalink / raw)
To: Josh Boyer; +Cc: Tian Jin, linux-mtd
On Sat, 2007-03-17 at 07:42 -0500, Josh Boyer wrote:
> > 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.
Yeah.
We should re-work whole MTD and make it use (eraseblock number):(offset
withing eraseblock) addresses, instead of absolute offsets. This implies
changing interfaces. For the in-kernel ones it is not a problem. For the
userspace ones it is. I guess we should just invent new userspace API,
while preserving the old one. This is a great opportunity to dispose of
ancient junk at once.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-17 13:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-17 8:40 how can I use MTD partition with large size ( >= 4G bytes)? Tian Jin
2007-03-17 12:42 ` Josh Boyer
2007-03-17 13:20 ` Artem Bityutskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.