* [PATCH 0/2] mtd: atmel_nand: add support for 8k page nand
@ 2014-07-17 8:51 Raphael Poggi
2014-07-17 8:51 ` [PATCH 1/2] mtd: atmel_nand: increase chip_delay Raphael Poggi
2014-07-17 8:51 ` [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand Raphael Poggi
0 siblings, 2 replies; 6+ messages in thread
From: Raphael Poggi @ 2014-07-17 8:51 UTC (permalink / raw)
To: barebox
This patch series add support for 8k page NAND. This is done by
increasing chip_delay (20us to 40us) and enable PMECC for 8k nand.
Raphaël Poggi (2):
[PATCH 1/2] mtd: atmel_nand: increase chip_delay
[PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand
drivers/mtd/nand/atmel_nand.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] mtd: atmel_nand: increase chip_delay
2014-07-17 8:51 [PATCH 0/2] mtd: atmel_nand: add support for 8k page nand Raphael Poggi
@ 2014-07-17 8:51 ` Raphael Poggi
2014-07-17 10:02 ` Bo Shen
2014-07-17 8:51 ` [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand Raphael Poggi
1 sibling, 1 reply; 6+ messages in thread
From: Raphael Poggi @ 2014-07-17 8:51 UTC (permalink / raw)
To: barebox; +Cc: Raphael Poggi
Some nand like Micron MT29F32G08ABAAAWP need more than 20us.
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
---
drivers/mtd/nand/atmel_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 3161e89..a02f38f 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1162,7 +1162,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
nand_chip->ecc.mode = NAND_ECC_HW;
}
- nand_chip->chip_delay = 20; /* 20us command delay time */
+ nand_chip->chip_delay = 40; /* 40us command delay time */
if (IS_ENABLED(CONFIG_NAND_ECC_BCH) &&
pdata->ecc_mode == NAND_ECC_SOFT_BCH) {
--
1.7.9.5
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand
2014-07-17 8:51 [PATCH 0/2] mtd: atmel_nand: add support for 8k page nand Raphael Poggi
2014-07-17 8:51 ` [PATCH 1/2] mtd: atmel_nand: increase chip_delay Raphael Poggi
@ 2014-07-17 8:51 ` Raphael Poggi
2014-07-17 10:05 ` Bo Shen
1 sibling, 1 reply; 6+ messages in thread
From: Raphael Poggi @ 2014-07-17 8:51 UTC (permalink / raw)
To: barebox; +Cc: Raphael Poggi
Enable the PMECC to support 8k page.
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
---
drivers/mtd/nand/atmel_nand.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index fa596ed..36a60d1 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -796,7 +796,9 @@ static int __init atmel_pmecc_nand_init_params(struct device_d *dev,
switch (mtd->writesize) {
case 2048:
case 4096:
- host->pmecc_degree = PMECC_GF_DIMENSION_13;
+ case 8192:
+ host->pmecc_degree = (sector_size == 512) ?
+ PMECC_GF_DIMENSION_13 : PMECC_GF_DIMENSION_14;
host->pmecc_cw_len = (1 << host->pmecc_degree) - 1;
host->pmecc_sector_number = mtd->writesize / sector_size;
host->pmecc_bytes_per_sector = pmecc_get_ecc_bytes(
--
1.7.9.5
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: atmel_nand: increase chip_delay
2014-07-17 8:51 ` [PATCH 1/2] mtd: atmel_nand: increase chip_delay Raphael Poggi
@ 2014-07-17 10:02 ` Bo Shen
0 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2014-07-17 10:02 UTC (permalink / raw)
To: Raphael Poggi; +Cc: barebox
Hi Raphael,
On 07/17/2014 04:51 PM, Raphael Poggi wrote:
> Some nand like Micron MT29F32G08ABAAAWP need more than 20us.
>
> Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
> ---
> drivers/mtd/nand/atmel_nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 3161e89..a02f38f 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -1162,7 +1162,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
> nand_chip->ecc.mode = NAND_ECC_HW;
> }
>
> - nand_chip->chip_delay = 20; /* 20us command delay time */
> + nand_chip->chip_delay = 40; /* 40us command delay time */
>
> if (IS_ENABLED(CONFIG_NAND_ECC_BCH) &&
> pdata->ecc_mode == NAND_ECC_SOFT_BCH) {
>
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand
2014-07-17 8:51 ` [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand Raphael Poggi
@ 2014-07-17 10:05 ` Bo Shen
2014-07-17 11:45 ` Raphaël Poggi
0 siblings, 1 reply; 6+ messages in thread
From: Bo Shen @ 2014-07-17 10:05 UTC (permalink / raw)
To: Raphael Poggi; +Cc: barebox
Hi Raphael,
On 07/17/2014 04:51 PM, Raphael Poggi wrote:
> Enable the PMECC to support 8k page.
>
> Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
> ---
> drivers/mtd/nand/atmel_nand.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index fa596ed..36a60d1 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -796,7 +796,9 @@ static int __init atmel_pmecc_nand_init_params(struct device_d *dev,
> switch (mtd->writesize) {
> case 2048:
> case 4096:
> - host->pmecc_degree = PMECC_GF_DIMENSION_13;
> + case 8192:
> + host->pmecc_degree = (sector_size == 512) ?
> + PMECC_GF_DIMENSION_13 : PMECC_GF_DIMENSION_14;
Actually, this is a fix + 8K page support.
If some commit message or split into two patches will be better.
> host->pmecc_cw_len = (1 << host->pmecc_degree) - 1;
> host->pmecc_sector_number = mtd->writesize / sector_size;
> host->pmecc_bytes_per_sector = pmecc_get_ecc_bytes(
>
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand
2014-07-17 10:05 ` Bo Shen
@ 2014-07-17 11:45 ` Raphaël Poggi
0 siblings, 0 replies; 6+ messages in thread
From: Raphaël Poggi @ 2014-07-17 11:45 UTC (permalink / raw)
To: Bo Shen; +Cc: barebox
Thanks for your Acked.
Yes you're right, so I split this into 2 commits and send a v2.
Best regards,
Raphaël Poggi
2014-07-17 12:05 GMT+02:00 Bo Shen <voice.shen@atmel.com>:
> Hi Raphael,
>
>
> On 07/17/2014 04:51 PM, Raphael Poggi wrote:
>>
>> Enable the PMECC to support 8k page.
>>
>> Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
>
>
> Acked-by: Bo Shen <voice.shen@atmel.com>
>
>
>> ---
>> drivers/mtd/nand/atmel_nand.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
>> index fa596ed..36a60d1 100644
>> --- a/drivers/mtd/nand/atmel_nand.c
>> +++ b/drivers/mtd/nand/atmel_nand.c
>> @@ -796,7 +796,9 @@ static int __init atmel_pmecc_nand_init_params(struct
>> device_d *dev,
>> switch (mtd->writesize) {
>> case 2048:
>> case 4096:
>> - host->pmecc_degree = PMECC_GF_DIMENSION_13;
>> + case 8192:
>> + host->pmecc_degree = (sector_size == 512) ?
>> + PMECC_GF_DIMENSION_13 :
>> PMECC_GF_DIMENSION_14;
>
>
> Actually, this is a fix + 8K page support.
> If some commit message or split into two patches will be better.
>
>
>> host->pmecc_cw_len = (1 << host->pmecc_degree) - 1;
>> host->pmecc_sector_number = mtd->writesize / sector_size;
>> host->pmecc_bytes_per_sector = pmecc_get_ecc_bytes(
>>
>
> Best Regards,
> Bo Shen
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-17 11:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-17 8:51 [PATCH 0/2] mtd: atmel_nand: add support for 8k page nand Raphael Poggi
2014-07-17 8:51 ` [PATCH 1/2] mtd: atmel_nand: increase chip_delay Raphael Poggi
2014-07-17 10:02 ` Bo Shen
2014-07-17 8:51 ` [PATCH 2/2] mtd: atmel_nand: enable PMECC for 8k page nand Raphael Poggi
2014-07-17 10:05 ` Bo Shen
2014-07-17 11:45 ` Raphaël Poggi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox