[PATCH 3/7] add the database for the NANDs

Lothar Waßmann LW at KARO-electronics.de
Fri Mar 25 02:48:10 EDT 2011


Hi,

Huang Shijie writes:
> Hi Florian:
> 
> 
> >>>> +#include "nand_device_info.h"
> >>>> +
> >>>> +static struct nand_device_info samsung_nand[] __initdata = {
> >>>> +	{
> >>>> +		.id	= { 0xec, 0xd3, 0x14, 0x25, 0x64, 0xec, 0xd3, 0x14 },
> >>>> +		.desc	= "K9G8G08U0M, K9HAG08U1M",
> >>>> +		.attr	= ATTR(MLC, 1LL * SZ_1G, 128, 2 * SZ_1K + 64, 4, 512),
> >>>> +		.timing	= TIMING(20, 15, 20, 6, -1, -1, -1),
> >>>> +	}, {
> >>>> +		.id	= { 0xec, 0xd7, 0xd5, 0x29, 0x38, 0x41, 0xec, 0xd7 },
> >>>> +		.desc	= "K9LBG08U0D",
> >>>> +		.attr	= ATTR(MLC, 4LL * SZ_1G, 128, 4 * SZ_1K + 218, 8, 512),
> >>>> +		.timing	= TIMING(20, 10, 25, 6, 20, 5, 15),
> >>>> +	}, {
> >>>> +		.id	= { 0xec, 0xd5, 0x14, 0xb6, 0x74, 0xec, 0xd5, 0x14 },
> >>>> +		.desc	= "K9GAG08U0M",
> >>>> +		.attr	= ATTR(MLC, 2LL * SZ_1G, 128, 4 * SZ_1K + 218, 4, 512),
> >>>> +		.timing	= TIMING(15, 10, 20, 6, -1, -1, -1),
> >>>> +	}, {
> >>>> +		/* end of the table. */
> >>>> +		.id	= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
> >>>> +	},
> >>>> +};
> >>> Such information should be set in platform code, because it is specific
> >>> to your controller and most likely to a particular board design.
> >> I prefer to place it here.
> >>
> >>    If I move the code to arch/arm/mach-mxs, it will make the arch/ much
> >> bigger.
> >> I have nearly 50 different nands information by hand, I will add it
> >> gradually in later patches.
> > This certainly makes the code bigger, but this is also the place where the
> > code belongs. Also, if you mark your structures with __initdata, such memory
> > can be freed later by the kernel, so I would rather go into that direction.
> >
> Please check the emails i talked with Lothar.
>
Maybe you should separate the database from the driver and build it as
a separate entity, so that other chip drivers can take advantage of it
and in the long run it might replace the current nand_ids database.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-mtd mailing list