mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/7] atmel_nand: make chip_delay configurable
Date: Sat,  7 Dec 2013 10:36:58 +0100	[thread overview]
Message-ID: <1386409020-11914-5-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1386409020-11914-1-git-send-email-eric@eukrea.com>

this is usefull for custom boards with different NAND flashs
(for informations u-boot defaults chip_delay to 75)

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/mach-at91/include/mach/board.h | 1 +
 drivers/mtd/nand/atmel_nand.c           | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index aa0fdae..4e6fa8b 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -64,6 +64,7 @@ struct atmel_nand_data {
 	u8		ecc_mode;	/* NAND_ECC_* */
 	u8		on_flash_bbt;	/* Use flash based bbt */
 	u8		bus_on_d0;
+	int		chip_delay;
 
 	u8		pmecc_corr_cap;
 	u16		pmecc_sector_size;
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 658ae52..2ff7427 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1161,7 +1161,10 @@ static int __init atmel_nand_probe(struct device_d *dev)
 		nand_chip->ecc.mode = NAND_ECC_HW;
 	}
 
-	nand_chip->chip_delay = 20;		/* 20us command delay time */
+	if (host->board->chip_delay > 0)
+		nand_chip->chip_delay = host->board->chip_delay;
+	else
+		nand_chip->chip_delay = 20;		/* 20us command delay time */
 
 	if (host->board->bus_width_16) {	/* 16-bit bus width */
 		nand_chip->options |= NAND_BUSWIDTH_16;
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-12-07  9:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07  9:36 [PATCH 1/7] atmel_nand: check gpio validity before using it Eric Bénard
2013-12-07  9:36 ` [PATCH 2/7] at91: introduce sama5d3's SMC support Eric Bénard
2013-12-09 13:27   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-12  8:51     ` Sascha Hauer
2013-12-12  9:53       ` Eric Bénard
2013-12-07  9:36 ` [PATCH 3/7] at91: sama5d3: use the sama5 smc instead of the sam9 one Eric Bénard
2013-12-09 13:28   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-07  9:36 ` [PATCH 4/7] sama5d3xek: update nand timings Eric Bénard
2013-12-07  9:36 ` Eric Bénard [this message]
2013-12-09 13:30   ` [PATCH 5/7] atmel_nand: make chip_delay configurable Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 14:54     ` Eric Bénard
2013-12-09 16:32       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 16:57         ` Eric Bénard
2013-12-09 17:15         ` Eric Bénard
2013-12-10  7:25           ` Sascha Hauer
2013-12-07  9:36 ` [PATCH 6/7] sama5d3xek: add NOR CFI support Eric Bénard
2013-12-09 13:37   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-12  8:57     ` Sascha Hauer
2013-12-12  9:52       ` Eric Bénard
2013-12-07  9:37 ` [PATCH 7/7] samsa5d3xek: update defconfig Eric Bénard
2013-12-09 13:31   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 14:53     ` Eric Bénard
2013-12-09 16:33       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 16:48       ` Alexander Aring
2013-12-09  8:36 ` [PATCH 1/7] atmel_nand: check gpio validity before using it Sascha Hauer
2013-12-09 13:31   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-09 13:34 ` Jean-Christophe PLAGNIOL-VILLARD

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=1386409020-11914-5-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox