aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-12-29 01:43:24 -0500
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-03-15 11:26:32 -0400
commitbf4289cba02b8cf770ecd7959ca70839f0dd9d3c (patch)
tree12c94db33209130c12ce7c31cb2d7f36b303b651 /arch/avr32
parentf75622f4679479d352d2fa83e0d84c6c13cfcb5f (diff)
ATMEL: fix nand ecc support
So we can now choose for the board the ecc mode (ecc soft, soft bch, no ecc and hardware). Set ecc mode in the boards to soft as currently in the driver. Move platform data to a common header include/linux/platform_data/atmel_nand.h Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/boards/atngw100/setup.c1
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c1
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h13
3 files changed, 3 insertions, 12 deletions
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 7c756fb189f7..afeae8978a8d 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -97,6 +97,7 @@ static struct atmel_nand_data atngw100mkii_nand_data __initdata = {
97 .rdy_pin = GPIO_PIN_PB(28), 97 .rdy_pin = GPIO_PIN_PB(28),
98 .enable_pin = GPIO_PIN_PE(23), 98 .enable_pin = GPIO_PIN_PE(23),
99 .bus_width_16 = true, 99 .bus_width_16 = true,
100 .ecc_mode = NAND_ECC_SOFT,
100 .parts = nand_partitions, 101 .parts = nand_partitions,
101 .num_parts = ARRAY_SIZE(nand_partitions), 102 .num_parts = ARRAY_SIZE(nand_partitions),
102}; 103};
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index c56ddac85d61..dc5263321480 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -95,6 +95,7 @@ static struct atmel_nand_data atstk1006_nand_data __initdata = {
95 .ale = 22, 95 .ale = 22,
96 .rdy_pin = GPIO_PIN_PB(30), 96 .rdy_pin = GPIO_PIN_PB(30),
97 .enable_pin = GPIO_PIN_PB(29), 97 .enable_pin = GPIO_PIN_PB(29),
98 .ecc_mode = NAND_ECC_SOFT,
98 .parts = nand_partitions, 99 .parts = nand_partitions,
99 .num_parts = ARRAY_SIZE(num_partitions), 100 .num_parts = ARRAY_SIZE(num_partitions),
100}; 101};
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index 67b111ce332d..71733866cb4f 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -7,6 +7,7 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/serial.h> 8#include <linux/serial.h>
9#include <linux/platform_data/macb.h> 9#include <linux/platform_data/macb.h>
10#include <linux/platform_data/atmel_nand.h>
10 11
11#define GPIO_PIN_NONE (-1) 12#define GPIO_PIN_NONE (-1)
12 13
@@ -116,18 +117,6 @@ struct platform_device *
116at32_add_device_cf(unsigned int id, unsigned int extint, 117at32_add_device_cf(unsigned int id, unsigned int extint,
117 struct cf_platform_data *data); 118 struct cf_platform_data *data);
118 119
119/* NAND / SmartMedia */
120struct atmel_nand_data {
121 int enable_pin; /* chip enable */
122 int det_pin; /* card detect */
123 int rdy_pin; /* ready/busy */
124 u8 rdy_pin_active_low; /* rdy_pin value is inverted */
125 u8 ale; /* address line number connected to ALE */
126 u8 cle; /* address line number connected to CLE */
127 u8 bus_width_16; /* buswidth is 16 bit */
128 struct mtd_partition *parts;
129 unsigned int num_parts;
130};
131struct platform_device * 120struct platform_device *
132at32_add_device_nand(unsigned int id, struct atmel_nand_data *data); 121at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
133 122