提交 744f6592 编写于 作者: G Gregory CLEMENT 提交者: 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: NAndrew Victor <linux@maxim.org.za>
Acked-by: NDavid Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: NGregory CLEMENT <gclement@adeneo.adetelgroup.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 2b768b6c
......@@ -93,6 +93,7 @@ struct atmel_nand_data {
u8 enable_pin; /* chip enable */
u8 det_pin; /* card detect */
u8 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 */
......
......@@ -116,6 +116,7 @@ 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 */
......
......@@ -139,7 +139,8 @@ static int atmel_nand_device_ready(struct mtd_info *mtd)
struct nand_chip *nand_chip = mtd->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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册