Support for NAND devices > 4GB
Artem Bityutskiy
dedekind at infradead.org
Fri Dec 5 10:58:06 EST 2008
On Fri, 2008-12-05 at 09:30 -0600, Maupin, Chase wrote:
> All,
>
> I have a Samsung NAND chip part number (K9WBG08U1M) which is a 32GB NAND chip with 4K page sizes. It looks like it is actually 2 chips together as it is reported in the kernel as having "2 NAND chips detected". The kernel is properly detecting the 4K page size but it seems like there is a limitation in the mtd_info structure of 4GB for the size of the NAND. Can anyone tell me if there is support in the Linux MTD system for NAND devices greater than 4GB? Does anyone have a patch I could look at for this?
>
> I have tried changing the size element in the mtd_info structure to u_int64_t and then changing the code in YAFFS2 and in the add_mtd_partitions function to use do_div for the division of the size element but still no success.
>
> I am working in a 2.6.10 kernel (which I cannot update) and will back port any patches people may have.
>
> Again, any help that could be offered here would be greatly appreciated.
Similar question was asked so many times. No, MTD does not support NANDs
> 4GiB. Just because nobody has implemented this. The main difficulty
here is that current user-space ABI cannot be extended, so we need to
invent new ABI.
However, Adrian Hunter sent a patch which changes in-kernel API and adds
> 4GiB support. For example, we successfully ran UBIFS on a 8GiB NAND
(well, not real NAND, but emulated by nandsim). You may try this patch.
But userspace API is still 32-bit. No-one changed it. Samsung guys tried
to send some patches, but the patches met some criticism and they did
not come up with better ones.
Please, find the 64-bit in-kernel API changes in this git tree:
git://git.infradead.org/users/dedekind/mtd-nandsim-2.6.git
Namely, you need the "MTD: update internal API to support 64-bit device
size" one. It works for us, and you are welcome to test it.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list