Skip to contentSkip to conversation

ARM: davinci: nand: specify ecc strength

PATCH New Sekhar Nori 2 participants 3 messages Aug 16, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: davinci: nand: specify ecc strength

Starting with kernel v3.5, it is mandatory to specify ECC strength when using hardware ECC. Without this, kernel panics with a warning of the sort:

Driver must set ecc.strength when using hardware ECC

------------[ cut here ]------------
kernel BUG at drivers/mtd/nand/nand_base.c:3519!

Fix this by specifying ECC strength for the boards which were missing this.

---
 arch/arm/mach-davinci/board-dm355-leopard.c |    1 +
 arch/arm/mach-davinci/board-dm644x-evm.c    |    1 +
 arch/arm/mach-davinci/board-dm646x-evm.c    |    1 +
 arch/arm/mach-davinci/board-neuros-osd2.c   |    1 +
 4 files changed, 4 insertions(+)
arch/arm/mach-davinci/board-dm355-leopard.c +1 -0
index dff4ddc..139e42d 100644
@@ -75,6 +75,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
 	.parts			= davinci_nand_partitions,
 	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
 	.ecc_mode		= NAND_ECC_HW_SYNDROME,
+	.ecc_bits		= 4,
 	.bbt_options		= NAND_BBT_USE_FLASH,
 };
 
arch/arm/mach-davinci/board-dm644x-evm.c +1 -0
index a33686a..fa4bfaf 100644
@@ -153,6 +153,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = {
 	.parts		= davinci_evm_nandflash_partition,
 	.nr_parts	= ARRAY_SIZE(davinci_evm_nandflash_partition),
 	.ecc_mode	= NAND_ECC_HW,
+	.ecc_bits	= 1,
 	.bbt_options	= NAND_BBT_USE_FLASH,
 	.timing		= &davinci_evm_nandflash_timing,
 };
arch/arm/mach-davinci/board-dm646x-evm.c +1 -0
index fbb8e5a..0c005e8 100644
@@ -90,6 +90,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
 	.parts			= davinci_nand_partitions,
 	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
 	.ecc_mode		= NAND_ECC_HW,
+	.ecc_bits		= 1,
 	.options		= 0,
 };
 
arch/arm/mach-davinci/board-neuros-osd2.c +1 -0
index 2bc112a..808233b 100644
@@ -88,6 +88,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
 	.parts		= davinci_ntosd2_nandflash_partition,
 	.nr_parts	= ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
 	.ecc_mode	= NAND_ECC_HW,
+	.ecc_bits	= 1,
 	.bbt_options	= NAND_BBT_USE_FLASH,
 };
 
Signature · 1 line
1.7.10.1
#1 lore raw

PATCH 1/1 ARM: davinci: nand: specify ecc strength

Quoted 4 lines · Sekhar Nori

Starting with kernel v3.5, it is mandatory
to specify ECC strength when using hardware
ECC. Without this, kernel panics with a warning
of the sort:

Ah thanks, it was on my todolist. :)

holger

#2 lore raw

PATCH 1/1 ARM: davinci: nand: specify ecc strength

Quoted 7 lines · Holger Hans Peter Freyther
Quoted 4 lines · Sekhar Nori

Starting with kernel v3.5, it is mandatory
to specify ECC strength when using hardware
ECC. Without this, kernel panics with a warning
of the sort:

Ah thanks, it was on my todolist. :)

v3.11 is around the corner, couldn't wait longer.

Thanks,
sekhar