* [PATCH] mtd nand : print flash size during detection
@ 2012-11-06 11:03 Matthieu CASTET
2012-11-07 6:22 ` Huang Shijie
2012-11-16 8:24 ` Artem Bityutskiy
0 siblings, 2 replies; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-06 11:03 UTC (permalink / raw)
To: linux-mtd; +Cc: Matthieu CASTET, dedekind1
This help to detect bad flash identification in case the size is not present
on the name (ONFI).
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
---
drivers/mtd/nand/nand_base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c90ef66..8916bc6 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3292,10 +3292,10 @@ ident_done:
chip->cmdfunc = nand_command_lp;
pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
- " page size: %d, OOB size: %d\n",
+ " %dMiB page size: %d, OOB size: %d\n",
*maf_id, *dev_id, nand_manuf_ids[maf_idx].name,
chip->onfi_version ? chip->onfi_params.model : type->name,
- mtd->writesize, mtd->oobsize);
+ (int)(chip->chipsize >> 20), mtd->writesize, mtd->oobsize);
return type;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-06 11:03 [PATCH] mtd nand : print flash size during detection Matthieu CASTET
@ 2012-11-07 6:22 ` Huang Shijie
2012-11-22 17:19 ` Matthieu CASTET
2012-11-16 8:24 ` Artem Bityutskiy
1 sibling, 1 reply; 7+ messages in thread
From: Huang Shijie @ 2012-11-07 6:22 UTC (permalink / raw)
To: Matthieu CASTET; +Cc: linux-mtd, dedekind1
于 2012年11月06日 19:03, Matthieu CASTET 写道:
> This help to detect bad flash identification in case the size is not present
> on the name (ONFI).
>
I think you should give us a example of "bad flash identification".
I also want to add this patch to print out the flash size during
detection, but not for the "bad flash identification" reason,
Best Regards
Huang Shijie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-06 11:03 [PATCH] mtd nand : print flash size during detection Matthieu CASTET
2012-11-07 6:22 ` Huang Shijie
@ 2012-11-16 8:24 ` Artem Bityutskiy
2012-11-16 8:38 ` Huang Shijie
2012-11-22 17:20 ` Matthieu CASTET
1 sibling, 2 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2012-11-16 8:24 UTC (permalink / raw)
To: Matthieu CASTET; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
On Tue, 2012-11-06 at 12:03 +0100, Matthieu CASTET wrote:
> This help to detect bad flash identification in case the size is not present
> on the name (ONFI).
>
> Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
> ---
> drivers/mtd/nand/nand_base.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index c90ef66..8916bc6 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -3292,10 +3292,10 @@ ident_done:
> chip->cmdfunc = nand_command_lp;
>
> pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
> - " page size: %d, OOB size: %d\n",
> + " %dMiB page size: %d, OOB size: %d\n",
Is this readable? No comma after the size. I guess it is better to add
"size %dMiB," instead?
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-16 8:24 ` Artem Bityutskiy
@ 2012-11-16 8:38 ` Huang Shijie
2012-11-22 17:36 ` Matthieu CASTET
2012-11-22 17:20 ` Matthieu CASTET
1 sibling, 1 reply; 7+ messages in thread
From: Huang Shijie @ 2012-11-16 8:38 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, Matthieu CASTET
于 2012年11月16日 16:24, Artem Bityutskiy 写道:
> On Tue, 2012-11-06 at 12:03 +0100, Matthieu CASTET wrote:
>> This help to detect bad flash identification in case the size is not present
>> on the name (ONFI).
>>
>> Signed-off-by: Matthieu CASTET<matthieu.castet@parrot.com>
>> ---
>> drivers/mtd/nand/nand_base.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index c90ef66..8916bc6 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3292,10 +3292,10 @@ ident_done:
>> chip->cmdfunc = nand_command_lp;
>>
>> pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
>> - " page size: %d, OOB size: %d\n",
>> + " %dMiB page size: %d, OOB size: %d\n",
> Is this readable? No comma after the size. I guess it is better to add
> "size %dMiB," instead?
>
In multi chip enables nand chips, such as some Micron nand chips, you
will find half size is printed
after this patch is applied. Why? because we only scan one #CE, but this
nand chip has two #CE, the #CE0 and #CE1.
a little confused.
Best Regards
Huang Shijie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-07 6:22 ` Huang Shijie
@ 2012-11-22 17:19 ` Matthieu CASTET
0 siblings, 0 replies; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-22 17:19 UTC (permalink / raw)
To: Huang Shijie; +Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com
Huang Shijie a écrit :
> 于 2012年11月06日 19:03, Matthieu CASTET 写道:
>> This help to detect bad flash identification in case the size is not present
>> on the name (ONFI).
>>
> I think you should give us a example of "bad flash identification".
>
> I also want to add this patch to print out the flash size during
> detection, but not for the "bad flash identification" reason,
When Onfi support in mtd wasn't good, it could have help us to catch case of bad
support of multi-lun nand (only a size of 1 lun where used).
Matthieu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-16 8:24 ` Artem Bityutskiy
2012-11-16 8:38 ` Huang Shijie
@ 2012-11-22 17:20 ` Matthieu CASTET
1 sibling, 0 replies; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-22 17:20 UTC (permalink / raw)
To: dedekind1@gmail.com; +Cc: linux-mtd@lists.infradead.org
Artem Bityutskiy a écrit :
> On Tue, 2012-11-06 at 12:03 +0100, Matthieu CASTET wrote:
>> This help to detect bad flash identification in case the size is not present
>> on the name (ONFI).
>>
>> Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
>> ---
>> drivers/mtd/nand/nand_base.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index c90ef66..8916bc6 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3292,10 +3292,10 @@ ident_done:
>> chip->cmdfunc = nand_command_lp;
>>
>> pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
>> - " page size: %d, OOB size: %d\n",
>> + " %dMiB page size: %d, OOB size: %d\n",
>
> Is this readable? No comma after the size. I guess it is better to add
> "size %dMiB," instead?
>
ok
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd nand : print flash size during detection
2012-11-16 8:38 ` Huang Shijie
@ 2012-11-22 17:36 ` Matthieu CASTET
0 siblings, 0 replies; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-22 17:36 UTC (permalink / raw)
To: Huang Shijie; +Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com
Huang Shijie a écrit :
>>
> In multi chip enables nand chips, such as some Micron nand chips, you
> will find half size is printed
> after this patch is applied. Why? because we only scan one #CE, but this
> nand chip has two #CE, the #CE0 and #CE1.
>
>
> a little confused.
nand_get_flash_type probe only one chip.
For multi chip, you should see the log :
"x NAND chips detected".
The resulting mtd size will be x * the chip size.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-22 17:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 11:03 [PATCH] mtd nand : print flash size during detection Matthieu CASTET
2012-11-07 6:22 ` Huang Shijie
2012-11-22 17:19 ` Matthieu CASTET
2012-11-16 8:24 ` Artem Bityutskiy
2012-11-16 8:38 ` Huang Shijie
2012-11-22 17:36 ` Matthieu CASTET
2012-11-22 17:20 ` Matthieu CASTET
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).