From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Cc: sha@pengutronix.de
Subject: [PATCH 3/3] atmel_nand: add support for flash based bad block table
Date: Tue, 22 Feb 2011 12:13:05 +0100 [thread overview]
Message-ID: <1298373185-27624-4-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1298373185-27624-1-git-send-email-mkl@pengutronix.de>
Inspired by Simon Polette's the kernel commit
f4fa697c26bcd9e942de26bad970f4de1da5a49b.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
arch/arm/mach-at91/include/mach/board.h | 1 +
drivers/mtd/nand/atmel_nand.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 1ab05ad..34a3966 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -34,6 +34,7 @@ struct atmel_nand_data {
u8 ale; /* address line number connected to ALE */
u8 cle; /* address line number connected to CLE */
u8 bus_width_16; /* buswidth is 16 bit */
+ u8 flash_bbt; /* use a flash based bbt */
u8 ecc_mode; /* NAND_ECC_* */
};
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index e8f85fc..85e4b24 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -436,6 +436,11 @@ static int __init atmel_nand_probe(struct device_d *dev)
}
}
+ if (host->board->flash_bbt) {
+ printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
+ nand_chip->options |= NAND_USE_FLASH_BBT;
+ }
+
/* first scan to find the device and get the page size */
if (nand_scan_ident(mtd, 1)) {
res = -ENXIO;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-02-22 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 11:13 [PATCH 0/3] at91 fixes Marc Kleine-Budde
2011-02-22 11:13 ` [PATCH 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled Marc Kleine-Budde
2011-02-22 11:13 ` [PATCH 2/3] at91sam9g45_devices: don't hardcode nand ecc mode Marc Kleine-Budde
2011-02-22 11:13 ` Marc Kleine-Budde [this message]
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=1298373185-27624-4-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox