All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 07/10] spl, mtd, nand, atmel_nand: invert device ready pin logic
Date: Wed,  1 Oct 2014 07:54:51 +0200	[thread overview]
Message-ID: <1412142894-997-8-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1412142894-997-1-git-send-email-hs@denx.de>

device ready pin is signalling that the device is ready on state 1
not on 0. Simmiliar as it is in drivers/mtd/nand/nand_spl_simple.c

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Andreas Bie?mann <andreas.devel@googlemail.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Josh Wu <josh.wu@atmel.com>
---
 drivers/mtd/nand/atmel_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 276d820..4f04ed8 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1188,7 +1188,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd)
 	void (*hwctrl)(struct mtd_info *mtd, int cmd,
 			unsigned int ctrl) = this->cmd_ctrl;
 
-	while (this->dev_ready(&mtd))
+	while (!this->dev_ready(&mtd))
 		;
 
 	if (cmd == NAND_CMD_READOOB) {
@@ -1213,7 +1213,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd)
 	hwctrl(&mtd, NAND_CMD_READSTART, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
 	hwctrl(&mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
 
-	while (this->dev_ready(&mtd))
+	while (!this->dev_ready(&mtd))
 		;
 
 	return 0;
@@ -1353,7 +1353,7 @@ int at91_nand_wait_ready(struct mtd_info *mtd)
 
 	udelay(this->chip_delay);
 
-	return 0;
+	return 1;
 }
 
 int board_nand_init(struct nand_chip *nand)
-- 
1.8.3.1

  parent reply	other threads:[~2014-10-01  5:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01  5:54 [U-Boot] [PATCH v1 00/10] arm, at91, spl: add spl support for the taurus and corvus boards Heiko Schocher
2014-10-01  5:54 ` [U-Boot] [PATCH v1 01/10] arm, at91, mpddrc: fix typo in ddr2_init() Heiko Schocher
2014-10-25  0:37   ` Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 02/10] arm, at91: compile mpddrc ram init code also for AT91SAM9M10G45 Heiko Schocher
2014-10-25  0:42   ` Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 03/10] arm, at91: add missing ddr2 cr register MPDDRC_CR_EBISHARE define Heiko Schocher
2014-10-25  0:46   ` Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 04/10] spl, nand: add option to boot raw u-boot.bin image only Heiko Schocher
2014-10-25  1:00   ` Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 05/10] mtd: atmel_nand: add missign include Heiko Schocher
2014-10-25  1:01   ` Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 06/10] spl, nand, atmel_nand: add erase one block function Heiko Schocher
2014-10-02  1:17   ` Scott Wood
2014-10-02  5:21     ` Heiko Schocher
2014-10-02 23:45       ` Scott Wood
2014-10-01  5:54 ` Heiko Schocher [this message]
2014-10-25  1:11   ` [U-Boot] [PATCH v1 07/10] spl, mtd, nand, atmel_nand: invert device ready pin logic Andreas Bießmann
2014-10-01  5:54 ` [U-Boot] [PATCH v1 08/10] arm, spl, at91: add at91sam9260 and at91sam9g45 spl support Heiko Schocher
2014-10-01  5:54 ` [U-Boot] [PATCH v1 09/10] arm, at91, spl: add spl support for the taurus board Heiko Schocher
2014-10-01  5:54 ` [U-Boot] [PATCH v1 10/10] arm, spl, at91: add spl support for the corvus board Heiko Schocher
2014-10-25  0:35 ` [U-Boot] [PATCH v1 00/10] arm, at91, spl: add spl support for the taurus and corvus boards Andreas Bießmann
2014-10-29  9:34   ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412142894-997-8-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.