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>
This commit is contained in:
parent
f75622f467
commit
bf4289cba0
25 changed files with 55 additions and 45 deletions
|
@ -97,6 +97,7 @@ static struct atmel_nand_data atngw100mkii_nand_data __initdata = {
|
|||
.rdy_pin = GPIO_PIN_PB(28),
|
||||
.enable_pin = GPIO_PIN_PE(23),
|
||||
.bus_width_16 = true,
|
||||
.ecc_mode = NAND_ECC_SOFT,
|
||||
.parts = nand_partitions,
|
||||
.num_parts = ARRAY_SIZE(nand_partitions),
|
||||
};
|
||||
|
|
|
@ -95,6 +95,7 @@ static struct atmel_nand_data atstk1006_nand_data __initdata = {
|
|||
.ale = 22,
|
||||
.rdy_pin = GPIO_PIN_PB(30),
|
||||
.enable_pin = GPIO_PIN_PB(29),
|
||||
.ecc_mode = NAND_ECC_SOFT,
|
||||
.parts = nand_partitions,
|
||||
.num_parts = ARRAY_SIZE(num_partitions),
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/platform_data/macb.h>
|
||||
#include <linux/platform_data/atmel_nand.h>
|
||||
|
||||
#define GPIO_PIN_NONE (-1)
|
||||
|
||||
|
@ -116,18 +117,6 @@ struct platform_device *
|
|||
at32_add_device_cf(unsigned int id, unsigned int extint,
|
||||
struct cf_platform_data *data);
|
||||
|
||||
/* NAND / SmartMedia */
|
||||
struct atmel_nand_data {
|
||||
int enable_pin; /* chip enable */
|
||||
int det_pin; /* card detect */
|
||||
int rdy_pin; /* ready/busy */
|
||||
u8 rdy_pin_active_low; /* rdy_pin value is inverted */
|
||||
u8 ale; /* address line number connected to ALE */
|
||||
u8 cle; /* address line number connected to CLE */
|
||||
u8 bus_width_16; /* buswidth is 16 bit */
|
||||
struct mtd_partition *parts;
|
||||
unsigned int num_parts;
|
||||
};
|
||||
struct platform_device *
|
||||
at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue