mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH V2 0/3] at91 fixes
@ 2011-02-22 11:32 Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled Marc Kleine-Budde
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2011-02-22 11:32 UTC (permalink / raw)
  To: barebox; +Cc: sha

Hello,

this patch series fixes some problems on the at91sam9g45 and adds support for
flash based bad block table to the atmel nand driver.

changes since V1:

- fix wording in commit message

The following changes since commit 58ec1a81a16a758bc6125f7736d13137c5b7e17f:

  Merge branch 'tx25' into next (2011-02-18 11:11:48 +0100)

are available in the git repository at:

  git://git.pengutronix.de/git/mkl/barebox.git at91

Juergen Beisert (1):
      at91sam9g45_devices: fix compilation if NAND driver is enabled

Marc Kleine-Budde (2):
      at91sam9g45_devices: don't hardcode nand ecc mode
      atmel_nand: add support for flash based bad block table

 arch/arm/mach-at91/at91sam9g45_devices.c |    2 +-
 arch/arm/mach-at91/include/mach/board.h  |    1 +
 drivers/mtd/nand/atmel_nand.c            |    5 +++++
 3 files changed, 7 insertions(+), 1 deletions(-)



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH V2 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled
  2011-02-22 11:32 [PATCH V2 0/3] at91 fixes Marc Kleine-Budde
@ 2011-02-22 11:32 ` Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 3/3] atmel_nand: add support for flash based bad block table Marc Kleine-Budde
  2 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2011-02-22 11:32 UTC (permalink / raw)
  To: barebox; +Cc: sha

From: Juergen Beisert <jbe@pengutronix.de>

Enabling the AT91 NAND driver fails with the following error:

arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_nand':
arch/arm/mach-at91/at91sam9g45_devices.c:101: error: 'NAND_ECC_HW' undeclared (first use in this function)

Include the missing "nand.h".

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-at91/at91sam9g45_devices.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index ddb005a..306d1e4 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -17,6 +17,7 @@
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/io.h>
+#include <linux/mtd/nand.h>
 
 #include "generic.h"
 
-- 
1.7.2.3


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode
  2011-02-22 11:32 [PATCH V2 0/3] at91 fixes Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled Marc Kleine-Budde
@ 2011-02-22 11:32 ` Marc Kleine-Budde
  2011-02-22 12:02   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-02-22 11:32 ` [PATCH V2 3/3] atmel_nand: add support for flash based bad block table Marc Kleine-Budde
  2 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2011-02-22 11:32 UTC (permalink / raw)
  To: barebox; +Cc: sha

Hardware ECC is currently not working on the at91sam9g45. So give the user a
change to specify software ecc mode.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---

Changes since V1:
- better commit message

 arch/arm/mach-at91/at91sam9g45_devices.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 306d1e4..9e2c572 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -99,7 +99,6 @@ void at91_add_device_nand(struct atmel_nand_data *data)
 		return;
 
 	data->ecc_base = (void __iomem *)(AT91_BASE_SYS + AT91_ECC);
-	data->ecc_mode = NAND_ECC_HW;
 
 	csa = at91_sys_read(AT91_MATRIX_EBICSA);
 	at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA);
-- 
1.7.2.3


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH V2 3/3] atmel_nand: add support for flash based bad block table
  2011-02-22 11:32 [PATCH V2 0/3] at91 fixes Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled Marc Kleine-Budde
  2011-02-22 11:32 ` [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode Marc Kleine-Budde
@ 2011-02-22 11:32 ` Marc Kleine-Budde
  2011-02-22 12:03   ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2011-02-22 11:32 UTC (permalink / raw)
  To: barebox; +Cc: sha

Inspired by Simon Polette's kernel commit
f4fa697c26bcd9e942de26bad970f4de1da5a49b.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---

Changes since V1:
- better commit message

 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode
  2011-02-22 11:32 ` [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode Marc Kleine-Budde
@ 2011-02-22 12:02   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-02-22 12:02 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, sha

On 12:32 Tue 22 Feb     , Marc Kleine-Budde wrote:
> Hardware ECC is currently not working on the at91sam9g45. So give the user a
> change to specify software ecc mode.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
I prefer we detect it in the nand driver
than the user select it
and ise the user choice if not detection failled or forced

Best Regards,
J.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2 3/3] atmel_nand: add support for flash based bad block table
  2011-02-22 11:32 ` [PATCH V2 3/3] atmel_nand: add support for flash based bad block table Marc Kleine-Budde
@ 2011-02-22 12:03   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-02-22 12:03 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, sha

On 12:32 Tue 22 Feb     , Marc Kleine-Budde wrote:
> Inspired by Simon Polette's kernel commit
> f4fa697c26bcd9e942de26bad970f4de1da5a49b.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-22 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 11:32 [PATCH V2 0/3] at91 fixes Marc Kleine-Budde
2011-02-22 11:32 ` [PATCH V2 1/3] at91sam9g45_devices: fix compilation if NAND driver is enabled Marc Kleine-Budde
2011-02-22 11:32 ` [PATCH V2 2/3] at91sam9g45_devices: don't hardcode nand ecc mode Marc Kleine-Budde
2011-02-22 12:02   ` Jean-Christophe PLAGNIOL-VILLARD
2011-02-22 11:32 ` [PATCH V2 3/3] atmel_nand: add support for flash based bad block table Marc Kleine-Budde
2011-02-22 12:03   ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox