[MTD] NAND: Support for 16-bit bus-width on AT91.
authorAndrew Victor <andrew@sanpeople.com>
Fri, 8 Dec 2006 11:49:42 +0000 (13:49 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 8 Dec 2006 13:25:17 +0000 (13:25 +0000)
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@sanpeople.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/at91_nand.c

index a58ed3763086be60f2196fae4b25b1361a2bce32..14b80cc90a7b789d7af4efe96b549bb105f87e22 100644 (file)
@@ -128,6 +128,9 @@ static int __init at91_nand_probe(struct platform_device *pdev)
        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);