All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: linux@arm.linux.org.uk, David.Woodhouse@intel.com,
	linux-mtd@lists.infradead.org,
	Florian Fainelli <ffainelli@freebox.fr>,
	dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/7] add the database for the NANDs
Date: Fri, 25 Mar 2011 14:59:02 +0800	[thread overview]
Message-ID: <4D8C3D36.7000703@freescale.com> (raw)
In-Reply-To: <19852.15018.820053.918668@ipc1.ka-ro>

Hi:

> 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.
>
ok. a good idea. I will try it.

Huang Shijie

WARNING: multiple messages have this Message-ID (diff)
From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] add the database for the NANDs
Date: Fri, 25 Mar 2011 14:59:02 +0800	[thread overview]
Message-ID: <4D8C3D36.7000703@freescale.com> (raw)
In-Reply-To: <19852.15018.820053.918668@ipc1.ka-ro>

Hi:

> 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.
>
ok. a good idea. I will try it.

Huang Shijie

  reply	other threads:[~2011-03-25  6:59 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16  1:55 [PATCH 0/7] add the GPMI controller driver for IMX23/IMX28 Huang Shijie
2011-03-16  1:55 ` Huang Shijie
2011-03-16  1:55 ` [PATCH 1/7] ARM: add GPMI support for imx23/imx28 Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-16  1:55 ` [PATCH 2/7] add the common code for GPMI driver Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-16  1:55 ` [PATCH 3/7] add the database for the NANDs Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-23 15:29   ` Florian Fainelli
2011-03-23 15:29     ` Florian Fainelli
2011-03-24  2:27     ` Huang Shijie
2011-03-24  2:27       ` Huang Shijie
2011-03-24 13:50       ` Florian Fainelli
2011-03-24 13:50         ` Florian Fainelli
2011-03-25  2:47         ` Huang Shijie
2011-03-25  2:47           ` Huang Shijie
2011-03-25  6:48           ` Lothar Waßmann
2011-03-25  6:48             ` Lothar Waßmann
2011-03-25  6:59             ` Huang Shijie [this message]
2011-03-25  6:59               ` Huang Shijie
2011-03-31  9:54   ` Artem Bityutskiy
2011-03-31  9:54     ` Artem Bityutskiy
2011-03-31 10:09     ` Huang Shijie
2011-03-31 10:09       ` Huang Shijie
2011-03-16  1:55 ` [PATCH 4/7] add GPMI support for imx23 Huang Shijie
2011-07-08 16:42   ` Huang Shijie
2011-03-16  1:55 ` [PATCH 5/7] add GPMI support for imx28 Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-31  9:47   ` Artem Bityutskiy
2011-03-31  9:47     ` Artem Bityutskiy
2011-03-31 10:09     ` Huang Shijie
2011-03-31 10:09       ` Huang Shijie
2011-03-31  9:49   ` Artem Bityutskiy
2011-03-31  9:49     ` Artem Bityutskiy
2011-03-31  9:49   ` Artem Bityutskiy
2011-03-31  9:49     ` Artem Bityutskiy
2011-03-16  1:55 ` [PATCH 6/7] dmaengine: change the flags of request_irq() Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-16  1:55 ` [PATCH 7/7] MTD : add GPMI driver in the config and Makefile Huang Shijie
2011-03-16  1:55   ` Huang Shijie
2011-03-31  9:44   ` Artem Bityutskiy
2011-03-31  9:44     ` Artem Bityutskiy
2011-03-16  7:12 ` [PATCH 0/7] add the GPMI controller driver for IMX23/IMX28 Artem Bityutskiy
2011-03-16  7:12   ` Artem Bityutskiy
2011-03-16  7:30   ` Huang Shijie-B32955
2011-03-16  7:30     ` Huang Shijie-B32955
2011-03-22 10:23   ` Huang Shijie
2011-03-22 10:23     ` Huang Shijie
  -- strict thread matches above, loose matches on Subject: below --
2011-03-16  1:42 Huang Shijie
2011-03-16  1:42 ` [PATCH 3/7] add the database for the NANDs Huang Shijie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8C3D36.7000703@freescale.com \
    --to=b32955@freescale.com \
    --cc=David.Woodhouse@intel.com \
    --cc=LW@KARO-electronics.de \
    --cc=dwmw2@infradead.org \
    --cc=ffainelli@freebox.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.