Commit 744f6592 authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Russell King

[ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller

Add support for inverted rdy_busy pin for Atmel nand device controller
It will fix building error on NeoCore926 board.
Acked-by: default avatarAndrew Victor <linux@maxim.org.za>
Acked-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: default avatarGregory CLEMENT <gclement@adeneo.adetelgroup.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2b768b6c
...@@ -93,6 +93,7 @@ struct atmel_nand_data { ...@@ -93,6 +93,7 @@ struct atmel_nand_data {
u8 enable_pin; /* chip enable */ u8 enable_pin; /* chip enable */
u8 det_pin; /* card detect */ u8 det_pin; /* card detect */
u8 rdy_pin; /* ready/busy */ u8 rdy_pin; /* ready/busy */
u8 rdy_pin_active_low; /* rdy_pin value is inverted */
u8 ale; /* address line number connected to ALE */ u8 ale; /* address line number connected to ALE */
u8 cle; /* address line number connected to CLE */ u8 cle; /* address line number connected to CLE */
u8 bus_width_16; /* buswidth is 16 bit */ u8 bus_width_16; /* buswidth is 16 bit */
......
...@@ -116,6 +116,7 @@ struct atmel_nand_data { ...@@ -116,6 +116,7 @@ struct atmel_nand_data {
int enable_pin; /* chip enable */ int enable_pin; /* chip enable */
int det_pin; /* card detect */ int det_pin; /* card detect */
int rdy_pin; /* ready/busy */ int rdy_pin; /* ready/busy */
u8 rdy_pin_active_low; /* rdy_pin value is inverted */
u8 ale; /* address line number connected to ALE */ u8 ale; /* address line number connected to ALE */
u8 cle; /* address line number connected to CLE */ u8 cle; /* address line number connected to CLE */
u8 bus_width_16; /* buswidth is 16 bit */ u8 bus_width_16; /* buswidth is 16 bit */
......
...@@ -139,7 +139,8 @@ static int atmel_nand_device_ready(struct mtd_info *mtd) ...@@ -139,7 +139,8 @@ static int atmel_nand_device_ready(struct mtd_info *mtd)
struct nand_chip *nand_chip = mtd->priv; struct nand_chip *nand_chip = mtd->priv;
struct atmel_nand_host *host = nand_chip->priv; struct atmel_nand_host *host = nand_chip->priv;
return gpio_get_value(host->board->rdy_pin); return gpio_get_value(host->board->rdy_pin) ^
!!host->board->rdy_pin_active_low;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment