MTD: atmel_nand: support for software BCH ECC
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Add possible to use software BCH ECC for atmel nand driver
--- drivers/mtd/nand/atmel_nand.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mtd/nand/atmel_nand.c +4 -0
@@ -1177,7 +1177,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr) mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; +#ifdef CONFIG_NAND_ECC_BCH + nand->ecc.mode =NAND_ECC_SOFT_BCH ; +#else nand->ecc.mode =NAND_ECC_SOFT ; +#endif #ifdef CONFIG_SYS_NAND_DBW_16 nand->options =NAND_BUSWIDTH_16 ;#endif
Signature · 1 line
1.7.10.4
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Hi Bo,
Quoted 13 lines · Bo Shen
Add possible to use software BCH ECC for atmel nand driver
Signed-off-by Bo Shen <[email protected]>--- drivers/mtd/nand/atmel_nand.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mtd/nand/atmel_nand.c +0
-0
drivers/mtd/nand/atmel_nand.c int atmel_nand_chip_init(int devnum, ulong base_addr) · line 1184
Quoted 8 lines
drivers/mtd/nand/atmel_nand.c +4
-0@@ -1177,7 +1177,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr) mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; +#ifdef CONFIG_NAND_ECC_BCH + nand->ecc.mode =NAND_ECC_SOFT_BCH ; +#else nand->ecc.mode =NAND_ECC_SOFT ; +#endif
I don't think this is enough for sw supported bch. Where do you feed the libbch?
Best regards
Andreas Bie?mann
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Hi Andreas,
Quoted 19 lines · Andreas Bie?mann
Hi Bo,
Quoted 16 lines · Bo Shen
Add possible to use software BCH ECC for atmel nand driver
Signed-off-by Bo Shen <[email protected]>--- drivers/mtd/nand/atmel_nand.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mtd/nand/atmel_nand.c +0
-0@@ -1177,7 +1177,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr) mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr;
Quoted 8 lines
drivers/mtd/nand/atmel_nand.c int atmel_nand_chip_init(int devnum, ulong base_addr) · line 1184
Quoted 5 lines
drivers/mtd/nand/atmel_nand.c +4
-0+#ifdef CONFIG_NAND_ECC_BCH + nand->ecc.mode =NAND_ECC_SOFT_BCH ; +#else nand->ecc.mode =NAND_ECC_SOFT ; +#endif I don't think this is enough for sw supported bch. Where do you feed the libbch?
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#define CONFIG_NAND_ECC_BCH
#define CONFIG_BCH
---<8---
So, this patch give us option to enable software BCH.
Quoted 4 lines
Best regards
Andreas Bie?mann
Best Regards,
Bo Shen
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Hi Bo,
Quoted 35 lines · Bo Shen
Hi Andreas,
Quoted 21 lines · Andreas Bie?mann
Hi Bo,
Quoted 18 lines · Bo Shen
Add possible to use software BCH ECC for atmel nand driver
Signed-off-by Bo Shen <[email protected]>--- drivers/mtd/nand/atmel_nand.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mtd/nand/atmel_nand.c +0
-0@@ -1177,7 +1177,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr) mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr;Quoted 8 lines
drivers/mtd/nand/atmel_nand.c int atmel_nand_chip_init(int devnum, ulong base_addr) · line 1184
Quoted 5 lines
drivers/mtd/nand/atmel_nand.c +4
-0+#ifdef CONFIG_NAND_ECC_BCH + nand->ecc.mode =NAND_ECC_SOFT_BCH ; +#else nand->ecc.mode =NAND_ECC_SOFT ; +#endif I don't think this is enough for sw supported bch. Where do you feed the libbch?
Yes, we need libbch.
Quoted 8 lines
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---So, this patch give us option to enable software BCH.
got it. So the NAND_ECC_BCH is the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.
Best regards
Andreas Bie?mann
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Hi Andreas,
Quoted 9 lines · Andreas Bie?mann
Quoted 9 lines
Quoted 9 lines
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---
Quoted 4 lines
Quoted 1 line
Quoted 1 line
So, this patch give us option to enable software BCH.
got it. So the
NAND_ECC_BCHis the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.
Frankly, there is no EK boards from Atmel use software BCH now, however, a lot of customers use NAND with 224 bytes OOB, can not use software ECC, they need use software BCH.
So, I think it is better to apply this patch. If it will break the rule of u-boot, then I think we can wait real user in u-boot need this and then apply this patch.
Quoted 4 lines
Best regards
Andreas Bie?mann
Best Regards,
Bo Shen
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Hi Bo,
Quoted 10 lines · Bo Shen
Quoted 9 lines · Andreas Bie?mann
Quoted 9 lines
Quoted 9 lines
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
So, this patch give us option to enable software BCH.
got it. So the
NAND_ECC_BCHis the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.Frankly, there is no EK boards from Atmel use software BCH now, however, a lot of customers use NAND with 224 bytes OOB, can not use software ECC, they need use software BCH.
I understand this. But it will be a piece of dead code until a user of it would be submitted.
Quoted 3 lines
So, I think it is better to apply this patch. If it will break the rule of u-boot, then I think we can wait real user in u-boot need this and then apply this patch.
I'd like to hear Scott's comment on that.
Best regards
Andreas Bie?mann
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Quoted 22 lines · Andreas Bie?mann
Hi Bo,
Quoted 10 lines · Bo Shen
Quoted 9 lines · Andreas Bie?mann
Quoted 9 lines
Quoted 9 lines
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
So, this patch give us option to enable software BCH.
got it. So the
NAND_ECC_BCHis the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.Frankly, there is no EK boards from Atmel use software BCH now, however, a lot of customers use NAND with 224 bytes OOB, can not use software ECC, they need use software BCH.
Quoted 8 lines
I understand this. But it will be a piece of dead code until a user of it would be submitted.
Quoted 3 lines
So, I think it is better to apply this patch. If it will break the rule of u-boot, then I think we can wait real user in u-boot need this and then apply this patch.
I'd like to hear Scott's comment on that.
Is this for the benefit of out-of-tree boards, or for boards which will be submitted but haven't yet?
In the latter case, it could be submitted at the same time. In the former case, of course we encourage the boards to be submitted, and we don't generally add code solely for the benefit of out-of-tree boards.
In any case, this is minor enough that I don't care all that much. If we ever get kconfig, then hopefully the "dead code" rules will relax to code which could be enabled through some legal config, rather than code which is enabled in some default config for a board. Things like allyesconfig and randconfig could help with build test coverage.
-Scott
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Dear Scott Wood,
Quoted 37 lines · Scott Wood
Quoted 20 lines · Andreas Bie?mann
Quoted 10 lines · Bo Shen
Quoted 9 lines · Andreas Bie?mann
Quoted 9 lines
Quoted 9 lines
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
So, this patch give us option to enable software BCH.
got it. So the
NAND_ECC_BCHis the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.Frankly, there is no EK boards from Atmel use software BCH now, however, a lot of customers use NAND with 224 bytes OOB, can not use software ECC, they need use software BCH.
Quoted 8 lines
I understand this. But it will be a piece of dead code until a user of it would be submitted.
Quoted 3 lines
So, I think it is better to apply this patch. If it will break the rule of u-boot, then I think we can wait real user in u-boot need this and then apply this patch.
I'd like to hear Scott's comment on that.
Is this for the benefit of out-of-tree boards, or for boards which will be submitted but haven't yet?
In the latter case, it could be submitted at the same time. In the former case, of course we encourage the boards to be submitted, and we don't generally add code solely for the benefit of out-of-tree boards.
Quoted 5 lines
In any case, this is minor enough that I don't care all that much. If we ever get kconfig, then hopefully the "dead code" rules will relax to code which could be enabled through some legal config, rather than code which is enabled in some default config for a board. Things like allyesconfig and randconfig could help with build test coverage.
I think this is a 'yes we take it'. Scott, would you pull it in or should I do? Is it even that minor to pull it into 2013.10? It was posted weeks after merge window closed.
Best regards
Andreas Bie?mann
PATCH 1/1 MTD: atmel_nand: support for software BCH ECC
Quoted 46 lines · Andreas Bie?mann
Dear Scott Wood,
Quoted 37 lines · Scott Wood
Quoted 20 lines · Andreas Bie?mann
Quoted 10 lines · Bo Shen
Quoted 9 lines · Andreas Bie?mann
Quoted 9 lines
Quoted 9 lines
Yes, we need libbch.
If we really want to enable software BCH support. It also need add following two options in board configuration file. ---8>---
#defineCONFIG_NAND_ECC_BCH
#defineCONFIG_BCH
---<8---Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
So, this patch give us option to enable software BCH.
got it. So the
NAND_ECC_BCHis the adoption for the SW BCH correction in mtd layer. I understand that this would be helpful for at91 SoC without PMECC HW. But there is no user currently, so I hesitate to apply this.Frankly, there is no EK boards from Atmel use software BCH now, however, a lot of customers use NAND with 224 bytes OOB, can not use software ECC, they need use software BCH.
Quoted 8 lines
I understand this. But it will be a piece of dead code until a user of it would be submitted.
Quoted 3 lines
So, I think it is better to apply this patch. If it will break the rule of u-boot, then I think we can wait real user in u-boot need this and then apply this patch.
I'd like to hear Scott's comment on that.
Is this for the benefit of out-of-tree boards, or for boards which will be submitted but haven't yet?
In the latter case, it could be submitted at the same time. In the former case, of course we encourage the boards to be submitted, and we don't generally add code solely for the benefit of out-of-tree boards.
Quoted 5 lines
In any case, this is minor enough that I don't care all that much. If we ever get kconfig, then hopefully the "dead code" rules will relax to code which could be enabled through some legal config, rather than code which is enabled in some default config for a board. Things like allyesconfig and randconfig could help with build test coverage.
Quoted 3 lines
I think this is a 'yes we take it'. Scott, would you pull it in or should I do? Is it even that minor to pull it into 2013.10? It was posted weeks after merge window closed.
I can take it, but not for 2013.10. It's not a bugfix.
-Scott