[PATCH] [MTD] NAND: Support for 16-bit bus-width on AT91.

Andrew Victor andrew at sanpeople.com
Fri Dec 8 06:49:42 EST 2006


Add support for 16-bit NAND bus-width for the AT91 NAND driver.

The 16-bit NAND is found on the Atmel AT91SAM9260-EK and AT91SAM9261-EK
boards.

Orignal Patch from Patrice Vilchez


Signed-off-by: Andrew Victor <andrew at sanpeople.com>


diff -urN -x CVS linux-2.6.19-final/drivers/mtd/nand/at91_nand.c linux-2.6.19/drivers/mtd/nand/at91_nand.c
--- linux-2.6.19-final/drivers/mtd/nand/at91_nand.c	Fri Dec  8 12:56:33 2006
+++ linux-2.6.19/drivers/mtd/nand/at91_nand.c	Wed Nov 15 08:12:22 2006
@@ -128,6 +128,9 @@
 	nand_chip->ecc.mode = NAND_ECC_SOFT;	/* enable ECC */
 	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;
+
 	platform_set_drvdata(pdev, host);
 	at91_nand_enable(host);
 







More information about the linux-mtd mailing list