[PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly

From: RafaÅ MiÅecki
Date: Fri Apr 15 2016 - 15:55:23 EST


This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
enum nand_ecc_algo).

Signed-off-by: RafaÅ MiÅecki <zajec5@xxxxxxxxx>
---
arch/avr32/boards/atngw100/setup.c | 1 +
arch/avr32/boards/atstk1000/atstk1002.c | 1 +
include/linux/platform_data/atmel.h | 1 +
3 files changed, 3 insertions(+)

diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index afeae89..b059b97 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -98,6 +98,7 @@ static struct atmel_nand_data atngw100mkii_nand_data __initdata = {
.enable_pin = GPIO_PIN_PE(23),
.bus_width_16 = true,
.ecc_mode = NAND_ECC_SOFT,
+ .ecc_algo = NAND_ECC_HAMMING,
.parts = nand_partitions,
.num_parts = ARRAY_SIZE(nand_partitions),
};
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 6c80aba..6b45faf 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -96,6 +96,7 @@ static struct atmel_nand_data atstk1006_nand_data __initdata = {
.rdy_pin = GPIO_PIN_PB(30),
.enable_pin = GPIO_PIN_PB(29),
.ecc_mode = NAND_ECC_SOFT,
+ .ecc_algo = NAND_ECC_HAMMING,
.parts = nand_partitions,
.num_parts = ARRAY_SIZE(nand_partitions),
};
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index 3c8825b..a283b3d 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -33,6 +33,7 @@ struct atmel_nand_data {
u8 cle; /* address line number connected to CLE */
u8 bus_width_16; /* buswidth is 16 bit */
u8 ecc_mode; /* ecc mode */
+ enum nand_ecc_algo ecc_algo; /* ecc algorithm */
u8 on_flash_bbt; /* bbt on flash */
struct mtd_partition *parts;
unsigned int num_parts;
--
1.8.4.5