From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <19852.15018.820053.918668@ipc1.ka-ro> Date: Fri, 25 Mar 2011 07:48:10 +0100 From: =?utf-8?Q?Lothar_Wa=C3=9Fmann?= To: Huang Shijie Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH 3/7] add the database for the NANDs In-Reply-To: <4D8C0250.1060604@freescale.com> References: <1300240521-4344-1-git-send-email-b32955@freescale.com> <201103231629.46958.ffainelli@freebox.fr> <4D8AAC1C.2070709@freescale.com> <201103241450.50967.ffainelli@freebox.fr> <4D8C0250.1060604@freescale.com> Cc: linux@arm.linux.org.uk, David.Woodhouse@intel.com, linux-mtd@lists.infradead.org, Florian Fainelli , dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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@karo-electronics.de ___________________________________________________________